Sign inSign up

zzzsochi/mongo-rs-controller

By zzzsochi

•Updated over 8 years ago

MongoDB Replica Set Controller

Image
0

1.3K

zzzsochi/mongo-rs-controller repository overview

⁠MongoDB Replica Set Controller

This is utility for controll MongoDB replica set⁠.

⁠Usage

⁠Initiate

This command initiate a replica set on all hosts resolved by this three names:

$ mongo_rs_controller.py mongo1 mongo2 mongo3

Each hostname can resolve with many IPs with mongo.

⁠Watching changes
$ mongo_rs_controller.py --watch mongo1 mongo2 mongo3
⁠Docker Swarm

Create replica set on four replicas of mongo and start watcher:

$ docker network create --driver=overlay mongo
$ docker service create --network=mongo --name=mongo --replicas=4 mongo mongod --replSet=rs
$ docker service create --network=mongo --name=mongo-rs-controller --replicas=1 zzzsochi/mongo-rs-controller --watch tasks.mongo

You can add or remove replicas and controller reconfigure replica set automatically.

Tag summary

Content type

Image

Digest

Size

34.2 MB

Last updated

over 8 years ago

docker pull zzzsochi/mongo-rs-controller