Skip to content

Instantly share code, notes, and snippets.

@jeriveromartinez
jeriveromartinez / start-mongo-replset.sh
Created Sep 19, 2018 — forked from joeytwiddle/start-mongo-replset.sh
Script to start a mongodb cluster with three shards, for MongoDB 3.4
View start-mongo-replset.sh
#!/usr/bin/env bash
set -e
# This script will start three shards, a config server and a mongos, all on the current machine.
#
# It was written for Mongo 3.4, based on https://docs.mongodb.com/manual/tutorial/deploy-shard-cluster/
#
# This script is only for testing purposes. In production, you would run each of these servers on a different machine.
#
# The first time you run it, pass this variable for the initial setup: