Tuesday, April 2, 2019

Set Up & Get Started with MongoDB Atlas Cluster

In this post we will go through the set up of MongoDB Atlas. MongoDB Atlas is fully managed, scalable, reliable and secure Database As A Service from MongoDB.

Below is the link to know more about Atlas.

https://www.mongodb.com/cloud/atlas

In this post we will go through, how easy it is to set up your MongoDB Atlas Instance and start working with MongoDB Database and Collections.

MongoDB Atlas supports latest version of MongoDB 4.x (Currently) and also has back support for 3.6

MongoDB Atlas provisions MongoDB Cluster on underlying infrastructure of cloud vendors. Currently it supports three cloud vendors - AWS, AZURE & GCP. You can leverage all the features of these cloud vendors while deploying MongoDB Atlas.

Ok So lets get started.

MongoDB Atlas lets create free MongoDB Cluster for M0 shape. You can register and get started to create your free Atlas Cluster.

Need to open url https://cloud.mongodb.com




Upon Login you will see below Console where you can access cloud resources like Clusters, Stitch, Charts, Backups.




Now we will go ahead and create a free tier 3 node MongoDB Atlas Cluster.

Click on Build Cluster from above screen.

The next screen will show various options which we need to select in order to create our cluster.

First one is selecting Cloud Provider and Region.



I would suggest to use the Free Tier Available for creating cluster free of charge.

Here we selected N.Virginia from AWS. You can select any region marked as Free Tier Available from any of the three cloud provider based on your requirement, skillset and strategy.

In Next section, we need to select the Cluster Tier.

Here we will select M0 Cluster to be in Free tier. You may select any shape for your environments based on your requirements. Price points are mentioned in the section.







Next section is Additional Settings and Cluster Name.

There are no Additional Settings which can be used with Free Tier Cluster. You may select these when you have a paid subscription.

Free tier cluster with MongoDB 4.0 with No Back Ups. For paid subscription you may select Backups and previous versions of MongoDB.




And thats it, You are all set to create a 3 node MongoDB Cluster on cloud. It will take 7-10 minutes to provision your 3 node Cluster. All installation, hardware provisioning, networking is all taken care of. At the end, you will have 3 node MongoDB to be used by your applications or to load data :)



The Cluster gets created.


Click on DemoCluster to see the 3 nodes which are part of the Cluster.

Now there are below tasks which needs to be performed in order to access the newly created Cluster.

  1. Create a user to access Database
  2. Create IP Whitelist to make sure which IP Address clients can access this Mongodb Cluster.
Go back to the Cluster page and select Security.

Click Add user and provide a username password. For this case let us give demouser as username.




Now create IP Whitelist. On same Security Tab, click on IP Whitelist and click Add IPAddress. In reality, you will use your office network CIDR and Subnet ranges.



We are all set.

Now we can connect to our 3 node MongoDB Atlas cluster.

Go to Cluster page and Click on Connect.


Click on the method you want to connect. For now we will select connect with mongo shell.


Select your OS. Mac in my case.

Click on copy to copy the string.


We are all set.

Go to the console and paste this command from BIN directory of mongo installation.



It asks password of the user which we created.


There you go, you can access database and start creating collections and connect to your applications.

Happy Playing around with MongoDB Atlas !!


10 comments:

  1. Do this hack to drop 2 lbs of fat in 8 hours

    Well over 160,000 men and women are hacking their diet with a easy and secret "liquid hack" to drop 1-2lbs each night in their sleep.

    It is very easy and it works with everybody.

    Here's how you can do it yourself:

    1) Go get a drinking glass and fill it with water half the way

    2) Proceed to follow this strange hack

    so you'll become 1-2lbs skinnier when you wake up!

    ReplyDelete
  2. The blog is very useful and informative thanks for sharing CCIE

    ReplyDelete
  3. This Article is amazing!!! I get lot of information. Thanks for sharing your great knowledge.
    Germany VPS Server Hosting

    ReplyDelete
  4. Tech is the most popular niche nowadays. But many peoples are not know how to Create a Tech blog. So we will tell you here some tips to create your Tech Blog.

    ReplyDelete
  5. Nice reading, This is an informative information, thanks for sharing this blog.
    Oracle Data Integration Training in Bangalore

    ReplyDelete
  6. I am very impressed with the article I have just read,so nice.. We are also providing the best services click on below links to visit our website.

    Oracle Fusion HCM Training
    Workday Training
    Okta Training
    Palo Alto Training
    Adobe Analytics Training

    ReplyDelete
  7. This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post.
    artificial intelligence internship | best final year projects for cse | internship certificate online | internship for mba finance students | internship meaning in tamil

    ReplyDelete
  8. I like this blog very much, Its a very nice billet to read and incur Info.

    B Sc 1st NC Result

    ReplyDelete