This page describes the steps for adding a MongoDB staging and target environment.
Prerequisites
-
A MongoDB staging environment must be setup with the necessary requirements as described in MongoDB requirements and prerequisites.
-
Install MongoDB binaries on staging and target servers.
-
Installation of the MongoDB connector is required before the discovery operation.
-
The
$MONGO_PATHvariable must be set on the staging and target host using$HOME/.setDelphixMongoEnvandMONGO_REPO_CFGFILE, which contains the binary path of MongoDB using the below procedure.
Procedure
-
Login to the staging host as Delphix Continuous Data Engine OS user.
-
Create a file named .setDelphixMongoEnv in the home directory of Delphix Continuous Data Engine user.
touch $HOME/.setDelphixMongoEnv
-
Define the variable pointing to the config file for manual discovery of MongoDB instances. For example:
echo "MONGO_REPO_CFGFILE=<Delphix OS User Home directory>/.mongorepos.txt" > $HOME/.setDelphixMongoEnv
-
Define the full path to the MongoDB binary in file represented by
$MONGO_REPO_CFGFILE. For example:cv
source $HOME/.setDelphixMongoEnv
echo "MONGO_PATH=<mongodb installation home directory>/bin/mongod" > $MONGO_REPO_CFGFILE
-
If there are multiple version binaries, specify each in separate lines as shown below:
source $HOME/.setDelphixMongoEnv
echo "MONGO_PATH=<mongodb installation home directory>/bin/mongod" > $MONGO_REPO_CFGFILE
echo "MONGO_PATH=<mongodb installation home directory>/bin/mongod" >> $MONGO_REPO_CFGFILE
-
If the MongoDB database tools are installed at different location, specify the MongoDB tools path in separate lines as shown below:
source $HOME/.setDelphixMongoEnv
echo "MONGO_PATH=<mongodb installation home directory>/bin/mongod:<mongodb-database-tools directory>/bin" > $MONGO_REPO_CFGFILE
echo "MONGO_PATH=<mongodb installation home directory>/mongod:<mongodb-database-tools directory>/bin" >> $MONGO_REPO_CFGFILE
-
In a similar manner, more directories (such as directory containing MongoSync or
mongosh) corresponding to a repository can be added as shown below:
source $HOME/.setDelphixMongoEnv echo "MONGO_PATH=/u01/mongodb603/bin/mongod:/u01/mongodb603/mongodb-database-tools/bin:/u01/mongodb603/mongosync/bin:/u01/mongodb603/mongo-shell/bin" > $MONGO_REPO_CFGFILE
-
Login to the Delphix Management application.
-
Click Manage -> Environments.
-
Click the Actions ... menu and select Add Environment.
-
From the Add Environment dialog window, select Unix/Linux.
-
Select Standalone Host
-
Click Next.
-
Provide the name of the environment.
-
Provide the Host IP address or host FQDN.
-
Provide the SSH port. The default value is 22.
-
Choose the Login Type that fits your setup.
-
Username and Password – provide the environment username and password
-
Username and Public Key – provide the environment username
-
Password Vault – select from an existing Enterprise Password Vault
-
Provide an OS Username for the environment.
-
If Applicable, provide an OS Password for the environment..
-
For Password Login, click Validate to test the OS Username and OS Password.
-
Enter Toolkit Path (ensure that the toolkit path does not have any spaces).
-
To provide your own Oracle Java Development Kit, select the Provide my own JDK checkbox and click Next.
-
On the Java Development Kit page, provide an absolute path to your Oracle JDK and click Next.
-
-
Click Submit
Points to Remember while creating $MONGO_REPO_CFGFILE
-
Each line in the file represents a unique version of the installation. If there are multiple installations in an environment, the file will contain multiple lines.
-
The mandatory binaries for a successful discovery are
mongodandmongosh. -
Discovery of MongoDump, MongoRestore, and MongoSync are optional based on the dSource type.
-
Multiple paths for each repository can be separated (first priority given to first path provided) for discovering all the desired binaries listed above.
-
The path provided should contain the binary in the immediate directory. For example, for discovering
/u01/mongo603/database-tools/bin/mongorestore, the path provided should be/u01/mongo603/database-tools/bininstead of/u01/mongo603/database-tools.
Add a MongoDB environment via DCT
Add MongoDB source, staging, and target environments so DCT can host connector operations, dSources, and VDBs. Complete the pre-registration steps on each host before adding it in DCT.
Pre-registration steps (on each host)
-
Create a file named
.setDelphixMongoEnvin the home directory of the Delphix OS user and define theMONGO_REPO_CFGFILEvariable pointing to a config file (for example,~/.mongorepos.txt). -
In that config file, define the
MONGO_PATHvariable pointing to the mongod binary. -
Confirm the toolkit directory (for example,
/var/tmp) is writable by the OS user and has at least 1.5 GB of free space. -
Confirm that either netstat or ss is installed on the host.
Note: Only Unix/Linux hosts are supported for MongoDB environments. The OS and architecture of the staging and target host must match the source environment.
Procedure
-
Log in to DCT.
-
Open Infrastructure Connections.
-
Select + Infrastructure Connections.
-
On the Create Infrastructure Connection page, enter a Connection Name and select the CD Engine you connected earlier.
-
Click Next. On the Host & Server page:
-
Host OS: select Unix. MongoDB environments require Unix.
-
Server Type: select Standalone or Cluster based on your topology.
-
-
Click Next. On the Settings page, enter the following:
-
Host/IP Address: Hostname or IP address of the environment host.
-
SSH Port: SSH port for the host. Default: 22
-
Login Settings: Select Username and Password, then provide OS credentials.
-
Toolkit Path: Path to the persistent working directory (e.g. /var/tmp). Requires 0770 permissions and at least 1.5 GB of free space.
-
Java Development Kit: By default, Delphix installs its own JDK. Select Provide my own JDK to specify a path on the host.
-
-
Click Validate, confirm that validation succeeds, then click Next.
-
Review the Summary and click Submit.
Repeat this procedure for all required environments (source, staging, and target hosts). After adding each environment, refresh it to detect the uploaded connector toolkit.