SlideShare a Scribd company logo
Standardized Debugging 
Environments 
Taking the Friction Out of Ticket Investigation 
Charlie Sharpsteen 
Open Source Support Engineer, Puppet Labs
What Are We Trying to Improve?
Collaboration Across Groups…
Collaboration Across Groups… 
Support
Collaboration Across Groups… 
Support Engineering
Collaboration Across Groups… 
Support Engineering Users
Collaboration Across Groups… 
Support Engineering Users 
…and Across Environments
Collaboration Across Groups… 
Support Engineering Users 
…and Across Environments 
Windows Linux
Collaboration Across Groups… 
Support Engineering Users 
…and Across Environments 
Windows OS X Solaris Linux
What I cannot create, 
I do not understand. 
- Richard Feynmen
First Steps
First Steps 
• Hand-built VMs
First Steps 
• Hand-built VMs 
• Manually managed snapshots
First Steps 
• Hand-built VMs 
• Manually managed snapshots 
• Hard to scale out and 
manually manage many VMs
Enter Vagrant
Enter Vagrant 
• A tool that allows us to create and manage many VM instances
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
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
# -*- 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))! 
e!nd! def share_puppet_source box! 
e!nd! def share_puppet_modules box! 
box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"! 
e!nd! def provision_box box, manifest! 
box.vm.provision :puppet do |puppet|! 
box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'! 
puppet.pp_path = '/tmp/vagrant-puppet'! 
puppet.manifests_path = 'provisioning/manifests'! 
puppet.module_path = 'provisioning/modules'! 
puppet.manifest_file = manifest! 
e!nd! 
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
# -*- 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))! 
e!nd! def share_puppet_source box! 
e!nd! def share_puppet_modules box! 
box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"! 
e!nd! def provision_box box, manifest! 
box.vm.provision :puppet do |puppet|! 
box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'! 
puppet.pp_path = '/tmp/vagrant-puppet'! 
puppet.manifests_path = 'provisioning/manifests'! 
puppet.module_path = 'provisioning/modules'! 
puppet.manifest_file = manifest! 
e!nd! 
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 
Data: 
! 
# 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',! 
}!
# -*- 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))! 
e!nd! def share_puppet_source box! 
e!nd! def share_puppet_modules box! 
box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"! 
e!nd! def provision_box box, manifest! 
box.vm.provision :puppet do |puppet|! 
box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'! 
puppet.pp_path = '/tmp/vagrant-puppet'! 
puppet.manifests_path = 'provisioning/manifests'! 
puppet.module_path = 'provisioning/modules'! 
puppet.manifest_file = manifest! 
e!nd! 
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 
Custom 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
# -*- 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))! 
e!nd! def share_puppet_source box! 
e!nd! def share_puppet_modules box! 
box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"! 
e!nd! def provision_box box, manifest! 
box.vm.provision :puppet do |puppet|! 
box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'! 
puppet.pp_path = '/tmp/vagrant-puppet'! 
puppet.manifests_path = 'provisioning/manifests'! 
puppet.module_path = 'provisioning/modules'! 
puppet.manifest_file = manifest! 
e!nd! 
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 
VM 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
# -*- 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))! 
e!nd! def share_puppet_source box! 
e!nd! def share_puppet_modules box! 
box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"! 
e!nd! def provision_box box, manifest! 
box.vm.provision :puppet do |puppet|! 
box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'! 
puppet.pp_path = '/tmp/vagrant-puppet'! 
puppet.manifests_path = 'provisioning/manifests'! 
puppet.module_path = 'provisioning/modules'! 
puppet.manifest_file = manifest! 
e!nd! 
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
Build Abstractions
Build Abstractions 
• Eliminate manual bookkeeping
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
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!
Build Abstractions 
• Eliminate manual bookkeeping 
• Automate repetitive tasks
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!
Build Abstractions 
• Eliminate manual bookkeeping 
• Automate repetitive tasks 
• Separate data from logic
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!
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!
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!
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!
Raw Materials
Raw Materials 
• Which boxes are in use? Do 
the older boxes still work?
Raw Materials 
• Which boxes are in use? Do 
the older boxes still work? 
• How were the boxes created?
Raw Materials 
• Which boxes are in use? Do 
the older boxes still work? 
• How were the boxes created?
Phased Builds
Phased Builds 
Base Install
Phased Builds 
Shared Customizations 
Base Install
Phased Builds 
Open Source Puppet Enterprise 
Shared Customizations 
Base Install
Build Server 
Phased Builds 
Open Source Puppet Enterprise 
Shared Customizations 
Base Install
Where We Ended Up
Where We Ended Up 
• Shared environments enable teams to focus on problem solving
Where We Ended Up 
• Shared environments enable teams to focus on problem solving 
• New employee on-boarding is easier
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
Resources 
• http://www.vagrantup.com/ 
• https://github.com/adrienthebo/oscar 
• https://github.com/Sharpie/puppet-debugging-kit 
• http://www.packer.io/ 
• https://vagrantcloud.com/puppetlabs

More Related Content

What's hot (19)

PPTX
Environments line-up! Vagrant & Puppet 101
jelrikvh
 
PDF
Es.next
Ignacio Gil
 
PPTX
Vagrant WordCamp Hamilton
Paul Bearne
 
PDF
Kickin' Ass with Cache-Fu (with notes)
err
 
PDF
Przemysław Iwanek - ABC AWS, budowanie infrastruktury przy pomocy Terraform
jzielinski_pl
 
PDF
Automate with Ansible basic (2/e, English)
Chu-Siang Lai
 
PDF
Debugging webOS applications
fpatton
 
KEY
Ruby
Kerry Buckley
 
PDF
Kickin' Ass with Cache-Fu (without notes)
err
 
PDF
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Puppet
 
KEY
Automate or Die
Trotter Cashion
 
PDF
Chef Workshop: Setup Environment with Chef,Vagrant, and Berkshelf
Jun Sakata
 
PDF
May The Nodejs Be With You
Dalibor Gogic
 
PDF
Effective ES6
Teppei Sato
 
PDF
pam_container -- jeszcze lżejsza wirtualizacja
gnosek
 
PDF
An Introduction to Go
Cloudflare
 
PDF
Hands on Pier
ESUG
 
PPTX
Getting started with ES6 : Future of javascript
Mohd Saeed
 
PDF
Transforming WebSockets
Arnout Kazemier
 
Environments line-up! Vagrant & Puppet 101
jelrikvh
 
Es.next
Ignacio Gil
 
Vagrant WordCamp Hamilton
Paul Bearne
 
Kickin' Ass with Cache-Fu (with notes)
err
 
Przemysław Iwanek - ABC AWS, budowanie infrastruktury przy pomocy Terraform
jzielinski_pl
 
Automate with Ansible basic (2/e, English)
Chu-Siang Lai
 
Debugging webOS applications
fpatton
 
Kickin' Ass with Cache-Fu (without notes)
err
 
Boxen: How to Manage an Army of Laptops and Live to Talk About It
Puppet
 
Automate or Die
Trotter Cashion
 
Chef Workshop: Setup Environment with Chef,Vagrant, and Berkshelf
Jun Sakata
 
May The Nodejs Be With You
Dalibor Gogic
 
Effective ES6
Teppei Sato
 
pam_container -- jeszcze lżejsza wirtualizacja
gnosek
 
An Introduction to Go
Cloudflare
 
Hands on Pier
ESUG
 
Getting started with ES6 : Future of javascript
Mohd Saeed
 
Transforming WebSockets
Arnout Kazemier
 

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

PDF
Intro to vagrant
Mantas Klasavicius
 
KEY
Puppet for Java developers - JavaZone NO 2012
Carlos Sanchez
 
PDF
How I hack on puppet modules
Kris Buytaert
 
PDF
Getting started with puppet and vagrant (1)
Puppet
 
PDF
Puppet and Vagrant in development
Adam Culp
 
PDF
Security Testing Using Infrastructure-As-Code
Vision Concepts Infrastructure Services Solution
 
PDF
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Puppet
 
PDF
Vagrant Binding JayDay 2013
Hendrik Ebbers
 
PDF
20090514 Introducing Puppet To Sasag
garrett honeycutt
 
PDF
Introduction to Vagrant
Marcelo Pinheiro
 
ODP
Puppet and the HashiCorp Suite
Bram Vogelaar
 
PDF
Puppet and the HashiStack
Bram Vogelaar
 
PDF
Create Disposable Test Environments with Vagrant and Puppet
Gene Gotimer
 
PDF
Create Disposable Test Environments with Vagrant and Puppet
Coveros, Inc.
 
KEY
From Dev to DevOps - ApacheCON NA 2011
Carlos Sanchez
 
PDF
From Dev to DevOps
Agile Spain
 
PPTX
Virtualization for Developers
John Coggeshall
 
KEY
Using Vagrant
andygale
 
PDF
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
DECK36
 
KEY
20100425 Configuration Management With Puppet Lfnw
garrett honeycutt
 
Intro to vagrant
Mantas Klasavicius
 
Puppet for Java developers - JavaZone NO 2012
Carlos Sanchez
 
How I hack on puppet modules
Kris Buytaert
 
Getting started with puppet and vagrant (1)
Puppet
 
Puppet and Vagrant in development
Adam Culp
 
Security Testing Using Infrastructure-As-Code
Vision Concepts Infrastructure Services Solution
 
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Puppet
 
Vagrant Binding JayDay 2013
Hendrik Ebbers
 
20090514 Introducing Puppet To Sasag
garrett honeycutt
 
Introduction to Vagrant
Marcelo Pinheiro
 
Puppet and the HashiCorp Suite
Bram Vogelaar
 
Puppet and the HashiStack
Bram Vogelaar
 
Create Disposable Test Environments with Vagrant and Puppet
Gene Gotimer
 
Create Disposable Test Environments with Vagrant and Puppet
Coveros, Inc.
 
From Dev to DevOps - ApacheCON NA 2011
Carlos Sanchez
 
From Dev to DevOps
Agile Spain
 
Virtualization for Developers
John Coggeshall
 
Using Vagrant
andygale
 
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
DECK36
 
20100425 Configuration Management With Puppet Lfnw
garrett honeycutt
 
Ad

More from Atlassian (20)

PPTX
International Women's Day 2020
Atlassian
 
PDF
10 emerging trends that will unbreak your workplace in 2020
Atlassian
 
PDF
Forge App Showcase
Atlassian
 
PDF
Let's Build an Editor Macro with Forge UI
Atlassian
 
PDF
Meet the Forge Runtime
Atlassian
 
PDF
Forge UI: A New Way to Customize the Atlassian User Experience
Atlassian
 
PDF
Take Action with Forge Triggers
Atlassian
 
PDF
Observability and Troubleshooting in Forge
Atlassian
 
PDF
Trusted by Default: The Forge Security & Privacy Model
Atlassian
 
PDF
Designing Forge UI: A Story of Designing an App UI System
Atlassian
 
PDF
Forge: Under the Hood
Atlassian
 
PDF
Access to User Activities - Activity Platform APIs
Atlassian
 
PDF
Design Your Next App with the Atlassian Vendor Sketch Plugin
Atlassian
 
PDF
Tear Up Your Roadmap and Get Out of the Building
Atlassian
 
PDF
Nailing Measurement: a Framework for Measuring Metrics that Matter
Atlassian
 
PDF
Building Apps With Color Blind Users in Mind
Atlassian
 
PDF
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Atlassian
 
PDF
Beyond Diversity: A Guide to Building Balanced Teams
Atlassian
 
PDF
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
Atlassian
 
PDF
Building Apps With Enterprise in Mind
Atlassian
 
International Women's Day 2020
Atlassian
 
10 emerging trends that will unbreak your workplace in 2020
Atlassian
 
Forge App Showcase
Atlassian
 
Let's Build an Editor Macro with Forge UI
Atlassian
 
Meet the Forge Runtime
Atlassian
 
Forge UI: A New Way to Customize the Atlassian User Experience
Atlassian
 
Take Action with Forge Triggers
Atlassian
 
Observability and Troubleshooting in Forge
Atlassian
 
Trusted by Default: The Forge Security & Privacy Model
Atlassian
 
Designing Forge UI: A Story of Designing an App UI System
Atlassian
 
Forge: Under the Hood
Atlassian
 
Access to User Activities - Activity Platform APIs
Atlassian
 
Design Your Next App with the Atlassian Vendor Sketch Plugin
Atlassian
 
Tear Up Your Roadmap and Get Out of the Building
Atlassian
 
Nailing Measurement: a Framework for Measuring Metrics that Matter
Atlassian
 
Building Apps With Color Blind Users in Mind
Atlassian
 
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Atlassian
 
Beyond Diversity: A Guide to Building Balanced Teams
Atlassian
 
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
Atlassian
 
Building Apps With Enterprise in Mind
Atlassian
 
Ad

Recently uploaded (20)

PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PPTX
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PPTX
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
IObit Driver Booster Pro 12.4.0.585 Crack Free Download
henryc1122g
 
PPTX
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
PPTX
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
PDF
UITP Summit Meep Pitch may 2025 MaaS Rebooted
campoamor1
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
IObit Driver Booster Pro 12.4.0.585 Crack Free Download
henryc1122g
 
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
UITP Summit Meep Pitch may 2025 MaaS Rebooted
campoamor1
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 

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

  • 1. Standardized Debugging Environments Taking the Friction Out of Ticket Investigation Charlie Sharpsteen Open Source Support Engineer, Puppet Labs
  • 2. What Are We Trying to Improve?
  • 5. Collaboration Across Groups… Support Engineering
  • 6. Collaboration Across Groups… Support Engineering Users
  • 7. Collaboration Across Groups… Support Engineering Users …and Across Environments
  • 8. Collaboration Across Groups… Support Engineering Users …and Across Environments Windows Linux
  • 9. Collaboration Across Groups… Support Engineering Users …and Across Environments Windows OS X Solaris Linux
  • 10. What I cannot create, I do not understand. - Richard Feynmen
  • 12. First Steps • Hand-built VMs
  • 13. First Steps • Hand-built VMs • Manually managed snapshots
  • 14. First Steps • Hand-built VMs • Manually managed snapshots • Hard to scale out and manually manage many VMs
  • 16. Enter Vagrant • A tool that allows us to create and manage many VM instances
  • 17. 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
  • 18. 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
  • 19. # -*- 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))! e!nd! def share_puppet_source box! e!nd! def share_puppet_modules box! box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"! e!nd! def provision_box box, manifest! box.vm.provision :puppet do |puppet|! box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'! puppet.pp_path = '/tmp/vagrant-puppet'! puppet.manifests_path = 'provisioning/manifests'! puppet.module_path = 'provisioning/modules'! puppet.manifest_file = manifest! e!nd! 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
  • 20. # -*- 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))! e!nd! def share_puppet_source box! e!nd! def share_puppet_modules box! box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"! e!nd! def provision_box box, manifest! box.vm.provision :puppet do |puppet|! box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'! puppet.pp_path = '/tmp/vagrant-puppet'! puppet.manifests_path = 'provisioning/manifests'! puppet.module_path = 'provisioning/modules'! puppet.manifest_file = manifest! e!nd! 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 Data: ! # 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',! }!
  • 21. # -*- 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))! e!nd! def share_puppet_source box! e!nd! def share_puppet_modules box! box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"! e!nd! def provision_box box, manifest! box.vm.provision :puppet do |puppet|! box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'! puppet.pp_path = '/tmp/vagrant-puppet'! puppet.manifests_path = 'provisioning/manifests'! puppet.module_path = 'provisioning/modules'! puppet.manifest_file = manifest! e!nd! 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 Custom 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
  • 22. # -*- 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))! e!nd! def share_puppet_source box! e!nd! def share_puppet_modules box! box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"! e!nd! def provision_box box, manifest! box.vm.provision :puppet do |puppet|! box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'! puppet.pp_path = '/tmp/vagrant-puppet'! puppet.manifests_path = 'provisioning/manifests'! puppet.module_path = 'provisioning/modules'! puppet.manifest_file = manifest! e!nd! 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 VM 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
  • 23. # -*- 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))! e!nd! def share_puppet_source box! e!nd! def share_puppet_modules box! box.vm.share_folder 'puppet-source', '/puppetlabs', "#{ENV['HOME']}/Source/puppetlabs"! e!nd! def provision_box box, manifest! box.vm.provision :puppet do |puppet|! box.vm.share_folder 'puppet-modules', '/usr/share/puppet/modules', 'provisioning/modules'! puppet.pp_path = '/tmp/vagrant-puppet'! puppet.manifests_path = 'provisioning/manifests'! puppet.module_path = 'provisioning/modules'! puppet.manifest_file = manifest! e!nd! 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
  • 25. Build Abstractions • Eliminate manual bookkeeping
  • 26. 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
  • 27. 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!
  • 28. Build Abstractions • Eliminate manual bookkeeping • Automate repetitive tasks
  • 29. 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!
  • 30. Build Abstractions • Eliminate manual bookkeeping • Automate repetitive tasks • Separate data from logic
  • 31. 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!
  • 32. 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!
  • 33. 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!
  • 34. 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!
  • 36. Raw Materials • Which boxes are in use? Do the older boxes still work?
  • 37. Raw Materials • Which boxes are in use? Do the older boxes still work? • How were the boxes created?
  • 38. Raw Materials • Which boxes are in use? Do the older boxes still work? • How were the boxes created?
  • 41. Phased Builds Shared Customizations Base Install
  • 42. Phased Builds Open Source Puppet Enterprise Shared Customizations Base Install
  • 43. Build Server Phased Builds Open Source Puppet Enterprise Shared Customizations Base Install
  • 45. Where We Ended Up • Shared environments enable teams to focus on problem solving
  • 46. Where We Ended Up • Shared environments enable teams to focus on problem solving • New employee on-boarding is easier
  • 47. 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
  • 48. Resources • http://www.vagrantup.com/ • https://github.com/adrienthebo/oscar • https://github.com/Sharpie/puppet-debugging-kit • http://www.packer.io/ • https://vagrantcloud.com/puppetlabs