Meet a Cloud Foundry BOSH Release for Replicated MongoDB Clusters
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.
- 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).
- Create a manifest for your MongoDB cluster. You can find a sample file in
examples
subdirectory. - Upload the release to BOSH. You can do this by using
bosh upload release releases/<last-release-number>
. - Deploy a cluster using the manifest:
bosh deployment <your deployment file>
—selects a deployment file to uploadbosh deploy
—applies the deployment manifest to the cluster
- 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
- How to Use MS SQL Server with Cloud Foundry v2 (New Service Broker Available)
- Building Cassandra as a Service with Cloud Foundry