These are the slides from a lightning talk I gave at a Showclix 'Engibeering' event. The talk described the purpose and usage of Vagrant, a tool for automating the creation and deployment of customized software development environments for projects.
* See more of my work at http://www.codehenge.net
4. Cause?
• Lack of parity between environments
throughout your dev process
• Devs:
– Prefer different OSs [Windows/Linux/OSX]
– Work on multiple projects
– They tinker…
– They install things…
11. So?
• Each application causes system divergence
– New libraries
– Conflicting versions of languages/frameworks
– Different network configs
12. The Ideal
• Unique development environment for each
project
• Identical environments for each developer
…Enter Vagrant
13. Vagrant
• Leverage virtualization and
automated system configuration
• Automatically create and seamlessly
manage custom development
environments
• Built on
– VirtualBox
– Chef/Puppet/scripts
16. Resources
• Gareth Rushgrove maintains a nice list of
Vagrant base boxes at
http://www.vagrantbox.es
• I have some examples on github:
https://github.com/cacois
17. Thank you
Feel free to contact me:
C. Aaron Cois
aaron.cois@gmail.com / @aaroncois
https://github.com/cacois
www.codehenge.net
Notes de l'éditeur
Hi everyone! I’m Aaron, and I’m here to talk to you about my favorite development problem…
The certified, 100% guaranteed build…that works on my dev machine. This is my favorite bit. Its funny every time. But think back to how many times you've heard it. Think back to how many times you've said it. How many hours have you lost to this situation? How much frustration? Worst case, there is one hop from a dev’s box to production, and you now have a non-functional build live. Best case, hours or days are spent debugging an issue in QA or staging that isn’t reproducible on the dev box.
This meme is due to a common process and workflow inconsistency in most software development shops. Each developer's machine is slightly different. Even if everyone uses the same OS, the same model, as soon as a developer starts tinkering, the divergence begins. On top of that, every development environment is different than the build environment, which is different than the production environment (talking specifically about web applications, here). But why? Why are these environments all different?
The reason is primarily that development metal is used for multiple things. Each machine becomes the development environment for multiple projects, past and present. Maybe your first project was a Django app…
…over time, you added Python 3, and has to use Bottle for its REST API due to compatibility issues with Django. You also picked up a c++ project, added a Redis DB to the Django project for real-time trending, and tried out Node, Erland, and Haskell…
And so it goes…
And that’s not to mention the…ahem, alternative exercises in mental acuity.
This probably doesn’t seem line a big deal, because we are very used to this scenario, but remember that each application may install its own version of a language or framework, may bring new libraries into the path, or may open new network ports.
What we really want is a new, unique environment for each project. Also, we'd like this environment to be quickly and easily reproducible, so an exact copy can be created for each developer, and potentially for the test, staging, and production environments. Enter Vagrant
Vagrant allows you to seamlessly create and use independent, customized virtual development environments for your various projects. Vagrant leverages VirtualBox on the backend to connect you to a customized virtual machine (via automated system configuration tools like Chef or Puppet), but through the clever use of drive mapping and NAT rules, you will never even have to see the virtual box console. Instead, you use your normal toolset from your host OS environment, including your browser and IDE. Vagrant will seamlessly connect to the terminal of your virtual environment form which you can access the command line tools and executable of the virtual environment.