Continuously integrating Perl projects with Vagrant
Source: YAPC::NA 2013 on the 2013-06-03.
Speaker: Mike Schilli
To make sure your Perl applications really install and work in new environments, they need to be tested in VMs created from scratch. But unless test and staging environments can be spun up quickly, automatically, and reproducably, that's not going to happen. Vagrant, a VM command line frontend, and provisioning tools like Puppet, Chef, Salt let you store your test VM configurations in your source control system alongside with your project, and make sure they evolve in lockstep.
Working at Yahoo!
- Unit Tests vs. Integration tests
- Infrastructure as Code
- What is Vagrant?
- Provisioning tools (Puppet, Chef, Salt)
Example and Demo
The Limitations of Unit Testing: there is no integration
you on your development box
- Full application stack installed
- Do it often and early as it is very costly to find out later if the parts don't fit together.
- Problem: Can't configure your devbox for many different project environments, can't have external systems on your laptop
Other People's code, other services, (Database services, MongoDB, etc.), different configurations.
Easy to spin up on many platforms, the step need to be documented how to set up a development or testing environment. It would be easier to just a command that will set up the environment.
The Vagrant file comes with your project. It is written in Ruby. There are pre-configure Virtual Boxes one can download from Vagrant Boxes.
Vagrant Magic Mount, to mount the directory /vagrant inside the Virtual Machine to the start directory on the host system.
- A testing framework for the Chef community