Skip to content

Instantly share code, notes, and snippets.

View jeriveromartinez's full-sized avatar

jeriveromartinez

View GitHub Profile
@jeriveromartinez
jeriveromartinez / start-mongo-replset.sh
Created September 19, 2018 02:19 — forked from joeytwiddle/start-mongo-replset.sh
Script to start a mongodb cluster with three shards, for MongoDB 3.4
#!/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: