SlideShare a Scribd company logo
1 of 55
Download to read offline
Configuration Management
for Development Environments

LRUG 8th August 2011


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/36144637@N00/159627088/
Gareth Rushgrove


gareth rushgrove | morethanseven.net
Blog at morethanseven.net


gareth rushgrove | morethanseven.net
Curate devopsweekly.com


gareth rushgrove | morethanseven.net
Problems


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/iancarroll/5027441664
1. Not all developers want to be sysadmins


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/34652102@N04/5059217055
2. New team members getting started time


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/34652102@N04/5059824808
3. Running a full set of services locally


gareth rushgrove | morethanseven.net        http://www.flickr.com/photos/biggreymare
4. Works on my machine


gareth rushgrove | morethanseven.net
⚡ brew info mysql
      mysql 5.5.14

      $ aptitude show mysql-server
      Package: mysql-server
      State: not installed
      Version: 5.1.41-3ubuntu12.10




Homebrew is great but...


gareth rushgrove | morethanseven.net
23 releases and 21 months in-between 5.1.41 and 5.5.14. Here’s
 some fixed bugs:

 -      An ORDER BY clause was bound to the incorrect substatement
        when used in UNION context.
 -      A NOT IN predicate with a subquery containing a HAVING clause
        could retrieve too many rows, when the subquery itself returned
        NULL.
 -      MIN(year_col) could return an incorrect result in some cases.

 And lots more




What’s a few versions between friends?


gareth rushgrove | morethanseven.net
Spot the cross platform bug (not the security flaw)


gareth rushgrove | morethanseven.net
⚡ ./server.rb &
      ⚡ curl "http://127.0.0.1:8181/?query=Bob"
      ⚡ curl "http://127.0.0.1:8181/?query=bob"
      ⚡ ls
      Bob
      ⚡ cat Bob
      Hello bob




On our Mac


gareth rushgrove | morethanseven.net
$ ./server.rb &
      $ curl "http://127.0.0.1:8181/?query=Bob"
      $ curl "http://127.0.0.1:8181/?query=bob"
      $ ls
      Bob bob
      $ cat Bob
      Hello Bob
      $ cat bob
      Hello bob




On Linux


gareth rushgrove | morethanseven.net
Solutions


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/34652102@N04/5059208501
Virtualisation


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/dawilson/2598713027
VirtualBox


gareth rushgrove | morethanseven.net
VMware


gareth rushgrove | morethanseven.net
Virtualisation needs powerful hardware


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/martinoc/477335951
What about editing code?


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/peteradams/2272928740
Shared Folders or NFS


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/34652102@N04/5059846582
Doubledown
Vim


gareth rushgrove | morethanseven.net
Vagrantup.com


gareth rushgrove | morethanseven.net
-      Automated virtual machine creation using Oracle’s VirtualBox
-      Automated provisioning of virtual environments using Chef or Puppet
-      Full SSH access to created environments
-      Assign a static IP to your VM, accessible from your machine
-      Forward ports to the host machine
-      Shared folders allows you to continue using your own editor
-      Package environments into distributable boxes
-      Completely tear down environment when you’re done
-      Easily rebuild a complete environment with a single command


What is Vagrant?


gareth rushgrove | morethanseven.net
Base boxes


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/dawilson/2793319903
VeeWee


gareth rushgrove | morethanseven.net
Community boxes


gareth rushgrove | morethanseven.net
⚡ gem install vagrant
      ⚡ vagrant box add lucid32 http://.../lucid32.box
      ⚡ vagrant init
      ⚡ vagrant up




Vagrant up


gareth rushgrove | morethanseven.net
⚡ ls
   Vagrantfile
   ⚡ vagrant up
   ⚡ vagrant ssh
   ⚡ vagrant reload
   ⚡ vagrant halt
   ⚡ vagrant destroy




Vagrant command line


gareth rushgrove | morethanseven.net
⚡ vagrant ssh-config
   Host default
     HostName 127.0.0.1
     User vagrant
     Port 2222
     IdentityFile /Users/.../vagrant-0.8.2/keys/vagrant
     ...




Export SSH configuration


gareth rushgrove | morethanseven.net
Vagrant::Config.run do |config|
              config.vm.box = "lucid32"
            end




Vagrantfile


gareth rushgrove | morethanseven.net
Vagrant::Config.run do |config|
     config.vm.forward_port("web", 80, 8080)
     config.vm.forward_port("ftp", 21, 4567)
     config.vm.forward_port("ssh", 22, 2222, :auto => true)
   end




Port forwarding


gareth rushgrove | morethanseven.net
Vagrant::Config.run do |config|
     config.vm.share_folder("folder", "/guest", "../host")
   end




Shared folders


gareth rushgrove | morethanseven.net
Vagrant::Config.run do |config|
     config.vm.define :web do |web_config|
       web_config.vm.box = "web"
       web_config.vm.forward_port("http", 80, 8080)
     end

     config.vm.define :db do |db_config|
       db_config.vm.box = "db"
       db_config.vm.forward_port("db", 3306, 3306)
     end
   end




Multiple VMs in one file


gareth rushgrove | morethanseven.net
Vagrant::Config.run do |config|
     config.vm.boot_mode      = :gui
     config.ssh.forward_agent = true
     config.vm.customize do |vm|
       vm.memory_size = 512
     end
   end




Lots more options


gareth rushgrove | morethanseven.net
Puppet


gareth rushgrove | morethanseven.net
Vagrant::Config.run do |config|
               config.vm.provision :puppet do |puppet|
                 puppet.manifests_path = "puppetmanifests"
                 puppet.manifest_file = "newbox.pp"
               end
             end




Vagrant provisioning with Puppet


gareth rushgrove | morethanseven.net
Chef


gareth rushgrove | morethanseven.net
Vagrant::Config.run do |config|
               config.vm.provision :chef_solo do |chef|
                 chef.add_recipe     = "garethr"
                 chef.cookbooks_path = “cookbooks”
               end
             end




Vagrant provisioning with Chef


gareth rushgrove | morethanseven.net
Vagrant::Config.run do |config|
               config.vm.provision :chef_solo do |chef|
                 chef.roles_path = "roles"
                 chef.add_role("vm")
               end
             end




Specifying Chef roles


gareth rushgrove | morethanseven.net
Vagrant::Config.run do |config|
   config.vm.provision :chef_solo do |chef|
     chef.recipe_url = "http://github.com/cookbooks.tar.gz"
     chef.add_recipe "garethr"
     chef.cookbooks_path = [:vm, "cookbooks"]
     chef.json.merge!({ :garethr => {
       :ohmyzsh => "https://github.com/.../oh-my-zsh.git",
       :dotvim => "https://github.com/garethr/dotvim.git"
     }})
   end
 end



Remote file


gareth rushgrove | morethanseven.net
-      Vagrant Hosts - https://github.com/dwt/vagrant-hosts
-      Sahara - https://github.com/jedi4ever/sahara
-      Vagrantboxes - https://github.com/garethr/ruby-vagrantboxes




Plugins


gareth rushgrove | morethanseven.net                  http://www.flickr.com/photos/s3a/4710416678
Local configuration management


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/crustyscumbrothersontour/2674351601
-      I want my development environment everywhere
-      I don’t want a wiki page of instructions
-      I don’t want to have to manually install everything
-      I don’t want to care about destroying a virtual machine
-      So I have a simple Chef cookbook to bootstrap my machines




Real world example


gareth rushgrove | morethanseven.net
⚡ cd /m/somefolder
   ⚡ tree
   ├── Vagrantfile
   └── cookbooks
       └── garethr
           ├── attributes
           │   └── default.rb
           ├── files
           │   └── default
           │       └── zshrc
           └── recipes
               └── default.rb


Chef cookbook layout


gareth rushgrove | morethanseven.net
%w{zsh wget curl lynx
             git-core ack-grep vim-nox
             dvtm build-essential tree}.each do |pkg|
               package pkg do
                 action :install
               end
             end




Packages I like


gareth rushgrove | morethanseven.net
git "/home/vagrant/.oh-my-zsh" do
                repository node[:garethr][:ohmyzsh]
                action :checkout
                user "vagrant"
                group "vagrant"
              end

              cookbook_file "/home/vagrant/.zshrc" do
                source "zshrc"
                owner "vagrant"
                group "vagrant"
              end



My shell configs


gareth rushgrove | morethanseven.net
default[:garethr][:dotvim] =
             "https://github.com/carlhuda/janus.git"

          default[:garethr][:ohmyzsh] =
             "https://github.com/robbyrussell/oh-my-zsh.git"




Attributes


gareth rushgrove | morethanseven.net
git "/home/vagrant/.vim" do
                repository node[:garethr][:dotvim]
                action :checkout
                user "vagrant"
              end

              execute "build janus" do
                command "rake"
                user "vagrant"
                cwd "/home/vagrant/.vim"
                environment ({'HOME' => '/home/vagrant'})
                creates "/home/vagrant/.vimrc"
              end


My Vim configs


gareth rushgrove | morethanseven.net
require "chefspec"

              describe "garethr" do
                before(:all) do
                  @chef_run = ChefSpec::ChefRunner.new
                  @chef_run.converge "garethr"
                end

                it "should install zsh" do
                  @chef_run.should install_package "zsh"
                end
              end



Testing with ChefSpec


gareth rushgrove | morethanseven.net
-      The Chef Server
-      Roles and Environments
-      Knife and Shef
-      Splitting the one file into multiple cookbooks
-      Managing running services
-      Simplifying cookbooks by creating system packages
-      Supporting different operating systems
-      The Chef architecture
-      Testing with Cucumber-Chef



Awesome things I ignored


gareth rushgrove | morethanseven.net
-      Using Virtualisation catches bugs early
-      Using Vagrant makes using virtual machines pleasurable
-      Storing configuration as code makes it shareable
-      Able to apply development best practice to dev environments




Conclusions


gareth rushgrove | morethanseven.net
-      IRC - #vagrant on Freenode
-      Github Issues - https://github.com/mitchellh/vagrant/issues
-      Google Groups - http://groups.google.com/group/vagrant-up




More information


gareth rushgrove | morethanseven.net
Questions?


gareth rushgrove | morethanseven.net   http://flickr.com/photos/psd/102332391/

More Related Content

What's hot

Time tested php with libtimemachine
Time tested php with libtimemachineTime tested php with libtimemachine
Time tested php with libtimemachineNick Galbreath
 
NLIT 2011: Chef & Capistrano
NLIT 2011: Chef & CapistranoNLIT 2011: Chef & Capistrano
NLIT 2011: Chef & Capistranonickblah
 
Capistrano 2 Rocks My World
Capistrano 2 Rocks My WorldCapistrano 2 Rocks My World
Capistrano 2 Rocks My WorldGraeme Mathieson
 
The Challenges of Container Configuration
The Challenges of Container ConfigurationThe Challenges of Container Configuration
The Challenges of Container ConfigurationGareth Rushgrove
 
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and VarnishMagento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and VarnishYireo
 
Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)Puppet
 
Service workers
Service workersService workers
Service workersjungkees
 
Deploying Drupal using Capistrano
Deploying Drupal using CapistranoDeploying Drupal using Capistrano
Deploying Drupal using CapistranoJochen Verdeyen
 
Chef, Vagrant, and VirtualBox
Chef, Vagrant, and VirtualBoxChef, Vagrant, and VirtualBox
Chef, Vagrant, and VirtualBoxJason Vanderhoof
 
THE RED METHOD: HOW TO INSTRUMENT YOUR SERVICES
THE RED METHOD: HOW TO INSTRUMENT YOUR SERVICESTHE RED METHOD: HOW TO INSTRUMENT YOUR SERVICES
THE RED METHOD: HOW TO INSTRUMENT YOUR SERVICESInfluxData
 
DevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and WebminDevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and Webminpostrational
 
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...Stacey Whitney
 
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014Puppet
 
Going crazy with Varnish and Symfony
Going crazy with Varnish and SymfonyGoing crazy with Varnish and Symfony
Going crazy with Varnish and SymfonyDavid de Boer
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
PyCon US 2012 - Web Server Bottlenecks and Performance Tuning
PyCon US 2012 - Web Server Bottlenecks and Performance TuningPyCon US 2012 - Web Server Bottlenecks and Performance Tuning
PyCon US 2012 - Web Server Bottlenecks and Performance TuningGraham Dumpleton
 
Getting Started with Puppet on Windows - PuppetConf 2014
Getting Started with Puppet on Windows - PuppetConf 2014Getting Started with Puppet on Windows - PuppetConf 2014
Getting Started with Puppet on Windows - PuppetConf 2014Puppet
 

What's hot (20)

Time tested php with libtimemachine
Time tested php with libtimemachineTime tested php with libtimemachine
Time tested php with libtimemachine
 
NLIT 2011: Chef & Capistrano
NLIT 2011: Chef & CapistranoNLIT 2011: Chef & Capistrano
NLIT 2011: Chef & Capistrano
 
Capistrano 2 Rocks My World
Capistrano 2 Rocks My WorldCapistrano 2 Rocks My World
Capistrano 2 Rocks My World
 
vBACD - Introduction to Opscode Chef - 2/29
vBACD - Introduction to Opscode Chef - 2/29vBACD - Introduction to Opscode Chef - 2/29
vBACD - Introduction to Opscode Chef - 2/29
 
The Challenges of Container Configuration
The Challenges of Container ConfigurationThe Challenges of Container Configuration
The Challenges of Container Configuration
 
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and VarnishMagento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish
 
Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)
 
Service workers
Service workersService workers
Service workers
 
Deploying Drupal using Capistrano
Deploying Drupal using CapistranoDeploying Drupal using Capistrano
Deploying Drupal using Capistrano
 
Chef, Vagrant, and VirtualBox
Chef, Vagrant, and VirtualBoxChef, Vagrant, and VirtualBox
Chef, Vagrant, and VirtualBox
 
THE RED METHOD: HOW TO INSTRUMENT YOUR SERVICES
THE RED METHOD: HOW TO INSTRUMENT YOUR SERVICESTHE RED METHOD: HOW TO INSTRUMENT YOUR SERVICES
THE RED METHOD: HOW TO INSTRUMENT YOUR SERVICES
 
DevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and WebminDevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and Webmin
 
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...
 
Front-end tools
Front-end toolsFront-end tools
Front-end tools
 
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
 
Going crazy with Varnish and Symfony
Going crazy with Varnish and SymfonyGoing crazy with Varnish and Symfony
Going crazy with Varnish and Symfony
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Service workers
Service workersService workers
Service workers
 
PyCon US 2012 - Web Server Bottlenecks and Performance Tuning
PyCon US 2012 - Web Server Bottlenecks and Performance TuningPyCon US 2012 - Web Server Bottlenecks and Performance Tuning
PyCon US 2012 - Web Server Bottlenecks and Performance Tuning
 
Getting Started with Puppet on Windows - PuppetConf 2014
Getting Started with Puppet on Windows - PuppetConf 2014Getting Started with Puppet on Windows - PuppetConf 2014
Getting Started with Puppet on Windows - PuppetConf 2014
 

Viewers also liked

Social Media Risk and Reputation Management
Social Media Risk and Reputation ManagementSocial Media Risk and Reputation Management
Social Media Risk and Reputation ManagementClaudiu Popa
 
Dev opsdays scriptcode
Dev opsdays scriptcodeDev opsdays scriptcode
Dev opsdays scriptcodeDevopsdays
 
Communications Between Tribes
Communications Between TribesCommunications Between Tribes
Communications Between TribesGareth Rushgrove
 
introduction to python
introduction to pythonintroduction to python
introduction to pythonSardar Alam
 
DevOps at DreamLab
DevOps at DreamLabDevOps at DreamLab
DevOps at DreamLabDreamLab
 
Two Sides of Google Infrastructure for Everyone Else
Two Sides of Google Infrastructure for Everyone ElseTwo Sides of Google Infrastructure for Everyone Else
Two Sides of Google Infrastructure for Everyone ElseGareth Rushgrove
 

Viewers also liked (7)

Social Media Risk and Reputation Management
Social Media Risk and Reputation ManagementSocial Media Risk and Reputation Management
Social Media Risk and Reputation Management
 
Dev opsdays scriptcode
Dev opsdays scriptcodeDev opsdays scriptcode
Dev opsdays scriptcode
 
Ruby
RubyRuby
Ruby
 
Communications Between Tribes
Communications Between TribesCommunications Between Tribes
Communications Between Tribes
 
introduction to python
introduction to pythonintroduction to python
introduction to python
 
DevOps at DreamLab
DevOps at DreamLabDevOps at DreamLab
DevOps at DreamLab
 
Two Sides of Google Infrastructure for Everyone Else
Two Sides of Google Infrastructure for Everyone ElseTwo Sides of Google Infrastructure for Everyone Else
Two Sides of Google Infrastructure for Everyone Else
 

Similar to Config managament for development environments ii

Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for DevelopersAntons Kranga
 
Dev ninja -> vagrant + virtualbox + chef-solo + git + ec2
Dev ninja  -> vagrant + virtualbox + chef-solo + git + ec2Dev ninja  -> vagrant + virtualbox + chef-solo + git + ec2
Dev ninja -> vagrant + virtualbox + chef-solo + git + ec2Yros
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slidesharetomcopeland
 
You're Going To Need A Bigger Toolbox
You're Going To Need A Bigger ToolboxYou're Going To Need A Bigger Toolbox
You're Going To Need A Bigger ToolboxGareth Rushgrove
 
Minicurso de Vagrant
Minicurso de VagrantMinicurso de Vagrant
Minicurso de VagrantLeandro Nunes
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
How to stay sane during your Vagrant journey
How to stay sane during your Vagrant journeyHow to stay sane during your Vagrant journey
How to stay sane during your Vagrant journeyJakub Wadolowski
 
Quick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with VagrantQuick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with VagrantJoe Ferguson
 
Chef Workshop: Setup Environment with Chef,Vagrant, and Berkshelf
Chef Workshop: Setup Environment with Chef,Vagrant, and BerkshelfChef Workshop: Setup Environment with Chef,Vagrant, and Berkshelf
Chef Workshop: Setup Environment with Chef,Vagrant, and BerkshelfJun Sakata
 
GTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceGTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceForest Mars
 
Control your deployments with Capistrano
Control your deployments with CapistranoControl your deployments with Capistrano
Control your deployments with CapistranoRamazan K
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabSoftware Guru
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantAntons Kranga
 
Jedi Mind Tricks for Git
Jedi Mind Tricks for GitJedi Mind Tricks for Git
Jedi Mind Tricks for GitJan Krag
 
Vagrant & Reusable Code
Vagrant & Reusable CodeVagrant & Reusable Code
Vagrant & Reusable CodeCorley S.r.l.
 
Vagrant WordCamp Hamilton
Vagrant  WordCamp HamiltonVagrant  WordCamp Hamilton
Vagrant WordCamp HamiltonPaul Bearne
 
Vagrant-Overview
Vagrant-OverviewVagrant-Overview
Vagrant-OverviewCrifkin
 

Similar to Config managament for development environments ii (20)

Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for Developers
 
Dev ninja -> vagrant + virtualbox + chef-solo + git + ec2
Dev ninja  -> vagrant + virtualbox + chef-solo + git + ec2Dev ninja  -> vagrant + virtualbox + chef-solo + git + ec2
Dev ninja -> vagrant + virtualbox + chef-solo + git + ec2
 
vagrant-php
vagrant-phpvagrant-php
vagrant-php
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
 
FreeBSD: Dev to Prod
FreeBSD: Dev to ProdFreeBSD: Dev to Prod
FreeBSD: Dev to Prod
 
You're Going To Need A Bigger Toolbox
You're Going To Need A Bigger ToolboxYou're Going To Need A Bigger Toolbox
You're Going To Need A Bigger Toolbox
 
Minicurso de Vagrant
Minicurso de VagrantMinicurso de Vagrant
Minicurso de Vagrant
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
How to stay sane during your Vagrant journey
How to stay sane during your Vagrant journeyHow to stay sane during your Vagrant journey
How to stay sane during your Vagrant journey
 
Quick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with VagrantQuick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with Vagrant
 
Chef Workshop: Setup Environment with Chef,Vagrant, and Berkshelf
Chef Workshop: Setup Environment with Chef,Vagrant, and BerkshelfChef Workshop: Setup Environment with Chef,Vagrant, and Berkshelf
Chef Workshop: Setup Environment with Chef,Vagrant, and Berkshelf
 
GTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceGTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSource
 
Control your deployments with Capistrano
Control your deployments with CapistranoControl your deployments with Capistrano
Control your deployments with Capistrano
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: Vagrant
 
EC2
EC2EC2
EC2
 
Jedi Mind Tricks for Git
Jedi Mind Tricks for GitJedi Mind Tricks for Git
Jedi Mind Tricks for Git
 
Vagrant & Reusable Code
Vagrant & Reusable CodeVagrant & Reusable Code
Vagrant & Reusable Code
 
Vagrant WordCamp Hamilton
Vagrant  WordCamp HamiltonVagrant  WordCamp Hamilton
Vagrant WordCamp Hamilton
 
Vagrant-Overview
Vagrant-OverviewVagrant-Overview
Vagrant-Overview
 

More from Gareth Rushgrove

Message Queues for Web Applications
Message Queues for Web ApplicationsMessage Queues for Web Applications
Message Queues for Web ApplicationsGareth Rushgrove
 
Beyond basic web development
Beyond basic web developmentBeyond basic web development
Beyond basic web developmentGareth Rushgrove
 
Self Education for Web Professionals
Self Education for Web ProfessionalsSelf Education for Web Professionals
Self Education for Web ProfessionalsGareth Rushgrove
 
What to Build with Google App Engine
What to Build with Google App EngineWhat to Build with Google App Engine
What to Build with Google App EngineGareth Rushgrove
 
App Engine for Python Developers
App Engine for Python DevelopersApp Engine for Python Developers
App Engine for Python DevelopersGareth Rushgrove
 
Testing Django Applications
Testing Django ApplicationsTesting Django Applications
Testing Django ApplicationsGareth Rushgrove
 
Design Strategies for a Distributed Web
Design Strategies for a Distributed WebDesign Strategies for a Distributed Web
Design Strategies for a Distributed WebGareth Rushgrove
 
Things you probably don't do (or tying to make project automation sexy)
Things you probably don't do (or tying to make project automation sexy)Things you probably don't do (or tying to make project automation sexy)
Things you probably don't do (or tying to make project automation sexy)Gareth Rushgrove
 
Notes from (Web 2.0) Revolution
Notes from (Web 2.0) RevolutionNotes from (Web 2.0) Revolution
Notes from (Web 2.0) RevolutionGareth Rushgrove
 
Shiny Content Management with Radiant
Shiny Content Management with RadiantShiny Content Management with Radiant
Shiny Content Management with RadiantGareth Rushgrove
 

More from Gareth Rushgrove (18)

Thinking Evil Thoughts
Thinking Evil ThoughtsThinking Evil Thoughts
Thinking Evil Thoughts
 
Web operations
Web operationsWeb operations
Web operations
 
Metrics with Ganglia
Metrics with GangliaMetrics with Ganglia
Metrics with Ganglia
 
Devops
DevopsDevops
Devops
 
Message Queues for Web Applications
Message Queues for Web ApplicationsMessage Queues for Web Applications
Message Queues for Web Applications
 
Beyond basic web development
Beyond basic web developmentBeyond basic web development
Beyond basic web development
 
Self Education for Web Professionals
Self Education for Web ProfessionalsSelf Education for Web Professionals
Self Education for Web Professionals
 
What to Build with Google App Engine
What to Build with Google App EngineWhat to Build with Google App Engine
What to Build with Google App Engine
 
App Engine for Python Developers
App Engine for Python DevelopersApp Engine for Python Developers
App Engine for Python Developers
 
Testing Django Applications
Testing Django ApplicationsTesting Django Applications
Testing Django Applications
 
Design Strategies for a Distributed Web
Design Strategies for a Distributed WebDesign Strategies for a Distributed Web
Design Strategies for a Distributed Web
 
A First Class Web Citizen
A First Class Web CitizenA First Class Web Citizen
A First Class Web Citizen
 
Parsing Microformats
Parsing MicroformatsParsing Microformats
Parsing Microformats
 
Things you probably don't do (or tying to make project automation sexy)
Things you probably don't do (or tying to make project automation sexy)Things you probably don't do (or tying to make project automation sexy)
Things you probably don't do (or tying to make project automation sexy)
 
Notes from (Web 2.0) Revolution
Notes from (Web 2.0) RevolutionNotes from (Web 2.0) Revolution
Notes from (Web 2.0) Revolution
 
Rails flavoured OpenId
Rails flavoured OpenIdRails flavoured OpenId
Rails flavoured OpenId
 
Shiny Content Management with Radiant
Shiny Content Management with RadiantShiny Content Management with Radiant
Shiny Content Management with Radiant
 
RESTful Rabbits
RESTful RabbitsRESTful Rabbits
RESTful Rabbits
 

Recently uploaded

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Recently uploaded (20)

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Config managament for development environments ii

  • 1. Configuration Management for Development Environments LRUG 8th August 2011 gareth rushgrove | morethanseven.net http://www.flickr.com/photos/36144637@N00/159627088/
  • 2. Gareth Rushgrove gareth rushgrove | morethanseven.net
  • 3. Blog at morethanseven.net gareth rushgrove | morethanseven.net
  • 5. Problems gareth rushgrove | morethanseven.net http://www.flickr.com/photos/iancarroll/5027441664
  • 6. 1. Not all developers want to be sysadmins gareth rushgrove | morethanseven.net http://www.flickr.com/photos/34652102@N04/5059217055
  • 7. 2. New team members getting started time gareth rushgrove | morethanseven.net http://www.flickr.com/photos/34652102@N04/5059824808
  • 8. 3. Running a full set of services locally gareth rushgrove | morethanseven.net http://www.flickr.com/photos/biggreymare
  • 9. 4. Works on my machine gareth rushgrove | morethanseven.net
  • 10. ⚡ brew info mysql mysql 5.5.14 $ aptitude show mysql-server Package: mysql-server State: not installed Version: 5.1.41-3ubuntu12.10 Homebrew is great but... gareth rushgrove | morethanseven.net
  • 11. 23 releases and 21 months in-between 5.1.41 and 5.5.14. Here’s some fixed bugs: - An ORDER BY clause was bound to the incorrect substatement when used in UNION context. - A NOT IN predicate with a subquery containing a HAVING clause could retrieve too many rows, when the subquery itself returned NULL. - MIN(year_col) could return an incorrect result in some cases. And lots more What’s a few versions between friends? gareth rushgrove | morethanseven.net
  • 12. Spot the cross platform bug (not the security flaw) gareth rushgrove | morethanseven.net
  • 13. ⚡ ./server.rb & ⚡ curl "http://127.0.0.1:8181/?query=Bob" ⚡ curl "http://127.0.0.1:8181/?query=bob" ⚡ ls Bob ⚡ cat Bob Hello bob On our Mac gareth rushgrove | morethanseven.net
  • 14. $ ./server.rb & $ curl "http://127.0.0.1:8181/?query=Bob" $ curl "http://127.0.0.1:8181/?query=bob" $ ls Bob bob $ cat Bob Hello Bob $ cat bob Hello bob On Linux gareth rushgrove | morethanseven.net
  • 15. Solutions gareth rushgrove | morethanseven.net http://www.flickr.com/photos/34652102@N04/5059208501
  • 16. Virtualisation gareth rushgrove | morethanseven.net http://www.flickr.com/photos/dawilson/2598713027
  • 17. VirtualBox gareth rushgrove | morethanseven.net
  • 18. VMware gareth rushgrove | morethanseven.net
  • 19. Virtualisation needs powerful hardware gareth rushgrove | morethanseven.net http://www.flickr.com/photos/martinoc/477335951
  • 20. What about editing code? gareth rushgrove | morethanseven.net http://www.flickr.com/photos/peteradams/2272928740
  • 21. Shared Folders or NFS gareth rushgrove | morethanseven.net http://www.flickr.com/photos/34652102@N04/5059846582
  • 23. Vim gareth rushgrove | morethanseven.net
  • 24. Vagrantup.com gareth rushgrove | morethanseven.net
  • 25. - Automated virtual machine creation using Oracle’s VirtualBox - Automated provisioning of virtual environments using Chef or Puppet - Full SSH access to created environments - Assign a static IP to your VM, accessible from your machine - Forward ports to the host machine - Shared folders allows you to continue using your own editor - Package environments into distributable boxes - Completely tear down environment when you’re done - Easily rebuild a complete environment with a single command What is Vagrant? gareth rushgrove | morethanseven.net
  • 26. Base boxes gareth rushgrove | morethanseven.net http://www.flickr.com/photos/dawilson/2793319903
  • 27. VeeWee gareth rushgrove | morethanseven.net
  • 28. Community boxes gareth rushgrove | morethanseven.net
  • 29. ⚡ gem install vagrant ⚡ vagrant box add lucid32 http://.../lucid32.box ⚡ vagrant init ⚡ vagrant up Vagrant up gareth rushgrove | morethanseven.net
  • 30. ⚡ ls Vagrantfile ⚡ vagrant up ⚡ vagrant ssh ⚡ vagrant reload ⚡ vagrant halt ⚡ vagrant destroy Vagrant command line gareth rushgrove | morethanseven.net
  • 31. ⚡ vagrant ssh-config Host default HostName 127.0.0.1 User vagrant Port 2222 IdentityFile /Users/.../vagrant-0.8.2/keys/vagrant ... Export SSH configuration gareth rushgrove | morethanseven.net
  • 32. Vagrant::Config.run do |config| config.vm.box = "lucid32" end Vagrantfile gareth rushgrove | morethanseven.net
  • 33. Vagrant::Config.run do |config| config.vm.forward_port("web", 80, 8080) config.vm.forward_port("ftp", 21, 4567) config.vm.forward_port("ssh", 22, 2222, :auto => true) end Port forwarding gareth rushgrove | morethanseven.net
  • 34. Vagrant::Config.run do |config| config.vm.share_folder("folder", "/guest", "../host") end Shared folders gareth rushgrove | morethanseven.net
  • 35. Vagrant::Config.run do |config| config.vm.define :web do |web_config| web_config.vm.box = "web" web_config.vm.forward_port("http", 80, 8080) end config.vm.define :db do |db_config| db_config.vm.box = "db" db_config.vm.forward_port("db", 3306, 3306) end end Multiple VMs in one file gareth rushgrove | morethanseven.net
  • 36. Vagrant::Config.run do |config| config.vm.boot_mode = :gui config.ssh.forward_agent = true config.vm.customize do |vm| vm.memory_size = 512 end end Lots more options gareth rushgrove | morethanseven.net
  • 37. Puppet gareth rushgrove | morethanseven.net
  • 38. Vagrant::Config.run do |config| config.vm.provision :puppet do |puppet| puppet.manifests_path = "puppetmanifests" puppet.manifest_file = "newbox.pp" end end Vagrant provisioning with Puppet gareth rushgrove | morethanseven.net
  • 39. Chef gareth rushgrove | morethanseven.net
  • 40. Vagrant::Config.run do |config| config.vm.provision :chef_solo do |chef| chef.add_recipe = "garethr" chef.cookbooks_path = “cookbooks” end end Vagrant provisioning with Chef gareth rushgrove | morethanseven.net
  • 41. Vagrant::Config.run do |config| config.vm.provision :chef_solo do |chef| chef.roles_path = "roles" chef.add_role("vm") end end Specifying Chef roles gareth rushgrove | morethanseven.net
  • 42. Vagrant::Config.run do |config| config.vm.provision :chef_solo do |chef| chef.recipe_url = "http://github.com/cookbooks.tar.gz" chef.add_recipe "garethr" chef.cookbooks_path = [:vm, "cookbooks"] chef.json.merge!({ :garethr => { :ohmyzsh => "https://github.com/.../oh-my-zsh.git", :dotvim => "https://github.com/garethr/dotvim.git" }}) end end Remote file gareth rushgrove | morethanseven.net
  • 43. - Vagrant Hosts - https://github.com/dwt/vagrant-hosts - Sahara - https://github.com/jedi4ever/sahara - Vagrantboxes - https://github.com/garethr/ruby-vagrantboxes Plugins gareth rushgrove | morethanseven.net http://www.flickr.com/photos/s3a/4710416678
  • 44. Local configuration management gareth rushgrove | morethanseven.net http://www.flickr.com/photos/crustyscumbrothersontour/2674351601
  • 45. - I want my development environment everywhere - I don’t want a wiki page of instructions - I don’t want to have to manually install everything - I don’t want to care about destroying a virtual machine - So I have a simple Chef cookbook to bootstrap my machines Real world example gareth rushgrove | morethanseven.net
  • 46. ⚡ cd /m/somefolder ⚡ tree ├── Vagrantfile └── cookbooks └── garethr ├── attributes │   └── default.rb ├── files │   └── default │   └── zshrc └── recipes └── default.rb Chef cookbook layout gareth rushgrove | morethanseven.net
  • 47. %w{zsh wget curl lynx git-core ack-grep vim-nox dvtm build-essential tree}.each do |pkg| package pkg do action :install end end Packages I like gareth rushgrove | morethanseven.net
  • 48. git "/home/vagrant/.oh-my-zsh" do repository node[:garethr][:ohmyzsh] action :checkout user "vagrant" group "vagrant" end cookbook_file "/home/vagrant/.zshrc" do source "zshrc" owner "vagrant" group "vagrant" end My shell configs gareth rushgrove | morethanseven.net
  • 49. default[:garethr][:dotvim] = "https://github.com/carlhuda/janus.git" default[:garethr][:ohmyzsh] = "https://github.com/robbyrussell/oh-my-zsh.git" Attributes gareth rushgrove | morethanseven.net
  • 50. git "/home/vagrant/.vim" do repository node[:garethr][:dotvim] action :checkout user "vagrant" end execute "build janus" do command "rake" user "vagrant" cwd "/home/vagrant/.vim" environment ({'HOME' => '/home/vagrant'}) creates "/home/vagrant/.vimrc" end My Vim configs gareth rushgrove | morethanseven.net
  • 51. require "chefspec" describe "garethr" do before(:all) do @chef_run = ChefSpec::ChefRunner.new @chef_run.converge "garethr" end it "should install zsh" do @chef_run.should install_package "zsh" end end Testing with ChefSpec gareth rushgrove | morethanseven.net
  • 52. - The Chef Server - Roles and Environments - Knife and Shef - Splitting the one file into multiple cookbooks - Managing running services - Simplifying cookbooks by creating system packages - Supporting different operating systems - The Chef architecture - Testing with Cucumber-Chef Awesome things I ignored gareth rushgrove | morethanseven.net
  • 53. - Using Virtualisation catches bugs early - Using Vagrant makes using virtual machines pleasurable - Storing configuration as code makes it shareable - Able to apply development best practice to dev environments Conclusions gareth rushgrove | morethanseven.net
  • 54. - IRC - #vagrant on Freenode - Github Issues - https://github.com/mitchellh/vagrant/issues - Google Groups - http://groups.google.com/group/vagrant-up More information gareth rushgrove | morethanseven.net
  • 55. Questions? gareth rushgrove | morethanseven.net http://flickr.com/photos/psd/102332391/