Skip to Content

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:

MongoDB atlas configuration 0

Create a MongoDB cluster and cluster credentials

Follow these steps to create a MongoDB cluster to be used with the MongoDB connector:

  1. Click Databases on the left sidebar menu and click Build a Database:

    MongoDB atlas configuration 1

  2. Choose the cluster type that best fits your needs and select a Cloud Provider & Region:

    MongoDB atlas configuration 2

  3. 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:

    MongoDB atlas configuration 3

  4. When the cluster is available, the Security Quickstart view will be displayed where you will set up access to your cluster:

    MongoDB atlas configuration 4

    1. 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.

    2. 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.

    MongoDB atlas configuration 5

    1. 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.

    2. 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.

  5. A dialog box will display indicating that configuration is complete. Click Go to Databases to continue to the next step of configuration:

    MongoDB atlas configuration 6

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:

  1. 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.

    MongoDB atlas configuration 7

  2. The view will have you choose between two options: Load a Sample Dataset and Add My Own Data:

    MongoDB atlas configuration 8

    • 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:

      MongoDB atlas configuration 9

      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:

  1. 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:

    MongoDB atlas configuration 13

  2. A dialog box will display prompting you to add an IP Access List Entry. After one is specified, click Confirm to add more:

    MongoDB atlas configuration 14

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:

  1. 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:

    MongoDB atlas configuration 10

  2. A dialog box will display with connection options for your chosen cluster. Under Choose a connection method, click Connect your application:

    MongoDB atlas configuration 11

  3. A connection string will display under Add your connection string into your application code. The hostname is found between @ and /?:

    MongoDB atlas configuration 12

    The hostname in this example is cluster0.r7ss3rz.mongodb.net.

Note

See MongoDB's documentation on MongoDB Atlas for additional information.