Over a million developers have joined DZone.

Deploying MongoDB on OpenShift Flex

DZone's Guide to

Deploying MongoDB on OpenShift Flex

· Java Zone ·
Free Resource

Get the Edge with a Professional Java IDE. 30-day free trial.

OpenShift, a free, open source PaaS from Red Hat, allows you to use a MongoDB cartridge to simply deploy and manage applications with a MongoDB backend.





Nosh Petigara, Director of Product Strategy at 10gen (the company that sponsors and lends commercial support for MongoDB), has composed a tutorial that helps you to deploy MongoDB on OpenShift Flex. 

This exercise will require registration for Open Flex, and Amazon AWS credentials. The application is built on the Stripes framework. You can get the app source here, or grab the WAR file. You will also need Eclipse to build the project.

Here's the first step of the process:

1. Setup your cloud and cluster:

  • If you haven’t already done so, register for access to OpenShift Flex
  • Once you get confirmation that you are registered, login to the Flex console
  • Create a cluster with your Amazon AWS credentials from the “Cloud” tab.
  • Next, go to the “Clusters” tab and select the “Add Cluster” button.
  • If you have worked with OpenShift Flex before, then you've already done these steps. Otherwise, step-by-step instructions can be found in the Flex user guide located here.

If you haven't used MongoDB before, check out the mongodb.org site to learn more about the features of the database. A few useful links are:
    •    MongoDB Quickstart
    •    MongoDB Tutorial
    •    MongoDB with Java








For the full tutorial, Click here to get the steps (via the OpenShift forum).



Get the Java IDE that understands code & makes developing enjoyable. Level up your code with IntelliJ IDEA. Download the free trial.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}