Hacking on Cloud Foundry's Gorouter

Late last week, a couple colleagues and myself discovered a small bug in Cloud Foundry’s gorouter in which a websocket upgrade was not completed if a comma-separated list of values in the Connection header was provided. A pull request was pieced together, submitted and is currently being looked at by Pivotal. However, I figured, why let the learning stop there? There were several things that I was unfamiliar with: The gorouter codebase Running the gorouter locally The Go language Obviously, I had my work cut out for me.

Cloud Foundry the API Way

This is a topic I’ve seen come up a couple times in the last few weeks. It started with Dr. Nic Williams when we were discussing share-my-cloudfoundry when he wanted to provide compatibility with Cloud Foundry v1 and v2 in the same application. This situation came up again with a personal project that I will detail later. It required a bit of discussion, but I finally tracked down the answers. Although the cfoundry gem states that it is compatible with Cloud Foundry v1 and v2, after some digging, it looks like it’s only compatible with v2.

Cloud Foundry v2: What's New?

I’ve mentioned Cloud Foundry v2 a few times before (here, here, and here), but I wanted to really get my hands dirty with the new bits and pieces before I wrote about it. Andy Piper wrote about CFv2 a bit on his blog, in which he outlines the major features to users of CF. I wanted to dig a bit deeper into the major changes in some of the components that make up CFv2.

Introducing nise-bosh-vagrant

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 - 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.

Buildpacks in Cloud Foundry v2

NOTE: The referenced tweet has since been deleted The above tweet summarizes a very productive and exciting lunch I had today, in which after getting CF v2 working last night thanks to nise_bosh, I started reading about buildpacks. To summarize buildpacks, taken straight from the Cloud Foundry documentation… Buildpacks are a convenient way of packaging framework and/or runtime support for your application. For example, Cloud Foundry doesn’t support Django or Python by default.