Skip to content

Instantly share code, notes, and snippets.

@byllc
Last active August 29, 2015 13:56
Show Gist options
  • Save byllc/9004508 to your computer and use it in GitHub Desktop.
Save byllc/9004508 to your computer and use it in GitHub Desktop.
Bosh Pitfalls and The experience of learning to create a bosh release.

Installing Bosh-lite for local development

  • Start Here S&W Talk on Bosh Lite
  • Then go Here Bosh Lite Github

Creating A Release

  • BOSH Release Recipe: I've started a list of questions you should answer before you begin a Bosh release: https://gist.github.com/byllc/8870959 Notice there is an example file in for MariaDB. It was helpful but by the time I was done with the release I noticed It was not thourough enough and I could had a lot more detail. I will go through and update the questions and answers. It would be nice to get this down to a point where you could just point bosh-gen at an answers file and it will supply these 'answers' to the scaffold.

  • USE bosh-gen and templates/make_manifest. You should not create manifest or package/job skeletons by hand. You will miss stuff.

  • Often I would get an error "'job_name_0' is not runnning" but this was often confusing because it does not actually imply that the vm has been created. Pay attention to the order of operations when you run create, upload or deploy. For example, realizing that I was failing on the compile phase meant that the vms may not have been created and the packages were certainly not on the vms if they had been created already. But the error message 'job_name/0 is not running' did not make that clear.

  • You should not run initialization type commands inside of packaging scripts. These scripts are going to run on a compile node and you won't have access to persistent data there. For example, the initialization scripts for mysql,mariadb, or postgresql.

  • A bosh release is fundamentally just a generic packaging construct that can span multiple virtual machines. Where it extends that construct is in process monitoring and managment but nonetheless it feels very much like packaging something for yum or apt. Realizing this was helpful because package managment frameworks all have to decide where to put stuff and we put stuff in different places. It helped quite a bit to pore over configuration options looking for anything that specified directory paths and make sure you provide them with updated /var/vcap.. paths. Often these paths are set to defaults and will not show up in a config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment