Requirements for MongoDB staging/target environments
The staging and target environments have the same set of requirements for MongoDB.
Network and connectivity requirements
Before proceeding further, ensure that you meet the general requirements for Delphix Engine network connectivity.
For MongoDB plugin specific network and connectivity requirements, refer to the sections below.
![image-20240201-020816.png](../../__attachments/205364889/image-20240201-020816.png?inst-v=9f5cd9ef-94fe-4677-b3c4-6c5d1617af5c)
SSH connectivity to the target host
Target environments are required to have
sshd
running and configured for the Delphix Continuous Data Engine to connect over SSH.The Delphix Continuous Data Engine platform expects to maintain long-running, highly performant SSH connections with the host environment.
Once connected to a target environment through SSH, the Delphix Continuous Data Engine initiates a MongoDB client connection (
mongosh
) from the target environment to the source environment.
Creating NFS mounts on target host
Delphix Continuous Data Engine shares its storage space with the target host using NFS mounts.
Protocol | Port Number | Use |
---|---|---|
TCP/UDP | 111 | Remote Procedure Call (RPC) port mapper used for NFSv3 mounts. |
TCP | 1110 | Network Status Monitor (NSM) client from target hosts to the Continuous Data Engine. |
TCP | 2049 | NFS client from target hosts to the Continuous Data Engine (NFSv3 and NFSv4). |
TCP | 54043 | Client mount daemon (NFSv3 only). |
TCP | 54044 | Lock state notification service (NFSv3 only). |
TCP | 54045 | Network Lock Manager (NLM) client from target hosts to Continuous Data Engine (NFSv3 only). |
UDP | 33434 - 33464 |
|
Connecting to MongoDB instances (source, staging database, VDBs)
Outgoing [From] | Incoming [To] | Protocol | Port Number | Use |
---|---|---|---|---|
Staging host | Source MongoDB instance | TCP | <source-port> | MongoDB source database instance port to connect to, for taking backup as well as setting up streaming replication. The default port for a MongoDB instance is 27017. |
End-user hosts | Target MongoDB instance (staging database instance or VDBs). | TCP | <target-port> | Connecting to the created database instance on the target host. |
Host environment requirements
Staging/target host requirements | Explanation |
Host compatibility check
| It is required that the source and the target environments should have identical operating system and hardware configurations. |
MongoDB installation and compatibility check
| The MongoDB binary version on the staging/target must be identical to the source side. |
There must be a directory on the staging/target host where the MongoDB connector support files can be installed (i.e. /var/tmp) with the following properties:
| This path is called the Toolkit Path on the Environment creation UI page. |
During VDB provisioning, there must be a mount point directory (i.e. /mnt) that will be used as the base for mount points – created with the following properties:
| N/A |
Hostname and IP address must be correctly set in the /etc/hosts file. | The output of
CODE
|
Required utilities and tools
| MongoDB connector checks the status of the running MongoDB instance and validates if ports are available on the staging/target host using the Check if the
|
Storage requirement |
|
Sudo privileges for the environment OS user
Delphix Continuous Data Engine connects to the target host (via SSH) to perform the following operations:
Delphix Continuous Data Engine dynamically mounts and unmounts directories for linking and provisioning operations. This privilege is required because mount and unmount are typically reserved for superuser.
Delphix Continuous Data Engine dynamically creates and removes directories for linking and provisioning operations.
The operations (1) and (2) will require sudo privileges for the OS user.
Configuring sudo access on target environments (as root user)
The sudo configuration exists in the /etc/sudoers file. To to add the privilege, you must edit this file either directly or by using a utility called
visudo
.vi /etc/sudoers
orvisudo
Run the command below to add the privileges.
Defaults:delphix_os !requiretty
delphix_os ALL=NOPASSWD: /bin/mount,/bin/umount,/bin/mkdir,/bin/rmdir, /bin/ps
The above examples are for illustrative purposes and the sudo file configuration options are subject to change.
Requiretty settings
Delphix Continuous Data Engine requires that the requiretty setting must be disabled for all Delphix Continuous Data Engine users with sudo privileges.
It is required to specify the NOPASSWD qualifier within the sudo configuration file, as shown in the above command. This ensures that the sudo
command does not demand the entry of a password, even for the "display permissions” (i.e. sudo -l
) command.
Additionally, Delphix OS users should meet the following criteria:
Regular OS user with primary group as
mongod
.Execute access on
mongosh
/mongod
binaries.Must have access to backup files of the source database stored on the staging host.
Must have execute access on all files within the MongoDB installation folder. The minimum permission level 775 is recommended.
mongosh
andmongod
binaries must be in the same folder (if required, create softlink).Ensure any login banners similar to the one in the image below are disabled on the staging host.