The following is a general overview of the steps needed to deploy a sharded cluster. This overview is loosely based on the MongoDB documentation article Deploy a Sharded Cluster. The steps are summarized here:
- Confirm network communications
- Deploy the config server replica set
- Deploy the shard replica sets
- Start a mongos instance to represent the sharded cluster
- Restore data
- Add shards to the cluster
- Enable sharding for the target database
- Choose a shard key
- Shard the target collection
Before we start down this list, however, let's take a quick look at how to use Docker to model a sharded cluster for testing and development purposes.
Deploy a Sharded Cluster: https://docs.mongodb.com/manual/tutorial/deploy-shard-cluster/#deploy-a-sharded-cluster.