Tag Archives: CPI

For the last couple months I have been working on an experiment involving raspbery PIs (or PII?), BOSH and Cloudfoundry. The goal of this experiment is to run Cloudfoundry on one or more Raspberry Pis. My colleague Ruurd Keizer and I will be sharing our journey and demonstrate the result at the Cloudfoundry Summit in Boston in April!

Actually the goal is not to run all of the Cloudfoundry components on a raspberry but specifically the Diego Cell. Why you ask? Well, first of all I though it would be an interesting learning experience but also because I think alternative CPU architectures, especially ARM might take some of the datacenter market share from x86 CPU’s. Giving Cloudfoundry multi architecture support could make migrating from one architecture to another pretty easy. Mixing architectures in one Cloudfoundry platform would give platform consumers a choice between more powerfull x86 CPUs and a little less powerfull but also a lot less power hungry ARM CPUs. I believe that for a lot of workloads the less powerhungry ARM chips are a good fit. And saving a bit of energy helps save the planet so what’s not to like 🙂

Ok, enough about the why, I also want to tell a little bit about what I’m working on exactly. As I said the final goal is to run a Diego cell on a Raspberry Pi. But deploying Diego and Garden-RunC is usually done by BOSH. BOSH is designed to consume an IaaS like vSphere or AWS. There is support for physical machines through RackHD but It isn’t really possible to deploy Raspberries with RackHD.

So in order to be able to deploy Diego cells with BOSH to raspberries I started from the ground up, I build a power management thingy, a (P)IaaS, BOSH CPI and a Stemcell. It took me quite some time but surpringly it all works now :). Currently I am in the process of customizing BOSH releases so they will actually compile on a Pi. This mainly means swapping out the golang blob with the armv6l golang blob. But unfortunately in some releases there are more binary blobs that have to be replaced with their ARM counterparts.

I will be sharing more details on all of the components we build and changed. But for now we are too busy getting everything to actually work. The results so far are very promising and I truly expect we can demo a “cf push ” to a Pi during the CF Summit!

I explained both BOSH and the Photon platform in previous posts. I never did a post on how to deploy BOSH on vSphere but this document does a very good job describing the process. The only thing I want to add to that is: Don’t use “@” in your passwords! Cost me a day or so to figure out what was going wrong. In this post I will detail how to run BOSH on VMware Photon platform.

Update 19-04-2017: This post was based on Photon platform 1.1.1. As of today the current version is Photon platform 1.2. The steps in this post may or may not work for version 1.2.

Create a resource ticket for the bosh environment. I didn’t find a way to deploy to other projects than the one you deployed the bosh director to. So make sure you create a big enough ticket to also fit the workloads you’ll be deploying with BOSH.

Deploy BOSH

Install BOSH cli tools

To be able to install BOSH you’ll need the bosh-init tool. This tool is like a mini BOSH which is able to deploy BOSH. So it’s kinda like BOSH deploys itself. I won’t explain how to install bosh-init, the cloud foundry docs on this are pretty good. Please follow instructions here.

To be able to interact with a BOSH director once it’s deployed you’ll need the BOSH cli itself. In this case you’ll even need it before the BOSH director is running because it’s used to build the Photon CPI release. Again, find the cloud foundry docs on how to install the bosh cli here.

Prepare the Photon CPI

BOSH is able to work with a lot of different cloud (IaaS) providers and platforms. I already mentioned vSphere. But BOSH is also able to use vCloud, AWS, Google and Openstack. The magic that makes this multi-cloud solution possible is the Cloud Provider Interface or CPI.

VMware has published a CPI for Photon. It’s not published on the BOSH website yet but you can find it on github. To be able to use the CPI you’ll want to install it into a BOSH director. How? Using a BOSH release of course. The Photon CPI BOSH release is here. Since there is no ready build Photon CPI release we’ll have to build our own. Don’t be scared, it’s not that hard (disclaimer: I’m using Ubuntu. commands on a Mac should be similar, not sure about window though). Here we go:

Make sure you have the git client installed on your OS

Create a folder to contain the CPI release and your deployment yml. I used ~/my-bosh/photon.

cd into the folder you created

Clone the Photon CPI release git repo, cd into the created folder and create the release:

Create BOSH manifest

deployments in BOSH are described in so called manifests. These are files in YAML format containing a bunch of settings. Each type of deployment has it’s own manifest and so does the bosh deployment itself.

You can find an example manifest for bosh with the photon CPI in the photon CPI release git repo. I’ll share my own manifest below so you ‘ll have a feel of what it should look like with all the values populated. If you used the yml from my blog post to deploy photon then you can use the my bosh manifest with just two changes:

change the network id on line 39. The command to get the id is

1

photon network list

Change the photon project id on line 114. The command to get the id is

Recent Posts

Automate-IT Archive

Chris already works with virtualization products since 2004 and since this time he developed into a real expert. Chris works for ITQ and one of his passions is to share his knowledge and use all of his experience to find the best solution for his customers.