MongoDB prerequisites¶
Introduction¶
These are the prerequisites for using the MongoDB connector with a MongoDB cluster and database:
All prerequisite tasks will require you to log in to your MongoDB account:
Create a MongoDB cluster and cluster credentials¶
Follow these steps to create a MongoDB cluster to be used with the MongoDB connector:
-
Click Databases on the left sidebar menu and click Build a Database:
-
Choose the cluster type that best fits your needs and select a Cloud Provider & Region:
-
Scroll down the page to verify or change the default values for Cluster Tier, Additional Settings, and Cluster Name. Click the Create Cluster button to start the cluster creation process:
-
When the cluster is available, the Security Quickstart view will be displayed where you will set up access to your cluster:
-
The How would you like to authenticate your connection? section is where you will set the Username and Password for a new admin on your cluster. Certificate authentication is not supported.
-
When complete, click the Create User button.
Important
Username and Password are used in the configuration of a MongoDB connector connection to connect to your cluster and database.
-
The Where would you would like to connect from? section is where you will set up allowlist information so that the MongoDB connector can access your cluster and database from Harmony.
-
Keep My Local Environment selected and add the Jitterbit cloud agent IP addresses that correspond to your region or the IP addresses of your private agents.
When both sections are complete, click the Finish and Close button.
Note
Settings defined in the Security Quickstart view can be changed later in Database Access and Network Access under Security in the left sidebar menu.
-
-
A dialog box will display indicating that configuration is complete. Click Go to Databases to continue to the next step of configuration:
Create a MongoDB database and collection¶
Follow these steps to create a MongoDB database associated with an existing cluster to be used with the MongoDB connector:
-
Click Databases on the left sidebar menu to view your clusters. Click the Browse Collections button associated with the specific cluster you'd like to set up a database in.
-
The view will have you choose between two options: Load a Sample Dataset and Add My Own Data:
-
Load a Sample Dataset: If you choose to load the sample dataset, sample data will be loaded into the cluster.
-
Add My Own Data: If you choose to add your own data, a dialog box will open to allow specifying the Database and Collection names:
You can then load data either by using the tools in MongoDB Atlas or later by using the MongoDB connector after configuring its connection.
Important
Both Load a Sample Dataset and Add My Own Data will create a database and collection in the cluster. A database and collection are required to use the MongoDB connector, and are specified during the configuration of a MongoDB connection and its activities, respectively.
-
Allowlist agent IP addresses¶
Note
If you followed Create a MongoDB cluster and cluster credentials and added the necessary IPs in the Security Quickstart, you can skip this prerequisite task.
Follow these steps to add Jitterbit agent IP addresses to your existing MongoDB cluster's allowlist:
-
Click Network Access on the left sidebar menu to view your clusters. Click the Add IP Addresses button to begin adding IPs to the allowlist:
-
A dialog box will display prompting you to add an IP Access List Entry. After one is specified, click Confirm to add more:
Allowlist cloud agents¶
If using a cloud agent group, add the Jitterbit cloud agent IP addresses that correspond to your region.
Allowlist private agents¶
If using private agents, add the IP addresses associated with them.
Obtain hostname information¶
Follow these steps to obtain the hostname required for the Host field in the MongoDB connector connection:
-
Click Databases on the left sidebar menu to view your clusters. Click the Connect button associated with the specific cluster you'd like to connect to:
-
A dialog box will display with connection options for your chosen cluster. Under Choose a connection method, click Connect your application:
-
A connection string will display under Add your connection string into your application code. The hostname is found between
@
and/?
:The hostname in this example is
cluster0.r7ss3rz.mongodb.net
.
Note
See MongoDB's documentation on MongoDB Atlas for additional information.