I’ll admit, there was another reason I got excited about nise_bosh. Not only did it give me the oppertunity to set up Cloud Foundry v2 with ease, a first for me without access to a full BOSH environment that didn’t involve me paying out of pocket, but I also saw it as my oppertunity to get back into developing BOSH releases. This meant I needed a quick way to iterate on BOSH releases and test them.
nise-bosh-vagrant is a quick project I started last week to help orchestrate this workflow so that I could leverage nise-bosh, but quickly standup and tear down Vagrant VMs as well as install BOSH releases in them. The goal was to keep the workflow simple, and reduce the time from downloading a BOSH release to having it up and running.
So let’s see how to use it. I’ve distributed this as a ruby gem for ease of use, so installation is simply…
Let’s take a look at the possible arguments and flags…
There’s only two required arguments: the path to the BOSH release and the path to the manifest file. Let’s use the same release as we did when I wrote about nise-bosh, the mumble-release. We’ll assume the release is at /home/brian/mumble-release and we’ve already ran
bosh create release. We’re also going to add two flags to help things out,
--start. This will automatically install the BOSH release after the machine has been prepared, and then start all the jobs in the release in the order that they’re described in the manifest file.
This takes care of everything, beginning to end, that I covered in my previous blog post.
This also puts a few helpful scripts in place within the Vagrant VM:
/home/vagrant/install_release.sh– Runs the nise-bosh commands to install all jobs described in the manifest file
/home/vagrant/start.sh– Starts all jobs in the BOSH release
/home/vagrant/stop.sh– Stops all jobs in the BOSH release
If you want to SSH into the Vagrant VM, the Vagrantfile is placed in the release directory, so in this example, it would be at /home/brian/mumble-release/Vagrantfile. There are plans for a
nise-bosh-vagrant ssh command.
This project is, admittedly, a work in progress. It works, however every time it stands up a VM, it uses a fresh Ubuntu image and runs the prep scripts, which takes a bit of time. However, there are plans to create a Vagrant box with these preparations already in place. As of writing this, the current version of nise-bosh-vagrant is 0.2, but I’m hoping to continue to improve this, testing it by developing new BOSH releases.
So kick the tires! Break it, figure out what doesn’t work and create an issue in GitHub!
Let me know what you think of this article on twitter @brianmmcclain or leave a comment below!