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
Depends of a Vagrant plugin called "librarian-puppet".
To install use:
vagrant plugin install vagrant-librarian-puppet
vagrant up
vagrant ssh db1
mongo
rs.initiate()
rs.conf()
rs.add("mongo1.replica")
rs.add("mongo2.replica")
Look at image below to see everything working.