nise-bosh - A New Way To BOSH
I mentioned nise_bosh in my previous post, albeit in passing. This is a topic, however, that deserves it’s own blog post.
nise-bosh is the product of NTT, the world’s leading telecom headquartered in Tokyo, Japan. From the nise-bosh GitHub repo…
Nise BOSH is a lightweight BOSH emulator. You can easily install multiple BOSH packages on your servers by Nise BOSH commands. ‘Nise’ means ‘Pseudo’ in Japanese.
In short, it aims to take standard BOSH releases, and allow users to install and run jobs without any instance of BOSH.
Iwasaki Yudai of NTT detailed the details of getting CFv2 up and running using nise-bosh here. Most of it is prep work under the assumption of a completely clean linux box, but the important lines are the following
This is installing the two jobs (micro and micro_ng) in the manifest file (micro.yml) included with the above linked gist from the cf-release BOSH release. It’s a very simple and easy process, so much so that I was able to get CFv2 up and running in hardly any time, most of which was waiting for various packages to download and build.
Let’s run through this with a simpler release. Not to self-promote, but the mumble BOSH release is very straight-forward. If you’re not familiar with mumble, it’s an open-source voice chat application and server. It’s comparable with Ventrilo and TeamSpeak.
So let’s get a fresh Ubuntu image up and running using Vagrant…
And let’s do some prep work…
Nothing fancy here. Installing some prerequisites (git, curl, ruby, bundler), grabbing the two repos of interest (nise-bosh and the BOSH release we’re deploying, mumble-release), and running
bundle install over nise-bosh. The last command is running an init script that comes with nise-bosh that takes care of a few more prerequisites. This will set up a few directories, users and groups to run the release, as well as a few other apt packages and monit.
Before we actually install the release, let’s take a look at the manifest we’ll be using to deploy it
If you’ve deployed BOSH releases before, you’ll notice things are a lot more trimmed down here. We’re only defining the jobs and properties section, and nothing as far as networks or resource pools go. I would assume you could use your normal BOSH manifest, but I can’t verify that as of writing this.
One last step before deploying the release is a part of the standard BOSH deployment cycle, we need to run
bosh create release
Now for the main event, deploying the release. This is actually done with a single command…
nise-bosh takes three arguments: The path to the BOSH release, the path of manifest file, and the name of the job to install. As you can see in our above manifest file, we have but one job listed named “mumble”. The output of this is very straightforward:
It’s as simple as that. Finally, we just need to start the job. nise-bosh sets up monit config files as defined in the BOSH release, so all we need to do is tell monit to start all the jobs it’s configured for…
And now we have a sparkly brand-new Mumble server, as seen in the log files located at /var/vcap/sys/log/mumble
The intent with this post was to introduce a project I’ve been working on named nise-bosh-vagrant, but this post is getting a bit long. Keep an eye out for another post very soon describing this project, what it does and how to do it.
Let me know what you think of this article on twitter @brianmmcclain or leave a comment below!