Meet a Cloud Foundry BOSH Release for Replicated MongoDB Clusters

by Alexander BorovskySeptember 30, 2013
We are excited to introduce a new Cloud Foundry tool to help DevOps engineers easily create and scale MongoDB clusters with BOSH.

Scaling production clusters

Until recently, MongoDB used to be available on Cloud Foundry only as a developer service. It didn’t support any replication or sharding. However, today I enabled the BOSH tool chain to create replicated MongoDB clusters. Now, you can use BOSH to build ready-for-production environments. Sharding is not yet available, but will be implemented soon. You can find the code on my GitHub page.

The release may be useful for developers who want to test an application with MongoDB cluster support, as well as for system administrators and DevOps engineers aiming to easily create and reshape clusters.

 

How to use it

These brief steps can be used when creating a replicated cluster or adding a production cluster service for Cloud Foundry.

  1. First, you should install BOSH. You can find some examples here. To use this approach, you don’t need to install Cloud Foundry, you just need a small part of the platform (a message bus).
  2. Create a manifest for your MongoDB cluster. You can find a sample file in examples subdirectory.
  3. Upload the release to BOSH. You can do this by using bosh upload release releases/<last-release-number>.
  4. Deploy a cluster using the manifest:
    • bosh deployment <your deployment file>—selects a deployment file to upload
    • bosh deploy—applies the deployment manifest to the cluster
  5. When it finishes installation, you can check nodes addresses by using bosh vms.

We are planning that this BOSH release will also support sharded deployment and reshaping a cluster.

 

Want details? Watch the video!

I’ve also recorded this video tutorial explaining how to set up a MongoDB cluster with BOSH.

 

Further reading

 


The post is written by Alexander Borovsky and then edited by Alex Khizhniak and Hanna Kautur.