My Grocery Book

Vagrant and Ansible the ultimate combo

So for the last few months I have been using Vagrant and Ansible for any new projects that I have to work on.

The idea behind vagrant is to allow you to isolate all the software requirements to run your code for different projects inside separate virtual machines. Vagrant makes it easier to work on different projects with conflicting requirements by isolating them in different virtual machines. For example, two different projects requiring different versions of MYSQL. It also has the added benefit of not cluttering your actual machine with all the projects unique and different software requirements.

Ansible is a powerful automation tool that allows you to easily setup new (and old) servers with the required software it needs. This makes setting up new enviroments a breeze.

The combination of Anisble and Vagrant is currently a real powerful way of setting up development enviroments quickly. If you add the Ansible scripts to your source control, you will have the changing requirements of your application setup in your source history.

I have recently taken the challenge of destroying my virtual machines every Monday and rebuilding it using Vagrant and Ansible. The idea being that I should be able to continue working within minutes and if that is not the case, updating the Ansible scripts with the required changes. This will help me make sure anything important required to work on the project is in source control, whether that be code, data or software setup.

This is currently my prefered method of working with the my-grocery-price-book-code. If you too are interested in this sort of setup, I recommended you take a look at
Vagrantfile and the Ansible Scripts of the my grocery price book code.

Also if you have not worked with either of the 2 before or would like to know more about them, I recommend you check out their Getting Started pages: Vagrant and Ansible

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s