Skip to content

Instantly share code, notes, and snippets.

View tammersaleh's full-sized avatar
🚀
Orbiting?

Tammer Saleh tammersaleh

🚀
Orbiting?
View GitHub Profile

Keybase proof

I hereby claim:

  • I am tammersaleh on github.
  • I am tammersaleh (https://keybase.io/tammersaleh) on keybase.
  • I have a public key whose fingerprint is F08D A0E1 ABCB 9607 ED50 FAF4 F830 BC07 5D4C 8E16

To claim this, I am signing this object:

#!/usr/bin/env bash
set -eou pipefail
[[ "$#" == 1 ]] && cd "$1"
if [[ ! -f Dockerfile ]]; then
echo "Usage: $(basename $BASH_SOURCE) [directory]"
echo "Builds the docker image locally"
echo
### Keybase proof
I hereby claim:
* I am tammersaleh on github.
* I am tammersaleh (https://keybase.io/tammersaleh) on keybase.
* I have a public key whose fingerprint is F02A D3AA 6EFE 0C94 0C5B 3A27 7996 591C 64B7 B262
To claim this, I am signing this object:
@tammersaleh
tammersaleh / frontend-packaging.sh
Last active July 22, 2018 21:22
etcd frontend server
#!/usr/bin/env bash
set -e -x
# /var/vcap/packages/frontend
cp -a frontend/* ${BOSH_INSTALL_TARGET}
cd ${BOSH_INSTALL_TARGET}
/var/vcap/packages/ruby_2.4.1/bin/bundle install \

Keybase proof

I hereby claim:

  • I am tsaleh on github.
  • I am tammersaleh (https://keybase.io/tammersaleh) on keybase.
  • I have a public key whose fingerprint is F02A D3AA 6EFE 0C94 0C5B 3A27 7996 591C 64B7 B262

To claim this, I am signing this object:

Proposal for BOSH Errands

Background

We've had a number of requests for being able to run scripts against a deployment. The challenge has been defining these scripts and the execution environment without reducing the predictable, descriptive and deterministic nature of BOSH.

Use cases

#!/usr/bin/env ruby
require "benchmark"
def speak_with_block(&block)
block.call
end
def speak_with_yield
yield
describe "GET /agents.json" do
it_behaves_like "API controller", :params => { ... }, :environment => { ... }
end
require 'spec_helper'
describe "given some agents" do
before do
create(:agent, name: "Agent 1")
create(:agent, name: "Agent 2")
end
describe "GET /agents.json", :as => :api do
its(:status) { should == 200 }