- Manage Deployments >
- Convert a Replica Set to a Sharded Cluster
Convert a Replica Set to a Sharded Cluster¶
Overview¶
Ops Manager provides the ability to convert a replica set to a sharded cluster.
Procedure¶
Click Deployment, then the Processes tab, then the Topology view.¶
Click the ellipsis icon then select Convert to Sharded Cluster.¶
Configure the sharded cluster.¶
Field | Action |
---|---|
Cluster Name | Specify the name of your new cluster. |
# of Mongos | Specify the number of MongoDB Shard routing services (mongos) you want in the cluster. Note See /core/sharded-cluster-components for how to configure a sufficient number of mongos for production and development configurations. |
mongos Distribution |
Specify where you want the mongos processes to be installed. |
Mongos Eligible Port Range | Specify the range of ports within which the mongos processes run. |
# of Config Servers | Specify the number of members in your configuration server replica set. Note The configuration server replica set should have at least three members for a production instance. |
Config Distribution | Specify where you want the configuration server members to be installed. |
Config Eligible Port Range | Specify the range of ports within which the configuration server’s mongod processes run. |
Config Server Replica Set Name | Specify the name of your configuration server replica set. |
Click Next.¶
Drag and drop the mongos
processes onto the available servers.¶
The mongos
processes can be placed on any of the servers
provisioned for your deployment.
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.
Modify your application to connect to the mongos processes instead of the replica set¶
After you convert a replica set to a sharded cluster, you can enable sharding for a database and shard collections. See convert-shard-collection for instructions on how to shard collections.
If you need to add additional shards to support greater capacity, click on the wrench menu for the sharded cluster to create additional shards.