MongoDB installation and upgrade
Downloading the connector
The connector is provided as a zip file on the Delphix download site. Perform these steps to download the connector:
-
Launch a web browser and navigate to the Delphix download portal.
-
Login to the portal using customer support credentials.
-
Navigate to Delphix Product Releases -> Select Connectors -> MongoDB_Linux → v0.X.X (applicable version number) → click the sc_mongo_0.X.X.json file available to initiate the download.
Installing the connector
-
Login to the Delphix Management application.
-
This step displays the Upload or Upgrade a Plugin dialog. Upload the sc_mongo_0.X.X.json file.
For more information, refer to the Continuous Data Engine connector management page.
Upgrading the connector
Uploading a higher version connector is the same as installing the MongoDB connector.
Perform the following steps to upgrade a connector version:
-
Upload the higher version connector file at step 4 above.
-
Refresh all corresponding environments.
-
Ensure connector discovery is completed successfully.
-
Take a new snapshot of the staging database and VDB.
Datasets do not require a disable and re-enabled as part of the upgrade process. Only refresh of environments is required.
To verify the new version of the connector, view the snapshot metadata on the new snapshot.
To upgrade to newer versions of the MongoDB connector, you must follow the upgrade path as given below.
Currently Installed Version |
Recommended upgrade path |
1.0.x, 1.1.x, 1.2.x, 1.3.x |
Upgrade to 1.4.0 using the standard upgrade directions |
Things to consider during upgrade
-
$MONGO_REPO_CFGFILE
file update with connector upgrade-
After uploading the 1.1.0 MongoDB connector version, specify the MongoDB database tools path in
$MONGO_REPO_CFGFILE
. -
After uploading the 1.2.0 or later MongoDB connector version, specify all relevant paths for
mongosh
,mongod
,mongorestore
,mongodump
, andmongosync
in$MONGO_REPO_CFGFILE
. -
After uploading the 1.2.1 or later MongoDB connector version, replace the Legacy
mongo
shell with themongosh
shell on the staging and target environments, to make benefit of more shell features like MongoDB node.js driver support. -
Once complete, refresh the environment. Steps can be found in the Refresh an environment section in the Environment operations page before executing any other operation.
-
Upgrade to MongoDB connector v1.2.1 or later
If the dSource type is onlinemongodump.
-
Make sure that the Source MongoDB Host Connect String contains replica set to PRIMARY as a first node in the connection string.
-
For example, if Source MongoDB Host Connect String is set to
mongohost1.com:28501,mongohost2.com:28502,mongohost3.com:28503
, themongohost1.com:28501
must refers to the PRIMARY node of replica set.
-
-
If the source database is SSL/TLS enabled, modify the Source MongoDB Host Connect String using the following rules:
-
--ssl
should be replaced with--tls
-
--sslPEMKeyFile
should be replaced with--tlsCertificateKeyFile
-
--sslCAFile
should be replaced with--tlsCAFile
-
Upgrading the MongoDB database version on source and staging
Upgrade process
Perform the following steps when upgrading your MongoDB version.
-
On Staging and Target environments
-
Install newer MongoDB version on the Staging and Target Environments.
Specify location of new MongoDB version.
$ cat .mongorepos.txt
MONGO_PATH=/u01/mongo509/bin/mongod
MONGO_PATH=/u01/mongo6017/bin/mongod
-
-
Refresh Staging and Target environments to make sure the newly installed MongoDB repository is discovered.
-
Disable VDB and dSource.
-
Migrate dSource to newer repository.
- Login to Delphix Engine CLI.
$ ssh admin@dlpx-21000-mkk.dcol2.delphix.com (admin@dlpx-21000-mkk.dcol2.delphix.com) Password:: dlpx-21000-mkk.dcol2>
- Make sure newly added MongoDB version is displayed in the repositories.
dlpx-21000-mkk.dcol2> repository
dlpx-21000-mkk.dcol2 repository> ls
Objects
NAME VERSION ENVIRONMENT
'MongoDB - (version: v6.0.17) [/u01/mongo6017/bin/mongod]' - mkk-prod-src - Go to the
sourceconfig
and update the repository of the given dSource.dlpx-21000-mkk.dcol2 sourceconfig>
select offline_mongodb
dlpx-21000-mkk.dcol2 sourceconfig 'offline_mongodb'> update
dlpx-21000-mkk.dcol2 sourceconfig 'offline_mongodb'
update *> set repository="'MongoDB - (version: v6.0.17) [/u01/mongo6017/bin/mongod]'"
dlpx-21000-mkk.dcol2 sourceconfig 'offline_mongodb' update *> commit
Dispatched job JOB-44
SOURCE_CONFIG_UPDATE job started for "offline_mongodb".
SOURCE_CONFIG_UPDATE job for "offline_mongodb" completed successfully. - Make sure the repository has been successfully updated for the given
sourceconfig
.dlpx-21000-mkk.dcol2 sourceconfig 'offline_mongodb'> ls
Properties
type: AppDataStagedSourceConfig
name: offline_mongodb
discovered: false
environmentUser: delphix
linkingEnabled: true
parameters:
pretty_name: offline_mongodb
reference: APPDATA_STAGED_SOURCE_CONFIG-1
repository: 'MongoDB - (version: v6.0.17) [/u01/mongo6017/bin/mongod]'
toolkit: sc:mongopy - Go to Delphix Engine UI, enable dSource and take a new snapshot
- Login to Delphix Engine CLI.
-
Enable VDB and take a new snapshot.