vagrant up, Issues down
platform as code for the research and learning environment
Austin Parker | @austinlparker for UAlbany Open Source Festival 2014
Setting the Stage
Imagine this scenario
Large, multidisciplinary research project or learning environment
Participants and colleagues scattered across non-geographically contiguous areas
Non-standard configurations of computing resources
* Analytics and data processing tools may fluctuate
* scipy 0.7 released 03/09, 8 major releases since then
* Each OS has different package managers and prebuilt toolchains, and these may also change and have features added/dropped
The Problem
How do we make sure everyone is working with the same tools?
The Solution
Infrastructure as Code
What is Infrastructure as Code?
- Programmatically automate infrastructure tasks
- Infrastructure - Hardware, Servers, Monitoring and Analytics Software, and more
IaC originates from DevOps, a software development strategy that integrates software developers and operations staff
What about tools, though?
A virtual server is nice and all, but we need more for our purposes
Introducing Platform As Code
- Extend the IaC model to include development tools and libraries
- Less support headaches, quickly onboard new contributors or learners
- Customize to your specific needs - target specific versions and lock
- Write Once, Run Anywhere - deploy locally or in the cloud
The Foundations of PaC
- vagrant
- Manage and provision virtualized development environments
- Simple configuration, easy to share files between host and client OS
- puppet
- Flexible and customizable automation framework
- Declarative, model-based approach to define the desired state of an environment
vagrant sets up vm's, puppet configures the desired end state of that vm. want the full scipy stack? puppet will do that. want a particular debian release? vagrant handles that. vagrant and puppet work together to get things doneGetting Started
Download Vagrant at http://www.vagrantup.com/downloads.html
Find a Vagrantbox at https://vagrantcloud.com/discover/featured
Initial Setup
mkdir vagrantcd vagrantvagrant box add hashicorp/precise32vagrant initmkdir vagrant/manifeststouch vagrant/manifests/default.ppFinal Notes
- Performance may be an issue, but you can deploy to the cloud
- VMWare user? You're in luck.
- Puppet and Vagrant are much deeper than what we've seen today
merssene prime gen on 384mb 1 core vbox to 4423 (140s), (54s) otherwise. google, aws have plugins. you can also tweak boxes to allocate more resources. vmware and other popular commercial virtualization packages work as well. vagrant and puppet are incredibly powerful as web tools - puppet a dev server w/your serverside extensions, work locally, preview. you can even share that vagrant through the internet and vagrant shareQuestions?
Note: You can find the sample files used in this presentation at my github