Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie...

48
Standardized Debugging Environments Taking the Friction Out of Ticket Investigation Charlie Sharpsteen Open Source Support Engineer, Puppet Labs

description

At Puppet labs, we used to investigate and analyze customer tickets with hand-built VM images, and hand-rolled setup scripts – and these varied from team to team. But with the wide variety of operating systems we support, we needed a better way to scale. This talk will cover how Puppet Labs has optimized the task of creating and configuring virtual environments for debugging and reproducing issues reported to our JIRA tracker with the help of Puppet, Packer, and Vagrant.

Transcript of Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie...

Page 1: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Standardized Debugging Environments

Taking the Friction Out of Ticket Investigation

Charlie Sharpsteen Open Source Support Engineer, Puppet Labs

Page 2: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

What Are We Trying to Improve?

Page 3: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Collaboration Across Groups…

Page 4: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Collaboration Across Groups…

Support

Page 5: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Collaboration Across Groups…

Support Engineering

Page 6: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Collaboration Across Groups…

Support Engineering Users

Page 7: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Collaboration Across Groups…

…and Across Environments

Support Engineering Users

Page 8: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Collaboration Across Groups…

…and Across Environments

Support Engineering Users

Windows Linux

Page 9: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Collaboration Across Groups…

…and Across Environments

Support Engineering Users

Windows LinuxOS X Solaris

Page 10: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

What I cannot create, I do not understand.

- Richard Feynmen

Page 11: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

First Steps

Page 12: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

First Steps

• Hand-built VMs

Page 13: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

First Steps

• Hand-built VMs

• Manually managed snapshots

Page 14: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

First Steps

• Hand-built VMs

• Manually managed snapshots

• Hard to scale out and manually manage many VMs

Page 15: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Enter Vagrant

Page 16: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Enter Vagrant

• A tool that allows us to create and manage many VM instances

Page 17: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Enter Vagrant

• A tool that allows us to create and manage many VM instances

• Manages artifacts required to use multiple guest operating systems

• Provisions VMs after creation

Page 18: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Enter Vagrant

• A tool that allows us to create and manage many VM instances

• Manages artifacts required to use multiple guest operating systems

• Provisions VMs after creation

• Each VM is specified in a plain text file

Page 19: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

# -*- mode: ruby -*-!# vi: set ft=ruby :!!!# Hashes of box URLs!S3_BOXES = {! :sles_11sp1 => 'http://puppet-vagrant-boxes.s3.amazonaws.com/sles-11sp1-x64-vbox4210.box',! :sles_11sp1_nocm => 'http://puppet-vagrant-boxes.s3.amazonaws.com/sles-11sp1-x64-vbox4210-nocm.box',! :fedora_18 => 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210.box',! :fedora_18_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box',! :centos_59 => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210.box',! :centos_59_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box',! :centos_64_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box',! :centos_64_fusion_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box',! :debian_6_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box',! :debian_7 => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210.box',! :debian_7_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box',! :ubuntu_1204_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box',!}!!LOCAL_BOXES = {! :centos_64_pe => "~/Data/boxes/centos-6.4-i386-pe.box",! :solaris_10 => '~/Data/boxes/solaris-10u11-i386-vbox4210.box',! :solaris_10_nocm => '~/Data/boxes/solaris-10u11-i386-vbox4210-nocm.box',!}!!BOOTSTRAPS = {! :centos_6 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! echo 'Installing EPEL'! wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm! wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm! sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm!! echo 'Installing Puppet.'! rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-6.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS! :centos_59 => <<-EOS,!# CentOS 5 has some networking problems!/etc/init.d/network restart!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! echo 'Installing Puppet.'! rpm -ivh http://yum.puppetlabs.com/el/5/products/x86_64/puppetlabs-release-5-7.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS! :ubuntu_1204 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! wget --output-document=/tmp/puppet-repo-precise.deb http://apt.puppetlabs.com/puppetlabs-release-precise.deb! dpkg -i /tmp/puppet-repo-precise.deb! apt-get update! apt-get install -y --allow-unauthenticated puppet!fi! EOS! :fedora_18 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! sudo rpm -ivh http://yum.puppetlabs.com/fedora/f18/products/i386/puppetlabs-release-18-7.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS!}!!# Shorthand method for setting box URL and name in one shot.!def set_box box, box_url! box.vm.box_url = box_url! # Recover box name from url by returning the last component minus the! # `.box` extension.! box.vm.box = File.basename(box.vm.box_url, File.extname(box.vm.box_url))!end!!def share_puppet_source box! box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"!end!!def share_puppet_modules box! box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'!end!!def provision_box box, manifest! box.vm.provision :puppet do |puppet|! puppet.pp_path = '/tmp/vagrant-puppet'! puppet.manifests_path = 'provisioning/manifests'! puppet.module_path = 'provisioning/modules'! puppet.manifest_file = manifest! end!end!!

!!Vagrant::Config.run do |config|! config.ssh.forward_x11 = true!! config.vm.define :pemaster do |box|! flavor = :centos_64_pe! set_box box, LOCAL_BOXES[flavor]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.40"! box.vm.host_name = 'pemaster.boxnet'! end!! config.vm.define :peagent do |box|! flavor = :centos_64_pe! set_box box, LOCAL_BOXES[flavor]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.41"! box.vm.host_name = 'peagent.boxnet'! end!!! config.vm.define :puppetmaster do |box|! flavor = :centos_6! set_box box, S3_BOXES[:centos_64_nocm]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.20"! box.vm.host_name = 'puppetmaster.boxnet'!! # NOTE: Share folders, such as Git checkouts of the Puppet source code! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'server.pp'! end!! config.vm.define :puppetagent do |box|! flavor = :centos_6! set_box box, S3_BOXES[:centos_64_nocm]!! box.vm.network :hostonly, "192.168.23.21"! box.vm.host_name = "puppetagent.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'agent.pp'! end!! config.vm.define :centos_59 do |box|! flavor = :centos_59_nocm! set_box box, S3_BOXES[flavor]!! box.vm.network :hostonly, "192.168.23.22"! box.vm.host_name = "centos-59.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[:centos_59]! provision_box box, 'agent.pp'! end!! config.vm.define :ubuntuagent do |box|! flavor = :ubuntu_1204! set_box box, S3_BOXES[:ubuntu_1204_nocm]!! box.vm.network :hostonly, "192.168.23.23"! box.vm.host_name = "ubuntuagent.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'agent.pp'! end!! config.vm.define :solaris_10 do |box|! box.vm.guest = :solaris! flavor = :solaris_10! set_box box, LOCAL_BOXES[flavor]!! box.vm.network :hostonly, "192.168.23.24"! box.vm.host_name = "solaris-10.boxnet"! end!! config.vm.define :debianagent do |box|! flavor = :debian_7_nocm! set_box box, S3_BOXES[flavor]!!

The uberVagrantfile

Page 20: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

# -*- mode: ruby -*-!# vi: set ft=ruby :!!!# Hashes of box URLs!S3_BOXES = {! :sles_11sp1 => 'http://puppet-vagrant-boxes.s3.amazonaws.com/sles-11sp1-x64-vbox4210.box',! :sles_11sp1_nocm => 'http://puppet-vagrant-boxes.s3.amazonaws.com/sles-11sp1-x64-vbox4210-nocm.box',! :fedora_18 => 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210.box',! :fedora_18_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box',! :centos_59 => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210.box',! :centos_59_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box',! :centos_64_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box',! :centos_64_fusion_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box',! :debian_6_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box',! :debian_7 => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210.box',! :debian_7_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box',! :ubuntu_1204_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box',!}!!LOCAL_BOXES = {! :centos_64_pe => "~/Data/boxes/centos-6.4-i386-pe.box",! :solaris_10 => '~/Data/boxes/solaris-10u11-i386-vbox4210.box',! :solaris_10_nocm => '~/Data/boxes/solaris-10u11-i386-vbox4210-nocm.box',!}!!BOOTSTRAPS = {! :centos_6 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! echo 'Installing EPEL'! wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm! wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm! sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm!! echo 'Installing Puppet.'! rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-6.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS! :centos_59 => <<-EOS,!# CentOS 5 has some networking problems!/etc/init.d/network restart!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! echo 'Installing Puppet.'! rpm -ivh http://yum.puppetlabs.com/el/5/products/x86_64/puppetlabs-release-5-7.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS! :ubuntu_1204 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! wget --output-document=/tmp/puppet-repo-precise.deb http://apt.puppetlabs.com/puppetlabs-release-precise.deb! dpkg -i /tmp/puppet-repo-precise.deb! apt-get update! apt-get install -y --allow-unauthenticated puppet!fi! EOS! :fedora_18 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! sudo rpm -ivh http://yum.puppetlabs.com/fedora/f18/products/i386/puppetlabs-release-18-7.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS!}!!# Shorthand method for setting box URL and name in one shot.!def set_box box, box_url! box.vm.box_url = box_url! # Recover box name from url by returning the last component minus the! # `.box` extension.! box.vm.box = File.basename(box.vm.box_url, File.extname(box.vm.box_url))!end!!def share_puppet_source box! box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"!end!!def share_puppet_modules box! box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'!end!!def provision_box box, manifest! box.vm.provision :puppet do |puppet|! puppet.pp_path = '/tmp/vagrant-puppet'! puppet.manifests_path = 'provisioning/manifests'! puppet.module_path = 'provisioning/modules'! puppet.manifest_file = manifest! end!end!!

!!Vagrant::Config.run do |config|! config.ssh.forward_x11 = true!! config.vm.define :pemaster do |box|! flavor = :centos_64_pe! set_box box, LOCAL_BOXES[flavor]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.40"! box.vm.host_name = 'pemaster.boxnet'! end!! config.vm.define :peagent do |box|! flavor = :centos_64_pe! set_box box, LOCAL_BOXES[flavor]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.41"! box.vm.host_name = 'peagent.boxnet'! end!!! config.vm.define :puppetmaster do |box|! flavor = :centos_6! set_box box, S3_BOXES[:centos_64_nocm]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.20"! box.vm.host_name = 'puppetmaster.boxnet'!! # NOTE: Share folders, such as Git checkouts of the Puppet source code! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'server.pp'! end!! config.vm.define :puppetagent do |box|! flavor = :centos_6! set_box box, S3_BOXES[:centos_64_nocm]!! box.vm.network :hostonly, "192.168.23.21"! box.vm.host_name = "puppetagent.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'agent.pp'! end!! config.vm.define :centos_59 do |box|! flavor = :centos_59_nocm! set_box box, S3_BOXES[flavor]!! box.vm.network :hostonly, "192.168.23.22"! box.vm.host_name = "centos-59.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[:centos_59]! provision_box box, 'agent.pp'! end!! config.vm.define :ubuntuagent do |box|! flavor = :ubuntu_1204! set_box box, S3_BOXES[:ubuntu_1204_nocm]!! box.vm.network :hostonly, "192.168.23.23"! box.vm.host_name = "ubuntuagent.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'agent.pp'! end!! config.vm.define :solaris_10 do |box|! box.vm.guest = :solaris! flavor = :solaris_10! set_box box, LOCAL_BOXES[flavor]!! box.vm.network :hostonly, "192.168.23.24"! box.vm.host_name = "solaris-10.boxnet"! end!! config.vm.define :debianagent do |box|! flavor = :debian_7_nocm! set_box box, S3_BOXES[flavor]!!

The uberVagrantfileData: !# Hashes of box URLs!S3_BOXES = {! :sles_11sp1 => 'http://puppet-vagrant-boxes.s3.amazonaws.com/sles-11sp1-x64-vbox4210.box',! :sles_11sp1_nocm => 'http://puppet-vagrant-boxes.s3.amazonaws.com/sles-11sp1-x64-vbox4210-nocm.box',! :fedora_18 => 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210.box',! :fedora_18_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box',! :centos_59 => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210.box',! :centos_59_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box',! :centos_64_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box',! :centos_64_fusion_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box',! :debian_6_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box',! :debian_7 => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210.box',! :debian_7_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box',! :ubuntu_1204_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box',!}!

Page 21: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

# -*- mode: ruby -*-!# vi: set ft=ruby :!!!# Hashes of box URLs!S3_BOXES = {! :sles_11sp1 => 'http://puppet-vagrant-boxes.s3.amazonaws.com/sles-11sp1-x64-vbox4210.box',! :sles_11sp1_nocm => 'http://puppet-vagrant-boxes.s3.amazonaws.com/sles-11sp1-x64-vbox4210-nocm.box',! :fedora_18 => 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210.box',! :fedora_18_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box',! :centos_59 => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210.box',! :centos_59_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box',! :centos_64_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box',! :centos_64_fusion_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box',! :debian_6_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box',! :debian_7 => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210.box',! :debian_7_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box',! :ubuntu_1204_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box',!}!!LOCAL_BOXES = {! :centos_64_pe => "~/Data/boxes/centos-6.4-i386-pe.box",! :solaris_10 => '~/Data/boxes/solaris-10u11-i386-vbox4210.box',! :solaris_10_nocm => '~/Data/boxes/solaris-10u11-i386-vbox4210-nocm.box',!}!!BOOTSTRAPS = {! :centos_6 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! echo 'Installing EPEL'! wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm! wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm! sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm!! echo 'Installing Puppet.'! rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-6.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS! :centos_59 => <<-EOS,!# CentOS 5 has some networking problems!/etc/init.d/network restart!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! echo 'Installing Puppet.'! rpm -ivh http://yum.puppetlabs.com/el/5/products/x86_64/puppetlabs-release-5-7.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS! :ubuntu_1204 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! wget --output-document=/tmp/puppet-repo-precise.deb http://apt.puppetlabs.com/puppetlabs-release-precise.deb! dpkg -i /tmp/puppet-repo-precise.deb! apt-get update! apt-get install -y --allow-unauthenticated puppet!fi! EOS! :fedora_18 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! sudo rpm -ivh http://yum.puppetlabs.com/fedora/f18/products/i386/puppetlabs-release-18-7.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS!}!!# Shorthand method for setting box URL and name in one shot.!def set_box box, box_url! box.vm.box_url = box_url! # Recover box name from url by returning the last component minus the! # `.box` extension.! box.vm.box = File.basename(box.vm.box_url, File.extname(box.vm.box_url))!end!!def share_puppet_source box! box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"!end!!def share_puppet_modules box! box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'!end!!def provision_box box, manifest! box.vm.provision :puppet do |puppet|! puppet.pp_path = '/tmp/vagrant-puppet'! puppet.manifests_path = 'provisioning/manifests'! puppet.module_path = 'provisioning/modules'! puppet.manifest_file = manifest! end!end!!

!!Vagrant::Config.run do |config|! config.ssh.forward_x11 = true!! config.vm.define :pemaster do |box|! flavor = :centos_64_pe! set_box box, LOCAL_BOXES[flavor]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.40"! box.vm.host_name = 'pemaster.boxnet'! end!! config.vm.define :peagent do |box|! flavor = :centos_64_pe! set_box box, LOCAL_BOXES[flavor]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.41"! box.vm.host_name = 'peagent.boxnet'! end!!! config.vm.define :puppetmaster do |box|! flavor = :centos_6! set_box box, S3_BOXES[:centos_64_nocm]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.20"! box.vm.host_name = 'puppetmaster.boxnet'!! # NOTE: Share folders, such as Git checkouts of the Puppet source code! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'server.pp'! end!! config.vm.define :puppetagent do |box|! flavor = :centos_6! set_box box, S3_BOXES[:centos_64_nocm]!! box.vm.network :hostonly, "192.168.23.21"! box.vm.host_name = "puppetagent.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'agent.pp'! end!! config.vm.define :centos_59 do |box|! flavor = :centos_59_nocm! set_box box, S3_BOXES[flavor]!! box.vm.network :hostonly, "192.168.23.22"! box.vm.host_name = "centos-59.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[:centos_59]! provision_box box, 'agent.pp'! end!! config.vm.define :ubuntuagent do |box|! flavor = :ubuntu_1204! set_box box, S3_BOXES[:ubuntu_1204_nocm]!! box.vm.network :hostonly, "192.168.23.23"! box.vm.host_name = "ubuntuagent.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'agent.pp'! end!! config.vm.define :solaris_10 do |box|! box.vm.guest = :solaris! flavor = :solaris_10! set_box box, LOCAL_BOXES[flavor]!! box.vm.network :hostonly, "192.168.23.24"! box.vm.host_name = "solaris-10.boxnet"! end!! config.vm.define :debianagent do |box|! flavor = :debian_7_nocm! set_box box, S3_BOXES[flavor]!!

The uberVagrantfileCustom Provisioners: !BOOTSTRAPS = {! :centos_6 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! echo 'Installing EPEL'! wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm! wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm! sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm!! echo 'Installing Puppet.'! rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-6.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS!...!!def provision_box box, manifest! box.vm.provision :puppet do |puppet|! puppet.pp_path = '/tmp/vagrant-puppet'! puppet.manifests_path = 'provisioning/manifests'! puppet.module_path = 'provisioning/modules'! puppet.manifest_file = manifest! end!end

Page 22: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

# -*- mode: ruby -*-!# vi: set ft=ruby :!!!# Hashes of box URLs!S3_BOXES = {! :sles_11sp1 => 'http://puppet-vagrant-boxes.s3.amazonaws.com/sles-11sp1-x64-vbox4210.box',! :sles_11sp1_nocm => 'http://puppet-vagrant-boxes.s3.amazonaws.com/sles-11sp1-x64-vbox4210-nocm.box',! :fedora_18 => 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210.box',! :fedora_18_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box',! :centos_59 => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210.box',! :centos_59_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box',! :centos_64_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box',! :centos_64_fusion_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box',! :debian_6_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box',! :debian_7 => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210.box',! :debian_7_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box',! :ubuntu_1204_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box',!}!!LOCAL_BOXES = {! :centos_64_pe => "~/Data/boxes/centos-6.4-i386-pe.box",! :solaris_10 => '~/Data/boxes/solaris-10u11-i386-vbox4210.box',! :solaris_10_nocm => '~/Data/boxes/solaris-10u11-i386-vbox4210-nocm.box',!}!!BOOTSTRAPS = {! :centos_6 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! echo 'Installing EPEL'! wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm! wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm! sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm!! echo 'Installing Puppet.'! rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-6.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS! :centos_59 => <<-EOS,!# CentOS 5 has some networking problems!/etc/init.d/network restart!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! echo 'Installing Puppet.'! rpm -ivh http://yum.puppetlabs.com/el/5/products/x86_64/puppetlabs-release-5-7.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS! :ubuntu_1204 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! wget --output-document=/tmp/puppet-repo-precise.deb http://apt.puppetlabs.com/puppetlabs-release-precise.deb! dpkg -i /tmp/puppet-repo-precise.deb! apt-get update! apt-get install -y --allow-unauthenticated puppet!fi! EOS! :fedora_18 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! sudo rpm -ivh http://yum.puppetlabs.com/fedora/f18/products/i386/puppetlabs-release-18-7.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS!}!!# Shorthand method for setting box URL and name in one shot.!def set_box box, box_url! box.vm.box_url = box_url! # Recover box name from url by returning the last component minus the! # `.box` extension.! box.vm.box = File.basename(box.vm.box_url, File.extname(box.vm.box_url))!end!!def share_puppet_source box! box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"!end!!def share_puppet_modules box! box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'!end!!def provision_box box, manifest! box.vm.provision :puppet do |puppet|! puppet.pp_path = '/tmp/vagrant-puppet'! puppet.manifests_path = 'provisioning/manifests'! puppet.module_path = 'provisioning/modules'! puppet.manifest_file = manifest! end!end!!

!!Vagrant::Config.run do |config|! config.ssh.forward_x11 = true!! config.vm.define :pemaster do |box|! flavor = :centos_64_pe! set_box box, LOCAL_BOXES[flavor]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.40"! box.vm.host_name = 'pemaster.boxnet'! end!! config.vm.define :peagent do |box|! flavor = :centos_64_pe! set_box box, LOCAL_BOXES[flavor]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.41"! box.vm.host_name = 'peagent.boxnet'! end!!! config.vm.define :puppetmaster do |box|! flavor = :centos_6! set_box box, S3_BOXES[:centos_64_nocm]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.20"! box.vm.host_name = 'puppetmaster.boxnet'!! # NOTE: Share folders, such as Git checkouts of the Puppet source code! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'server.pp'! end!! config.vm.define :puppetagent do |box|! flavor = :centos_6! set_box box, S3_BOXES[:centos_64_nocm]!! box.vm.network :hostonly, "192.168.23.21"! box.vm.host_name = "puppetagent.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'agent.pp'! end!! config.vm.define :centos_59 do |box|! flavor = :centos_59_nocm! set_box box, S3_BOXES[flavor]!! box.vm.network :hostonly, "192.168.23.22"! box.vm.host_name = "centos-59.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[:centos_59]! provision_box box, 'agent.pp'! end!! config.vm.define :ubuntuagent do |box|! flavor = :ubuntu_1204! set_box box, S3_BOXES[:ubuntu_1204_nocm]!! box.vm.network :hostonly, "192.168.23.23"! box.vm.host_name = "ubuntuagent.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'agent.pp'! end!! config.vm.define :solaris_10 do |box|! box.vm.guest = :solaris! flavor = :solaris_10! set_box box, LOCAL_BOXES[flavor]!! box.vm.network :hostonly, "192.168.23.24"! box.vm.host_name = "solaris-10.boxnet"! end!! config.vm.define :debianagent do |box|! flavor = :debian_7_nocm! set_box box, S3_BOXES[flavor]!!

The uberVagrantfileVM Definitions ! config.vm.define :pemaster do |box|! flavor = :centos_64_pe! set_box box, LOCAL_BOXES[flavor]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.40"! box.vm.host_name = 'pemaster.boxnet'! end!! config.vm.define :peagent do |box|! flavor = :centos_64_pe! set_box box, LOCAL_BOXES[flavor]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.41"! box.vm.host_name = 'peagent.boxnet'! end

Page 23: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

# -*- mode: ruby -*-!# vi: set ft=ruby :!!!# Hashes of box URLs!S3_BOXES = {! :sles_11sp1 => 'http://puppet-vagrant-boxes.s3.amazonaws.com/sles-11sp1-x64-vbox4210.box',! :sles_11sp1_nocm => 'http://puppet-vagrant-boxes.s3.amazonaws.com/sles-11sp1-x64-vbox4210-nocm.box',! :fedora_18 => 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210.box',! :fedora_18_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box',! :centos_59 => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210.box',! :centos_59_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box',! :centos_64_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box',! :centos_64_fusion_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box',! :debian_6_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box',! :debian_7 => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210.box',! :debian_7_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box',! :ubuntu_1204_nocm => 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box',!}!!LOCAL_BOXES = {! :centos_64_pe => "~/Data/boxes/centos-6.4-i386-pe.box",! :solaris_10 => '~/Data/boxes/solaris-10u11-i386-vbox4210.box',! :solaris_10_nocm => '~/Data/boxes/solaris-10u11-i386-vbox4210-nocm.box',!}!!BOOTSTRAPS = {! :centos_6 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! echo 'Installing EPEL'! wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm! wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm! sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm!! echo 'Installing Puppet.'! rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-6.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS! :centos_59 => <<-EOS,!# CentOS 5 has some networking problems!/etc/init.d/network restart!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! echo 'Installing Puppet.'! rpm -ivh http://yum.puppetlabs.com/el/5/products/x86_64/puppetlabs-release-5-7.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS! :ubuntu_1204 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! wget --output-document=/tmp/puppet-repo-precise.deb http://apt.puppetlabs.com/puppetlabs-release-precise.deb! dpkg -i /tmp/puppet-repo-precise.deb! apt-get update! apt-get install -y --allow-unauthenticated puppet!fi! EOS! :fedora_18 => <<-EOS,!if which puppet > /dev/null 2>&1; then! echo 'Puppet Installed.'!else! sudo rpm -ivh http://yum.puppetlabs.com/fedora/f18/products/i386/puppetlabs-release-18-7.noarch.rpm! yum --nogpgcheck -y install puppet-server!fi! EOS!}!!# Shorthand method for setting box URL and name in one shot.!def set_box box, box_url! box.vm.box_url = box_url! # Recover box name from url by returning the last component minus the! # `.box` extension.! box.vm.box = File.basename(box.vm.box_url, File.extname(box.vm.box_url))!end!!def share_puppet_source box! box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"!end!!def share_puppet_modules box! box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'!end!!def provision_box box, manifest! box.vm.provision :puppet do |puppet|! puppet.pp_path = '/tmp/vagrant-puppet'! puppet.manifests_path = 'provisioning/manifests'! puppet.module_path = 'provisioning/modules'! puppet.manifest_file = manifest! end!end!!

!!Vagrant::Config.run do |config|! config.ssh.forward_x11 = true!! config.vm.define :pemaster do |box|! flavor = :centos_64_pe! set_box box, LOCAL_BOXES[flavor]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.40"! box.vm.host_name = 'pemaster.boxnet'! end!! config.vm.define :peagent do |box|! flavor = :centos_64_pe! set_box box, LOCAL_BOXES[flavor]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.41"! box.vm.host_name = 'peagent.boxnet'! end!!! config.vm.define :puppetmaster do |box|! flavor = :centos_6! set_box box, S3_BOXES[:centos_64_nocm]!! # NOTE: Headless or no?! #webnode_config.vm.boot_mode = :gui!! # NOTE: Hostonly _may_ mean no internets if this adapter gets found first!!!! # Check /etc/resolv.conf !! box.vm.network :hostonly, "192.168.23.20"! box.vm.host_name = 'puppetmaster.boxnet'!! # NOTE: Share folders, such as Git checkouts of the Puppet source code! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'server.pp'! end!! config.vm.define :puppetagent do |box|! flavor = :centos_6! set_box box, S3_BOXES[:centos_64_nocm]!! box.vm.network :hostonly, "192.168.23.21"! box.vm.host_name = "puppetagent.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'agent.pp'! end!! config.vm.define :centos_59 do |box|! flavor = :centos_59_nocm! set_box box, S3_BOXES[flavor]!! box.vm.network :hostonly, "192.168.23.22"! box.vm.host_name = "centos-59.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[:centos_59]! provision_box box, 'agent.pp'! end!! config.vm.define :ubuntuagent do |box|! flavor = :ubuntu_1204! set_box box, S3_BOXES[:ubuntu_1204_nocm]!! box.vm.network :hostonly, "192.168.23.23"! box.vm.host_name = "ubuntuagent.boxnet"!! share_puppet_source box!! box.vm.provision :shell, :inline => BOOTSTRAPS[flavor]! provision_box box, 'agent.pp'! end!! config.vm.define :solaris_10 do |box|! box.vm.guest = :solaris! flavor = :solaris_10! set_box box, LOCAL_BOXES[flavor]!! box.vm.network :hostonly, "192.168.23.24"! box.vm.host_name = "solaris-10.boxnet"! end!! config.vm.define :debianagent do |box|! flavor = :debian_7_nocm! set_box box, S3_BOXES[flavor]!!

The uberVagrantfile

• Maintenance costs increase as more machines are added

• Unique to each individual or team

• Hard to scale across teams

Page 24: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Build Abstractions

Page 25: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Build Abstractions• Eliminate manual bookkeeping

Page 26: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Build Abstractions• Eliminate manual bookkeeping config.vm.define :pemaster do |node|!

node.vm.network :hostonly, "192.168.23.40"!end!!config.vm.define :peagent do |node|! node.vm.network :hostonly, "192.168.23.41"!end

Page 27: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Build Abstractions• Eliminate manual bookkeeping config.vm.define :pemaster do |node|!

node.vm.network :hostonly, "192.168.23.40"!end!!config.vm.define :peagent do |node|! node.vm.network :hostonly, "192.168.23.41"!end

config.vm.define :pemaster do |node|! node.vm.network :hostonly, auto_network: true!end!!config.vm.define :peagent do |node|! node.vm.network :hostonly, auto_network: true!end!

Page 28: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Build Abstractions• Eliminate manual bookkeeping

• Automate repetitive tasks

Page 29: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Build Abstractions• Eliminate manual bookkeeping

• Automate repetitive tasks

config.vm.define :pemaster do |node|! # ...!! node.vm.provision :pe_bootstrap do |p|! p.role = :master! p.version = '3.3.0'! end!end!

Page 30: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Build Abstractions• Eliminate manual bookkeeping

• Automate repetitive tasks

• Separate data from logic

Page 31: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Build Abstractions• Eliminate manual bookkeeping

• Automate repetitive tasks

• Separate data from logic

config.vm.define :pemaster do |node|! node.vm.hostname =! 'pe-330-master.puppetdebug.vlan'! node.vm.box = 'puppetlabs/centos-6.5-64-nocm'!! node.vm.network :hostonly, auto_network: true!! node.vm.provision :pe_bootstrap do |p|! p.role = :master! p.version = '3.3.0'! end!end!

Page 32: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Build Abstractions• Eliminate manual bookkeeping

• Automate repetitive tasks

• Separate data from logic

---!vms:! - name: pe-330-master! hostname: pe-330-master.puppetdebug.vlan! box: puppetlabs/centos-6.5-64-nocm! private_networks:! - auto_network: true! provisioners:! - type: pe_bootstrap! role: master! version: 3.3.0!

Page 33: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Build Abstractions• Eliminate manual bookkeeping

• Automate repetitive tasks

• Separate data from logic

---!vms:! - name: pe-330-master! hostname: pe-330-master.puppetdebug.vlan! box: puppetlabs/centos-6.5-64-nocm! roles:! - base! provisioners:! - type: pe_bootstrap! role: master! version: 3.3.0!!roles:! base:! private_networks:! - auto_network: true!

Page 34: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Build Abstractions• Eliminate manual bookkeeping

• Automate repetitive tasks

• Separate data from logic

---!vms:! - name: pe-330-master! debug-kit: true! box: puppetlabs/centos-6.5-64-nocm! roles:! - base!!roles:! base:! private_networks:! - auto_network: true!

Page 35: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Raw Materials

Page 36: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Raw Materials

• Which boxes are in use? Do the older boxes still work?

Page 37: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Raw Materials

• Which boxes are in use? Do the older boxes still work?

• How were the boxes created?

Page 38: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Raw Materials

• Which boxes are in use? Do the older boxes still work?

• How were the boxes created?

Page 39: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Phased Builds

Page 40: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Base Install

Phased Builds

Page 41: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Base Install

Shared Customizations

Phased Builds

Page 42: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Base Install

Shared Customizations

Puppet EnterpriseOpen Source

Phased Builds

Page 43: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Build Server

Base Install

Shared Customizations

Puppet EnterpriseOpen Source

Phased Builds

Page 44: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Where We Ended Up

Page 45: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Where We Ended Up

• Shared environments enable teams to focus on problem solving

Page 46: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Where We Ended Up

• Shared environments enable teams to focus on problem solving

• New employee on-boarding is easier

Page 47: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

Where We Ended Up

• Shared environments enable teams to focus on problem solving

• New employee on-boarding is easier

• Company-wide efforts to build and maintain virtual environments are focused instead of scattered

Page 48: Taking the Friction Out of Ticket Investigation (Standardized Debugging Environments) - Charlie Sharpsteen

• http://www.vagrantup.com/

• https://github.com/adrienthebo/oscar

• https://github.com/Sharpie/puppet-debugging-kit

• http://www.packer.io/

• https://vagrantcloud.com/puppetlabs

Resources