Customizing Micro Cloud Foundry?

I love micro cloud foundry.  I spend a fair bit of time on airplanes, and I hate not being able to work because my internet connection is flaky in some hotel room so being self sufficient when I am doing dev is critical. So good thinking, and thanks Cloud Foundry team.

Micro cloud foundry is designed to be the self-standing companion to cloudfoundry.com and this recent blog post indicates that the team is working to keep micro-cloud in synch with cloudfoundry.com. Coolness.  But what happens when I want a self-standing “micro” version of cloud foundry that doesn’t match up with cloudfoundry.com, but rather a customized cloud – one that, say, has additional services available?  Off the top of my head I can think of two basic approaches – 1) Customize micro cloud foundry or 2) Create a single node cloud foundry to run locally and install your customizations in there.  I’ll explore #2 a bit more in another post, right now I want to poke on #1 a bit.

I have spent many afternoons over the last couple of weeks perusing my micro cloud VM including reading a lot of ruby code and from that have reached a few conclusions (please speak up if you think I’m misguided on any of these):

  • Micro cloud foundry is created by the folks at VMWare as a BOSH release that puts all the components on a single node.
  • In addition to the cloud foundry components it also has a few bits specific to micro cloud foundry like the code for the console and offline mode.
  • The directory structure that contains all of the bits is complex – lots of links from parts of the tree to other parts of the tree.
  • On first startup entries are created in the embedded sql-lite DB – these are essentially installing, or better put, enabling certain parts of cloud foundry – for example, the available services have entries placed into the database.
  • Hacking micro cloud foundry to add additional services (i.e. for Cassandra) is pretty much a no go – I tried.  This is why the cloud foundry team created BOSH – doing these types of things by hand is awful. And I don’t even know all of the steps that need to be taken even if I was crazy enough to try it anyway.
  • I should point out that existing documentation for how to create custom services basically hacks into an existing deployment – none of those instructions match up with micro-cloud and the docs for adding services to BOSH-based deployments starts with “get the cf-release” – more on this in a second.

I’m convinced the right approach to creating a new version of micro cloud foundry is to get the micro cloud foundry bosh release, add my new service in there, do a bosh deploy and then take the resultant VM as my micro cloud.  In other words, pretty much what that doc for adding services to a BOSH-based deployment prescribes.  I’ve been digging around github, found repositories for micro, services-base and services but haven’t been able to find anything like mcf-release (a version of cf-release specifically for micro).

What I am trying to do here is an important part of the whole PaaS development paradigm – anyone else interested?

I’ve posted a short question here – keep an eye there for any responses.  I’ll keep posting on the subject as well.

2 Comments

  1. Elango P

    January 14, 2013

    Hi Cornelia,

    I’m working for Huawei company (Santa clara,ca) as Principal MIddleware Enigeer and I have the same requirement as your’s of adding a new service to MCF. Did find a way to add your own service to MCF? If yes can you please share the instruction to add a new service to micro cloud foury.
    I really appreciate your response on this.

    Thanks,

    Elango

  2. Cornelia Davis

    January 20, 2013

    Hi Elango,

    The short answer is that you need to deploy MCF via bosh and then making the resulting VM available as a vmdk. Apparently the cloud foundry guys are doing this with a capistrano script (which I know nothing about) as indicated in a comment here: http://stackoverflow.com/questions/13618900/customizing-micro-cloud-foundry.

    I should point out that at first we were looking to use micro cloud foundry as a platform that a cloud foundry system services developer could use for development. That isn’t the right platform for that task.

    The services developer can use either their own single-node cloud foundry deployment – non-bosh-based as described here (https://github.com/cloudfoundry/vcap), or they can use their own bosh-deployed cloud. I personally am using a combination of the two, the former when I am working on the details of the node and gateway, the latter when I am ready to create the deployment for a bosh-based cloud. Okay, I confess, for really simple stuff I go straight to my bosh-based cloud. It seems pretty daunting at first, but after a month with bosh, AND with how smart bosh is with incremental changes, it is actually quite effective.

Share Your Thoughts