SlideShare une entreprise Scribd logo
1  sur  55
Télécharger pour lire hors ligne
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/

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Dernier (20)

Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

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/