work in progress + side project == be careful
A CLI tool that automates the creation of a BOSH on AWS
You probably want to look at the BOSH Bootloader instead.
- Automate as much as possible
- Minimize required human configuration
- Ease common existing workflows, don't try to replace them
- Encourage disposability of environments
Pull requests are welcome. Here's how to get started:
- Get the source and dependencies
[ -d $GOPATH ] && cd $GOPATH
mkdir -p src/github.com/rosenhouse && cd src/github.com/rosenhouse
git clone git://github.com/rosenhouse/tubes
cd tubes
git submodule update --init --recursive
- Run the offline test suite
./scripts/test-offline
- Run the online test suite (optional)
Requires AWS account region & credentials in your environment. Takes a while, as it creates real resources on AWS.
./scripts/test-full # WARNING: this uses a REAL AWS account and will cost you real money.
Here's a brief walkthrough. Run with -h
flag to see all options. There are still several manual steps. Automating those is a high priority.
- Install for easy access
go install github.com/rosenhouse/tubes/cmd/tubes
- Set your AWS environment variables
AWS_DEFAULT_REGION=us-west-2
AWS_ACCESS_KEY_ID=some-key
AWS_SECRET_ACCESS_KEY=some-secret
- Boot a new environment named
my-environment
tubes -n my-environment up
This boots 2 CloudFormation stacks, a "base" stack to support a BOSH director, and a "Concourse" stack with dedicated subnet and Elastic LoadBalancer. It generates deployment manifests in $PWD/environments/my-environment
things to automate eventually ...
- Manually
bosh-init
the director
cd environments/my-environment
source bosh-environment
scp -i ssh-key ./* ec2-user@$NAT_IP:~/
ssh -i ssh-key ec2-user@$NAT_IP "bosh-init deploy director.yml"
scp -i ssh-key ec2-user@$NAT_IP:~/director-state.json ./
or to run the deploy in a detached screen that survives hangups, try
ssh -i ssh-key ec2-user@$NAT_IP "screen -S setup -d -m bosh-init deploy director.yml"
instead. In that case you'll need to wait for it to finish before copying the director-state.json
file back down to your local box.
- Target the new bosh director
bosh -t $BOSH_TARGET status --uuid