A newer version of this documentation is available.
View Latest (v2.0)

Installation steps

Gluesync NoSQL to SQL for MongoDB

Prerequisites

In order to have Gluesync working on your MongoDB instance you will need to have:

  • valid user credentials with permissions of reading, writing to the target database

Due to the way MongoDB users work, the user must be created on the target database.

Basic configuration example

This module can be customized by using a configuration file, in JSON format. The file name to use must be specified as parameter when launching the app, with the -f or --file tokens. The file should be composed by union of common configuration file (see here Installation steps) and source/destination specific configuration:

{
  ...
  "mongodb": {
    "enableRecursionProtection": false,
    "certificatesPath": "/path/to/certs/dir/yourcert.pem",
    "useDnsSeedList" : true,
    "timeoutSeconds": 60
  }
}

MongoDB specific configurations are listed under the mongodb property:

  • enableRecursionProtection: boolean that avoid recursion when two ways sync capability is configured on the same table. If entities are different from SQL to NoSQL configuration this field should be false in order to improve performance, if entities are the same this field must be set true to avoid recursion loop. Default value is false;

  • certificatesPath (optional): the path to the certificates that need to be used when connecting to MongoDB instance using a secure connection. If omitted, no certificates are used;

  • timeoutSeconds (optional): number of seconds to set as timeout for operations involving communication with MongoDB. Default value is 60 seconds.

  • useDnsSeedList (optional): set it to true in order to let the MongoDB SDK to retrieve the cluster definition from the srv record in the provided dns address, mandatory when you are performing a connection to MongoDB Atlas (for example)

Looking for data modelling features or other options?

For more detailed configurations options, including the ability to perform data modelling, please have a look at the dedicated Data modelling section when sourcing from NoSQL.

Deploying in MongoDB Atlas DBaaS

Gluesync it is fully compatible for working within MongoDB Atlas DBaaS. In order to enstablish a connection to a MongoDB Atlas Cluster you just need to have:

  • valid .pem certificate file;

  • the host name of your Atlas instance, for example: cluster0.instancereferencename.mongodb.net

credentials keypair it is not needed when connecting using a .pem certificate to your instance.