Test your MongoDB Shard:

Now we should have the shard nodes added to the system and ready to be utilized. We will try to import some dummy data into the newly setup cluster. You can download the dummy data from here. Please note you have to unzip before running following command.

$ mongoimport --host 172.16.1.3 --db reviews --collection reviewdatasets reviewdatasets.json
2019-01-21T14:17:38.956+0530 connected to: 172.16.1.3
2019-01-21T14:17:39.996+0530 imported 3741 documents

$ mongo --host 172.16.1.3
MongoDB shell version v3.6.5
connecting to: mongodb://172.16.1.3:27017/
MongoDB server version: 4.0.5
WARNING: shell and server versions do not match
Server has startup warnings: 
2019-01-21T14:15:06.914+0530 I CONTROL [main] 
2019-01-21T14:15:06.914+0530 I CONTROL [main] ** WARNING: Access control is not enabled for the database.
2019-01-21T14:15:06.914+0530 I CONTROL [main] ** Read and write access to data and configuration is unrestricted.
2019-01-21T14:15:06.914+0530 I CONTROL [main] ** WARNING: You are running this process as the root user, which is not recommended.
2019-01-21T14:15:06.914+0530 I CONTROL [main]
mongos> show databases
admin 0.000GB
config 0.001GB
reviews 0.004GB
mongos> use reviews
switched to db reviews
mongos> show tables
reviewdatasets
mongos> db.reviewdatasets.find().count()
3741

We have used Oracle Virtualbox to create our Virtual machines as mentioned above, but you can use as per your convenience it could be physical machines, VPS or similar. Please feel free to get back to us for any queries or support you might need.