Skip to content

Instantly share code, notes, and snippets.

jeriveromartinez /
Created Sep 19, 2018 — forked from joeytwiddle/
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
# 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: