MongoDB Inc. has introduced lots of great new enterprise features with release 2.6 of MongoDB, however, one thing still absent is a desktop application to manage your database. Introducing Robomongo, the cross-platform and open source MongoDB management tool. With the following instructions you’ll see how easy it is to integrate RoboMongo with your ObjectRocket MongoDB instance.
Let’s get started! First we’re going to need to note down some details from the ObjectRocket Control Panel:
- Database connect string (note that the port is different for SSL vs non-SSL connections)
- Database username & password
Download and install Robomongo for your OS of choice (at the time of writing the most current version is 0.8.4, which is the release I’m basing these instructions on).
Now open Robomongo. Initially you’ll be greeted with the MongoDB Connections box, click the Create link in the top left of the screen.
After clicking the Create link above, you’ll see the following Connection Setting screen. I’ve named my instance ObjectRocket but you may want to use more specific naming if you have several databases.
In the Address field, enter the database connect string you noted down earlier. Remember that if you intend to connect via SSL, the target port will be different. Usually this is your plain text port + 10000, so for my example the plain text port is 23042 and the SSL port is 33042.
Now select the authentication tab and add the user credentials you noted down earlier.
If you prefer to use SSL, select the SSL tab at the top and tick Use SSL Protocol. ObjectRocket doesn’t currently support SSL Certificates so disregard that box.
Now press Test to confirm the settings are correct. If everything works you should see a Diagnostic message box similar to below.
Press Save to store your connection. Congratulations, you have successfully connected a great desktop MongoDB management application to your ObjectRocket instance!
But what if you’re using strict ACLs and you work from several locations or your home broadband does not have a static IP? You will have to keep adding your local (changing) public IP address to your instance ACLs in the ObjectRocket Control Panel before you can work with Robomongo.
Another method is to configure Robomongo to connect to your instance via a (Linux) server with a static IP (for example: one of your application servers, or a cloud server created to act as a proxy) using a SSH tunnel. The following instructions will guide you through the process.
First create yourself a user on a Linux server that has a static public IP. If this is not a server that is already allowed access via your ACL rule set, then remember to add this server’s IP address to your instance ACLs.
Generate a SSH public/private key pair and install the public part to the Linux server that will be our proxy host, an excellent article on how to configure SSH keys can be found here.
Now configure Robomongo to use our SSH proxy host and key.
Test your connection again, if the test completes without error press save to store your connection settings. You have successfully configured Robomongo to access your ObjectRocket instance via a proxy host over SSH.