Install MongoDB Atlas Applier
The steps in this section relate specifically to applying to a MongoDB Atlas Instance. For configuring the applier to work with standard MongoDB, please refer to the following section: "Install MongoDB Applier"
Installation of the MongoDB replication requires special configuration of the Source and Target hosts so that each is configured for the correct datasource type.
To configure the Applier replicators:
Before installing the applier, the following additions need adding to the extractor configuration. Apply the following parameter to the extractor configuration before installing the applier
Add the following to
/etc/tungsten/tungsten.ini[alpha]...Existing Replicator Config...enable-heterogeneous-service=trueshell> tpm updateNoteThe above step is only applicable for standalone extractors. If you are configuring replications from an existing Tungsten Cluster (Cluster-Extractor), follow the steps outlined here to ensure the cluster is configured correctly: "Replicating Data Out of a Cluster"
Unpack the Tungsten Replicator distribution in staging directory:
shell> tar zxf tungsten-replicator-8.0.4-132.tar.gzChange into the staging directory:
shell> cd tungsten-replicator-8.0.4-132Create the
/etc/tungsten/tungsten.iniusing the example below as a template.Example tungsten.ini[defaults]install-directory=/opt/continuentprofile-script=~/.bash_profiledisable-security-controls=falsermi-ssl=falsethl-ssl=falsermi-authentication=falserest-api-admin-user=apiuserrest-api-admin-password=secretreplicator-rest-api-address=0.0.0.0[alpha]master=sourcehostmembers=localhostdatasource-type=mongodbreplication-user=tungstenreplication-password=secretsvc-applier-filters=dropstatementdatarole=slavereplication-host=atlasendpoint.mongodb.netreplication-port=27017property=replicator.applier.dbms.connectString=mongodb+srv://${replicator.global.db.user}:${replicator.global.db.password}@${replicator.global.db.host}/?retryWrites=true&w=majorityShow argument definitions
install-directory=/opt/continuentInstallation directory.profile-script=~/.bash_profileAppend commands to include env.sh in this profile script.disable-security-controls=falseDisables all forms of security, including SSL, TLS and authentication.rmi-ssl=falseEnable SSL encryption of RMI communication on this host.thl-ssl=falseEnable SSL encryption of THL communication for this service.rmi-authentication=falseEnable RMI authentication for the services running on this host.rest-api-admin-user=apiuserSpecify the initial Admin Username for API access.Available from v7.0.0rest-api-admin-password=secretSpecify the initial Admin User Password for API access.rest-api-admin-passwordalias only available from version 7.1.2 onwards.Available from v7.0.0replicator-rest-api-address=0.0.0.0Address for the API to bind too.Available from v7.0.0Once the prerequisites and configuring of the installation has been completed, the software can be installed:
shell> ./tools/tpm install
If the installation process fails, check the output of the /tmp/tungsten-configure.log file for more information about the root cause.
The above example assumes SSL is not enabled between the extractor and applier replicators.
If SSL is required, then you must omit the following properties from the example configs displayed above, or change the values to true:
Once you have installed the replicator, there are a few more steps required to allow the replicator to be able to authenticate with MongoDB Atlas.
Import MongoDB Atlas Certificates
MongoDB Atlas requires TLS connections for all Atlas Clusters, therefore we need to configure the replicator to recognise this.
Obtain the LetsEncrypt root Certificate from here
Copy the certificate into a file called
letsencrypt.pemin the home directory of the applier host, including the BEGIN and END header/footer, for example:-----BEGIN CERTIFICATE-----xxxxxxxx-----END CERTIFICATE-----Using keytool, we now need to import this certificate into the truststore that was created during the replicator installation.
shell> keytool -import -alias letsencrypt -file letsencrypt.pem -keystore /opt/continuent/share/tungsten_truststore.tsWhen prompted, the default password for the truststore will be
tungstenunless you specified a different password during installationOnce this is complete, you can now start the replicator
shell> replicator start
Once the replicators have started, the status of the service can be checked using trepctl. See "Management and Monitoring of MongoDB Deployments" for more information.