Is it a good practice to include your Vagrantfile inside your project repo?
In that way, I guess that any developer just needs to clone the repo and raise a new vm machine based on that Vagrantfile so he can have a whole dev environment ready, but I don't know if this is a the proper way of managing it.
Thanks in advance, Simon.
Absolutely, you've hit the nail on the head. The whole purpose of Vagrant is to provide an easy mechanism to spin up consistent environments for development.
There are circumstances where you might want to keep your Vagrant config in a separate repository, for example where you're bringing up multiple disparate services to create a complex environment. For any other use case I'd keep the Vagrant file in the main repository.
Another benefit of keeping it in the main repository is it's much easier to have your continuous build system spin up the VM, run the test suite against it, and then bring it down, so you know your VM is consistent AND stable :).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With