Setting up and managing the MongoLab account

In this recipe, we will evaluate one of the vendors, MongoLab, that provides MongoDB as a service. This introductory recipe will introduce to you what MongoDB as a service is and then will demonstrate how to set up and manage an account in MongoLab (https://mongolab.com/).

In all the recipes in the book so far, we have covered setting up, administering, monitoring, and developing the instances of MongoDB in the organizational/personal premises. This not only needs manpower with the appropriate skill set to manage the deployments, but also appropriate hardware to install and run Mongo servers. This needs large investments up front that might not be a viable solution for start-ups or even organizations who are not clear on adopting or migrating to this technology. They might want to evaluate it and see how it goes before moving full-fledged to this solution. What would be ideal is to have a service provider who takes care of hosting the MongoDB deployments, managing and monitoring the deployments, and providing support. The organizations opting for these services need not invest up front to set up the servers or recruit or outsource to consultants for the administration and monitoring of the instances. All that one needs to do is choose the hardware and software platforms and configurations and an appropriate MongoDB version, and then set up an environment from a user-friendly GUI. It even gives you an option to use your existing cloud provider's servers.

We saw in brief what these vendor hosting services do and why they are needed; we will start this recipe by setting up an account with MongoLab and see some basic user and account management. MongoLab is by no means the only hosting provider for MongoDB. You can also look at http://www.mongohq.com/ and http://www.objectrocket.com/. At the time of writing this book, MongoDB themselves started providing MongoDB as a service on the Azure cloud and is currently in the beta phase.

How to do it…

  1. Visit https://mongolab.com/signup/ to sign up if you don't have an account created; just fill in the relevant details and create one account.
  2. Once the account has been created, click on the Account link in the top right corner:
    How to do it…
  3. Click on the Account Users tab at the top; it should be selected by default:
    How to do it…
  4. To add a new account, click on the + Add account user button. One pop-up window will ask for the username, e-mail ID, and password. Enter the relevant details and click on the Add button.
  5. Click on the user, and you should be navigated to a page where you can change the username, e-mail ID, and password. You can transfer the administrative rights to the user by clicking on the Change to admin button on this screen.
  6. Similarly, by clicking on your own user details, you have the option to change the username, e-mail ID, and password.
  7. Click on the Set up two-factor authentication button to activate the multifactor authentication using Google Authenticator. You need to have the Google Authenticator installed on your Android, iOS, or BlackBerry phone to proceed with the setting up of multifactor authentication.
  8. On clicking the button, we should see the QR code that can be scanned using Google Authenticator or, if scanning is not possible, click on the URL underneath the QR code, which should show the code. Set up a time-based account in the Google Authenticator manually. There are two types of Google Authenticator accounts, time-based and counter-based.
  9. Similarly, you can delete users from the accounts page by clicking on the cross next to the user's row in Account Users.

How it works…

There is not much to explain in this section. The setup process and user administration is pretty simple. Note that the users that we added here are not database users. These are the users that have access to the MongoLab account. Account can be the name of the organization and can be seen at the top of the screen. The multifactor authentication account setup in the Google Authenticator software on the handheld device should not be deleted as whenever the user logs in to the MongoLab account from the browser, he will be asked to enter the Google Authenticator account to continue.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset