TITLE: Create a MongoDB Atlas cluster 
AUTHORS: Mateusz Jundzill, Riccardo Spott, Mara Lohde, Martin Hölzer, Adrian Viehweger, Christian Brandt

[DESCRIPTION]
A step-by-step guide on setup process for MongoDB Atlas tailored for data administrators with limited IT knowledge. 

[STEPS]
SECTION: MongoDB Atlas set up
1. Create an account on MongoDB website.
SECTION: MongoDB Atlas set up
2. Create an organization. Select Create a new organization and name your organization with e.g. the name of the institute or the group responsible for data administration. In the Select Cloud Service window, choose MongoDB Atlas and proceed to the next step. In the final step, add additional members by sending invitation emails or proceed by selecting Create Organisation.

 

SECTION: MongoDB Atlas set up
3. Create a project.  Select New project and name the project. 
 
 
 


SECTION: MongoDB Atlas set up
4. Create a cluster. Select Build a database then Shared cluster tier and confirm by Create.
 
  

SECTION: MongoDB Atlas set up
4.1. Choose a cloud provider and region. Name your cluster in the Cluster Name section.
 

SECTION: MongoDB Atlas set up
4.2. Go to the Additional Settings tab and turn Termination Protection and confirm by selecting Create Cluster.
  
 

SECTION: MongoDB Atlas set up
5. Create user profiles. Go to the Database access tab and select Add New Database User.
  
SECTION: MongoDB Atlas set up
5.1. In the Password Authentication section, enter the name of the user (users can be created for each person accessing the database or for a specific function) and create a password. The password can either be autogenerated or entered manually.

  
 


SECTION: MongoDB Atlas set up
5.2. In the Database User Privileges section assign roles to the user,  you can use pre-prepared template roles such as Admin, Read/Write, and Read from the Built-in Role section. 

If there are multiple databases or collections, you can assign roles to specific elements of the cluster to fine-tune access in the Specific Privileges section.

 
 


SECTION: MongoDB Atlas set up
6. Limit IP addresses. Go to the Network Access tab. 

 
Depending on the security protocols three approaches can be chosen: 
1. Allow Access From Anywhere
2. Specify IP addresses in Access List Entry (the current machine can be added by selecting Add Current IP Address)
3. Select the IP address range in CIDR notation in Access List Entry
 

 
 

SECTION: MongoDB Atlas set up
7. Create a database and a collection. Go to the Database tab, choose Browse Collections and then Add My Own Data. Name your first database and collection.
 

 
 
SECTION: MongoDB Compass Access
8. Obtaining connection string. Go to the Database tab, pick Connect and then choose Connect using MongoDB Compass. Finally copy the connection string. 
  

SECTION: MongoDB Compass Access
9. Database access via MongoDB Compass. Download and install MongoDB Compass from MongoDB website. Copy the connection string obtained in   , and paste it in the URI box in MongoDB Compass, making sure to replace <username> and <password> with your credentials. Alternatively, you can fill in the username and password under the Advanced Connection Options section.
 
 
 


SECTION: Data import
10. Data import. Data import can be performed in two ways by using:
MongoDB Compass
Command line 
10.1. Prepare a CSV file for the input.  

The input file opened in a text editor should look like the given example:
 

10.2. Connect to the database as explained in the section  . Select Add Data.
 
Select Import File and choose the file that you want to upload data from. Pick CSV in the Select Input File Type section.

10.3. If the file is in the proper format, the Specify Fields and Types table should appear, which provides an overview of the imported data and allows for the specification of key types. Once you have verified the information, pick Import  to complete the process

  

10.4. Upon successful import, you should see a confirmation message stating Import completed. Verify the number of documents imported to ensure that the import was successful

  

SECTION: Data import
10.1. Enter the Docker container in the folder with the CSV file.

 
Execute command: