Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.

Deploy a Replica Set

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 group must be unique. Failure to have unique names for the deployment items 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

1

Click Deployment, then the Processes tab.

2

Choose New Replica Set.

  1. Click the New Deployment dropdown menu.
  2. Select New Replica Set.
3

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.

  • To use any of your provisioned servers, enter a period (“.”).
  • To use a specific set of servers, enter a part of the hostnames corresponding to a regular expression you specify.
  • To use your local server, enter its hostname.

Example

You have provisioned three servers:

  • westdev-01a-mongodb.example.com
  • centraldev-01b-mongodb.example.com
  • eastdev-03e-mongodb.example.com

To create one replica set using all of these servers, you would enter .*\-mongodb\.example\.com.

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:

  • Change the number of votes the member has and
  • Change the member’s priority.

Click Add to add another member to the replica set.

Note

A replica set can have up to 50 members, but only 7 voting members. Set the number of voting members to an odd number to allow a majority vote for primary elections. For how to select voting members, see Non-Voting Members.

DB Directory Path Prefix Type the beginning of the system path to the database directory for this process. The default is /data.
4

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:

  1. Click Add Option.
  2. Select a Startup Option.
  3. Set an acceptable value for that Startup Option.

For descriptions of Advanced Options, see Advanced Options for MongoDB Deployments.

5

Click Apply.

6

Optional. Make changes before you deploy.

If needed, you can reconfigure processes and change the topology.

To modify settings for a MongoDB process:

  1. Click the Processes tab.
  2. On the line listing the process, click Modify.
  3. Make changes as desired and click Apply.

To move a process to a different server:

  1. 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.

  2. Drag and drop the process to a different server.

7

Click Review & Deploy to review your changes.

8

Review and approve your changes.

Ops Manager displays your proposed changes.

  1. If you are satisfied, click Confirm & Deploy.
  2. Otherwise, click Cancel and you can make additional changes.