Create Cluster In MongoDB Atlas

Create Cluster In MongoDB Atlas

In this post, we will learn to create a cluster in MongoDB Atlas. We will not learn what is MongoDB Atlas and why we need it in this post. So. let’s start creating a cluster directly.

Steps to create a cluster in MongoDB Atlas

  1. Click on the link https://account.mongodb.com/account/login and log in. If you don’t have an account already then create an account first.
Create Cluster In MongoDB Atlas 1 Login UI
  1. When you create your account it will create a default organization and project automatically.
Create Cluster In MongoDB Atlas 2

But in this tutorial, we will start by creating a new organization ourselves.

  1. Go to the top left and click on your default organization.
Create Cluster In MongoDB Atlas 3
  1. After clicking this a small popup displays. Click on View All Organizations.
Create Cluster In MongoDB Atlas 4
  1. After clicking this, you may see the following page. Click on Create New Organization button.
Create Cluster In MongoDB Atlas Image 5
  1. Type your organization name in the Name Your Organization field. Select MongoDB Atlas Service and click the Next button.
Create Cluster In MongoDB Atlas Image 6
  1. Click Create Organization button.
Create Cluster In MongoDB Atlas Image 7
  1. After creating the organization it will redirect to the Projects page from where we can create multiple projects. Click on New Project button.
Create Cluster In MongoDB Atlas Image 8
  1. Type your project name and click Next button.
Create Cluster In MongoDB Atlas Image 9
  1. If you want to add other members to your project you can add otherwise click Create Project button.
Create Cluster In MongoDB Atlas Image 10
  1. The project is created. Now, it’s time to deploy a database. Create on Build Database.
Create Cluster In MongoDB Atlas Image 11
  1. There are various types of deployments. In this tutorial, we will create a Shared cluster which is free. Choose Shared and click on Create.
Create Cluster In MongoDB Atlas Image 13
  1. It’s time to choose a cloud provider. In this step, I will choose AWS and Mumbai region. You can choose your preferred region.
Create Cluster In MongoDB Atlas Image 14
  1. Scroll down and leave Cluster Tier and Additional Settings as default. Since we are creating a free cluster we don’t have to change anything there.
    1. Click on Cluster Name and give it a Sandbox.
    2. Click Create Cluster button.
Create Cluster In MongoDB Atlas Image 15
  1. Next, we have to provide a database username and password in Security Quickstart to access our database. Give proper username and password and remember your password. Then click Create User button.
Create Cluster In MongoDB Atlas Image 16
  1. In the section Where would you like to connect from? Choose your environment. In this tutorial, we will be using Local Environment. If you want to connect to your cloud you can select Cloud Environment where you will set up VPC peering and other stuff to connect from your Cloud environment to Atlas.
    1. After choosing your environment, add your IP address from where you want to connect. If you want to make it public you can set 0.0.0.0/0. For the production environment, we are likely to avoid using 0.0.0.0/0. But for this example, we can add.
    2. Click on Add Entry button and click Finish and Close.
Create Cluster In MongoDB Atlas Image 19 1
  1. After clicking Finish and Close you may see a screen like the below. You can click on Goto To Database.
Create Cluster In MongoDB Atlas Image 20
  1. You may see a page below.
Create Cluster In MongoDB Atlas Image 21
  1. The great thing about Atlas is that it provides sample data sets to play with it. So, let’s load the sample data set in our database cluster. See the image below:
Create Cluster In MongoDB Atlas Image 22
  1. After clicking Load Sample Dataset you may see a popup with the sample data set size. Click on the Load Sample Dataset button.
Create Cluster In MongoDB Atlas Image 23
  1. It starts loading the sample data set. It may take a couple of minutes to load completely. When it is completed you may see the increased Data Size on the right side. Currently, the Data Size is 0.0 MB. The value will be changed once the data loading is finished.
Create Cluster In MongoDB Atlas Image 24
  1. After a couple of minutes, the loading process finishes and the data size will be increased. See the image below:
Create Cluster In MongoDB Atlas Image 25

Congratulations, you have successfully created a cluster and also loaded a sample data set into it.

Conclusion

In this post, we learn to create clusters in the Atlas by following the steps given. Now, you can visit another post to connect Atlas cluster using the shell command.


Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments