- Create or Import a MongoDB Deployment >
- Deploy a Sharded Cluster
Deploy a Sharded Cluster¶
On this page
Overview¶
Sharded clusters provide horizontal scaling for large data sets and enable high throughput operations by distributing the data set across a group of servers. See the Sharding Introduction in the MongoDB manual for more information.
Use this procedure to deploy a new sharded cluster managed by Ops Manager. Later, you can use Ops Manager to add shards and perform other maintenance operations on the cluster.
Unique Names for Deployment Items¶
Use unique names for the new cluster and its shards.
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:
- Red Hat
- Ubuntu
- Debian
- SUSE
- Amazon AMI
Procedure¶
Click Deployment, then the Processes tab.¶
Choose New Cluster.¶
- Click the New Deployment dropdown menu.
- Select New Cluster.
Configure the sharded cluster.¶
In the Cluster 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 |
Data Node 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. |
# of Mongos | Type the number of mongos processes you want deployed for your cluster. |
Mongos Distribution | Select how you want your mongos processes deployed in your cluster:
|
Mongos Eligible Port Range | Type lower and upper values of IANA port numbers for your MongoDB deployment.
Ops Manager assigns each mongos a port number
within this range. The default port number is 27017 . |
# of Config Servers | Type the number of mongod processes you want
deployed for your config server replica set. The default is
3 and the maximum is 50 . Only 7 members of a
replica set can vote. |
Config Server Distribution | Select how you want your config server mongod processes deployed in your cluster:
Note A replica set can have |
Config Server 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. The default port number is 27019 . |
Config Server Replica Set Name | Type the name of the replica set. |
Configure the shards.¶
In the Shard Configuration section, complete the following fields.
Shard Count | Set the number of shards you want in your cluster. If you want
to distribute documents across a cluster, you must set this
number to 2 or more. |
MongoDs Per Shard | Set the number of mongod processes (replica set members) you want for each of your shards. |
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 shard. |
Shard Name Prefix | Type the prefix you want each shard name to include. |
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 sharded cluster.¶
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.¶
Review and approve your changes.¶
Ops Manager displays your proposed changes.
- If you are satisfied, click Confirm & Deploy.
- Otherwise, click Cancel and you can make additional changes.