zeus
48afceb7a0
|
4 years ago | |
---|---|---|
.docker/mongodb | 4 years ago | |
images | 4 years ago | |
swarmlabconfig | 4 years ago | |
.env | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
connect.mongo.sh | 4 years ago | |
docker-compose.yml | 4 years ago | |
run.sh | 4 years ago | |
sample.env | 4 years ago | |
stop.sh | 4 years ago |
README.md
storage-mongo-replica
A replica set in MongoDB is a group of mongod processes that maintain the same data set. Replica sets provide redundancy and high availability, and are the basis for all production deployments.
##Replication in MongoDB
A replica set is a group of mongod instances that maintain the same data set. A replica set contains several data bearing nodes and optionally one arbiter node.
More here: https://docs.mongodb.com/manual/replication/
Quickstart
This is a quickstart guide of howto use this LabInstance storage-mongo-replica
HowTo use it
Default Configuration
-
Mongo Port: 27017
-
Mongo Root Username: swarmlab
-
Mongo Root Password: swarmlab
-
Mongo Database: app_swarmlab
-
Mongo Database Usename: app_swarmlab
-
Mongo Database Password: app_swarmlab
-
Mongo ReplicaSet: rs0
Test it!
MONGO_INITDB_ROOT_USERNAME=swarmlab MONGO_INITDB_ROOT_PASSWORD=swarmlab MONGO_INITDB_DATABASE=app_swarmlab MONGO_INITDB_USERNAME=app_swarmlab MONGO_INITDB_PASSWORD=app_swarmlab MONGO_REPLICA_SET_NAME=rs0
mongo "mongodb://localhost:30001,localhost:30002,localhost:30003/$MONGO_INITDB_DATABASE" -u $MONGO_INITDB_USERNAME mongo "mongodb://localhost:30001,localhost:30002,localhost:30003/app_swarmlab" -u app_swarmlab