bosh-gen is a tool for rapidly developing bosh releases - I have been using it to create bosh releases for rails/ruby, php, python, and several DB backends over the last few months. The new release includes a few new niceities, but the main feature is a recreated 'job' generator. The full change log is at the end.
The new job generator creates jobs in a style that deviates from cf-release & bosh-release. It represents the style of job that I like at the moment - scripts do not have ERb in them, templates are inside subfolders of templates/ rather than a flat file structure, and instead of a "common" package of helper scripts these helpers are generated into the job which allows them to be iterated without requiring package compilation.
Quick tutorial so you can see what it creates for you:
$ bosh-gen new cassandra --s3
$ cd cassandra
$ bosh-gen extract-pkg ../cf-release/packages/dea_jvm7
readme Upload blobs with 'bosh upload blobs'
$ mv packages/dea_jvm7 packages/java7
now rename spec packages/java7/spec
$ bosh-gen package cassandra -d java7 -f ~/Downloads/apache-cassandra-1.0.11-bin.tar.gz
change packages/cassandra/packaging to:
tar xfv cassandra/apache-cassandra-1.0.11-bin.tar.gz
cp -a apache-cassandra-1.0.11/* $BOSH_INSTALL_TARGET
And now for the new job generator!
$ bosh-gen job cassandra -d java7 cassandra
Look at all that goodness!
The monit script uses the bin/monit_debugger to help you debug any glitches in starting/stopping processes.
ctl_setup.sh setups up lots of common folders and env vars.
ctl_utils.sh comes from cf-release's common/utils.sh with some extra helper functions
data/properties.sh.erb is where you extract any <%= properties.cassandra… %> values from the deployment manifest.
bin/cassandra_ctl no longer needs to be an unreadable ERb template! Use the env variables you create in data/properties.sh.erb and normal bash if statements instead of ERb <% if … %> templates.
examples/... is a folder for documenting example, valid deployment manifest properties for the release.
I like this layout of a job's templates, so its nice to now share it via bosh-gen.
PS. You now change "TODO" to "cassandra" in bin/cassandra_ctl and the rest of the tutorial is left to you, dear cassandra lover.
* `job` - more powerful initial scripts; templates nested in folders; scripts are much cleaner to read; scripts in bin/ & helpers/ do not have ERb; only data/properties.sh.erb & config/ are for ERb.
* `package` - detects .zip files (in addition to .tar.gz) and includes useful default unpacking script in `packaging`; describe available env vars in `packaging` script
* `manifest` - auto-detects current BOSH UUID
* `extract-pkg` - now a single argument - the path of the source package folder
* `extract-job` - now a single argument - the path of the source job folder
Dr Nic Williams - VP Developer Evangelism
The Leading Platform as a Service
Mobile: +1 415 860 2185