Welcome to the Perl TV

Continuously integrating Perl projects with Vagrant

Length: 20:40 YAPC::NA 2013
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.

Speaker: Mike Schilli and Venkat Venkataraju.

Working at Yahoo!

Summary

  • 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

  • CI Pipeline

  • you on your development box

  • *

Integration tests

  • 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.

Virtual Machines

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.

Vagrant is command-line front-end for the open source VirtualBox.

The Vagrant file comes with your project. It is written in Ruby. There are pre-configure Virtual Boxes one can download from Vagrant Boxes.

vagrantbox add

vagrantbox up

Vagrant Magic Mount, to mount the directory /vagrant inside the Virtual Machine to the start directory on the host system.

Test kitchen

  • A testing framework for the Chef community

Test Kitchen integrates with Bats (Bash Automated Testing System) A TAP compatible test framework written in Bash