Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 825 Bytes

README.md

File metadata and controls

35 lines (22 loc) · 825 Bytes

mongo_replicaset

This project is a final environment created by Vagrant and Puppet for MongoDB cluster. Will be create 3 machines that contains an instance of MongoDB.

Machines are arranged as follows:

mongo0.replica - 192.168.33.20
mongo1.replica - 192.168.33.21
mongo2.replica - 192.168.33.22

Dependencies

Depends of a Vagrant plugin called "librarian-puppet".

To install use:

vagrant plugin install vagrant-librarian-puppet

Running

vagrant up

Configuring mongo replicasets

vagrant ssh db1
mongo
rs.initiate()
rs.conf()
rs.add("mongo1.replica")
rs.add("mongo2.replica")

Look at image below to see everything working.

alt tag