Adding a MongoDB environment
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_PATH
variable must be set on the staging and target host using$HOME/.setDelphixMongoEnv
andMONGO_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
mongod
andmongosh
.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/bin
instead of/u01/mongo603/database-tools
.