Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

dev==pro

Sebastián Sassi
@ssassi
Pablo Ricco
@pricco

Problems

Multiple devs, projects & machines

First Step: VirtualEnv

virtualenv is a tool to create isolated Python environments.

$ virtualenv venv
$ source venv/bin/activate $ pip install Django ... $ deactivate

Setup Env: Puppet

puppet is a tool designed to manage the configuration of Unix-like and Microsoft Windows systems declaratively.

$ puppet apply dev.pp

Isolated Env: Vagrant

vagrant Create and configure lightweight, reproducible, and portable development environments.

$ vagrant up

Vagrant Puppet

Vagrant::Config.run do |config| config.vm.host_name = "dev_on_production" config.vm.box = "precise64" config.vm.box_url = "http://files.vagrantup.com/precise64.box" config.vm.forward_port 80, 8000 config.vm.share_folder "project", "/opt/devpro/source", "../." config.vm.provision :puppet do |puppet| puppet.manifests_path = "puppet" puppet.module_path = "puppet/modules" puppet.manifest_file = "dev.pp" puppet.options = "--verbose --debug" end end $ vagrant provision

Remote update? Fabric

fabric is a Python library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.

from fabric.api import run, env env.hosts = ['srv01.devpro.sophilabs.com', 'srv02.devpro.sophilabs.com'] env.user = 'devpro' def list(): run('ls') $ fab list
Dev
VM
Puppet VirtualEnv App
Vagrant
Test
VM
Puppet VirtualEnv App
Vagrant
Pro
Puppet VirtualEnv App
Fabric

Debug? Sure

Performance?

Summary

Thanks!

github.com/sophilabs/dev-on-production