MongoDb Replica Set startup script

MongoDb Replica Set startup script

I was doing some development in Python agains a MongoDb backend, and I needed a quick way to set up and initialize a Mongo DB replica set.

This bash script is what I eventually came up with, still a bit rough around the edges (for example, it won’t let you choose the number of replicas, nor the ports or the hosts they’ll be listening on) but it’s good enough for a quick development environment, where the point is to interact with a replica set, not setting up something that you’d want to use in production.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s