Vagrant - SoftwareSandbox/Fiazard GitHub Wiki
Base box "latest" version caveat
We were not defining a specific version of our config.vm.box
which led new contributors to download a newer base box. Older contributors already had their environment set up and were using a "cached" version of the basebox. This, in turn, caused the provisioning in vagrant up
to fail because the manifests in our code repository were not matching the puppet version that came with the base box.
More specifically, our puppet manifests were written to Puppet 3.x.x, and with the newer basebox (1.0.2 of puppet/ubuntu14.0.4) came puppet 4.x.x which broke our provisioning of course.
We fixed it by defining our config.vm.box_version
to 1.0.1, the last basebox version that came pre-installed with Puppet 3.x.x.
The thing we learned is that there are actually two versioning systems diverging from each other. There's our puppet manifests in our code repository which are versioned, and there's vagrants base box which is versioned as well.
puppet-mongo caveat
After using the puppet mongo manifests I couldn't connect with Robomongo to my mongodb instance that was running in the Vagrant VM. This is because in the /etc/mongod.conf
file, the bind_ip
parameter should be either commented out, or set to 0.0.0.0
to listen to all nic's.
Documentation of the puppet mongo module says that the globals::bind_ip
should set this parameter, however after trial and error it doesn't seem to work. Using the server::bind_ip
config parameter did work.
Submodules and Travis
I also had to add the forked repo as a submodule instead of just cloning it into the repo and then pushing it back to github. This gave me some trouble with Travis build.
0.06s$ git clone --depth=50 --branch=master git://github.com/Sch3lp/Fiazard.git Sch3lp/Fiazard
Cloning into 'Sch3lp/Fiazard'...
remote: Counting objects: 393, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 393 (delta 3), reused 0 (delta 0)
Receiving objects: 100% (393/393), 98.21 KiB | 0 bytes/s, done.
Resolving deltas: 100% (103/103), done.
Checking connectivity... done.
$ cd Sch3lp/Fiazard
$ git checkout -qf 8e57b4c688a2e1e88ada2c43b27fcdf702154a55
0.05s$ git submodule init
Submodule 'vagrant' ([email protected]:Sch3lp/ubuntu1404-mongodb26.git) registered for path 'vagrant'
3.37s$ git submodule update
Cloning into 'vagrant'...
Warning: Permanently added the RSA host key for IP address '192.30.252.128' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Clone of '[email protected]:Sch3lp/ubuntu1404-mongodb26.git' into submodule path 'vagrant' failed
The command "eval git submodule update" failed. Retrying, 2 of 3.
So, since the git@github... url requires .ssh keys to be able to pull, we shouldn't use these url's but use public urls (git://github.com.....) instead. I also found this caveat in the Travis documentation.