- Create or Import a MongoDB Deployment >
- Deploy a Replica Set
Deploy a Replica Set¶
On this page
Overview¶
A replica set is a group of MongoDB deployments that maintain the same data set. Replica sets provide redundancy and high availability and are the basis for all production deployments. See the Replication Introduction in the MongoDB manual for more information about replica sets.
Use this procedure to deploy a new replica set managed by Ops Manager. After deployment, use Ops Manager to manage the replica set, including such operations as adding, removing, and reconfiguring members.
Unique Names for Deployment Items¶
Use a unique name for the replica set.
Important
Replica set, sharded cluster, and shard names within the same project must be unique. Failure to have unique names for the deployments will result in broken backup snapshots.
Prerequisites¶
You must provision servers onto which to deploy, and Ops Manager must have access to the servers.
Important
If you will run MongoDB Enterprise and provision your own Linux servers, then you must manually install a set of dependencies to each server before installing MongoDB. The MongoDB manual provides the appropriate command to install the dependencies. See the link for the server’s operating system:
Procedure¶
Click Deployment, then the Processes tab.¶
Choose New Replica Set.¶
- Click the Add New dropdown menu.
- Select New Replica Set.
Configure the replica set.¶
In the Replica Set Configuration section, complete the following fields.
Name | Type the name for your standalone MongoDB deployment. |
Version | Select the MongoDB version for your standalone MongoDB deployment. Note If the dropdown menu does not include the MongoDB version you want for your deployment, you must enable it in the Version Manager. |
Auth Schema Version | Select the schema for storing the user data for your deployment. If you are upgrading from a MongoDB version older than 3.0, MongoDB 3.0 uses a different schema for user data than previous versions. For compatibility information, see the Security Changes in the MongoDB 3.0 release notes. |
Feature Compatibility (Optional) | Select the feature compatibility set. This
field appears if your deployment MongoDB version is
3.4 or later. |
Eligible Server RegExp | Type a Perl-compatible regular expression that includes the hostnames of the servers to which Ops Manager deploys MongoDB.
Example You have provisioned three servers:
To create one replica set using all of these servers, you
would enter |
Eligible Port Range | Type lower and upper values of IANA port numbers for your MongoDB deployment. Ops Manager assigns each member of your replica set a port number within this range. |
MongoDs Per Replica Set | Set the number of mongods (members) you want in
your replica set. The default is 3 and the maximum is
50 . Only 7 members of a replica set can vote. |
Member Options | Configures replica set members. By default, each member is a voting member that bears data. You may select a new member type from the dropdown menu: You can change the election parameters of each member:
Click Add to add another member to the replica set. Note A replica set can have |
DB Directory Path Prefix | Type the beginning of the system path to the
database directory for this
process. The default is /data . |
Set any advanced configuration options for your MongoDB replica set.¶
In the Advanced Options section, add any additional runtime options you want to set for your MongoDB deployment.
To add an option:
- Click Add Option.
- Select a Startup Option.
- Set an acceptable value for that Startup Option.
For descriptions of Advanced Options, see Advanced Options for MongoDB Deployments.
Click Apply.¶
Optional. Make changes before you deploy.¶
If needed, you can reconfigure processes and change the topology.
To modify settings for a MongoDB process:¶
- Click the Processes tab.
- On the line listing the process, click Modify.
- Make changes as desired and click Apply.
To move a process to a different server:¶
Click the Servers tab.
Note
The colored bar on the right of each server indicates the replica set or sharded cluster to which the server belongs.
Drag and drop the process to a different server.
Click Review & Deploy to review your changes.¶
Click Confirm & Deploy to deploy your changes.¶
Otherwise, click Cancel and you can make additional changes.