SlideShare a Scribd company logo
1 of 21
Download to read offline
Getting Started 
with Puppet and Vagrant 
Jon Topper 
The Scale Factory
2 Cool Technologies That Will 
Actually Change Your Life
Chronology 
1995 2000 2005 2010 2015
Sysadmin Development Lifecycle 
Set up test 
environment 
Make change 
Did change work? 
Yes 
Commit 
No
Hardware Approach 
Set up test 
environment 
Make change 
Did change work? 
Yes 
Commit 
No 
‣ Walk to server room 
‣ Plug in keyboard/monitor 
‣ Reboot Server (~2m) 
‣ Wait for Kickstart install (~30m) 
‣ Upload automation bash scripts 
‣ Run them (~15m) 
‣ Assess success
Virtualisation 
Set up test 
environment 
Make change 
Did change work? 
Yes 
Commit 
No 
‣ Use Kickstart to create base image 
(~30m) 
‣ Roll back to VM snapshot 
‣ Upload automation bash scripts 
‣ Run them (~15m) 
‣ Assess success
What is Vagrant? 
‣ Command line tool 
‣ Supports Linux, Mac, Windows 
‣ Supports multiple hypervisors 
‣ Folder sharing 
‣ As portable as your laptop
What is Vagrant? 
‣ Import pre-defined “base boxes” from remote servers 
‣ Describe box configuration in Vagrantfile 
‣ Share both with other people 
‣ “vagrant up” starts a clean, new environment 
‣ “vagrant destroy” throws it away.
What is Vagrant? 
Webserver 
Messenger Database 
Text editor Browser 
Operating System 
Music 
Twitter 
Photoshop 
Filesystem
What is Vagrant? 
Browser Photoshop 
Database 
Operating System 
Webserver 
Text editor 
Messenger 
Music 
Twitter 
Guest O/S 
Filesystem
Puppet 
‣ Configuration Management tool 
‣ “Infrastructure as Code” 
‣ Convergent
Puppet 
‣ Describe desired system state 
‣ “What”, rather than “How” 
‣ Puppet moves system from current, to desired state
Demo Project Structure 
. 
!"" README.md 
!"" Vagrantfile 
!"" application 
# !"" index.php 
# $"" ping.php 
$"" puppet 
!"" manifests 
# $"" site.pp 
$"" modules 
!"" demo_apache 
# !"" files 
# # $"" httpd.conf 
# $"" manifests 
# $"" init.pp 
!"" demo_defaults 
# $"" manifests 
# $"" init.pp 
!"" demo_php 
# $"" manifests 
# $"" init.pp 
!"" demo_role_database
Vagrantfile 
Vagrant.configure("2") do |config| 
# Set up some box defaults. We're going to use the Puppet Labs 
# CentOS 6.5 x86_64 base box, and give it 1GB RAM 
config.vm.box = 'puppetlabs/centos-6.5-64-puppet' 
# … 
# Set up some Puppet "facts". These will be available to the 
# puppet manifests when they run. 
puppet_facts = { 
"vagrant" => “1”, 
"roles" => [ 'webserver', 'database' ] 
} 
# Provision the Vagrant box using Puppet. 
config.vm.provision "puppet" do |puppet| 
puppet.manifests_path = "puppet/manifests" 
puppet.manifest_file = "site.pp" 
puppet.module_path = "puppet/modules" 
puppet.facter = puppet_facts 
end 
end
Nodeless Configuration 
# On every node... 
node default { 
# ...apply some default settings 
class { demo_defaults: } 
# Then apply classes for each role we've found via facts: 
if( 'webserver' in $roles ) { 
notice("Found 'webserver' role via Facts") 
class { demo_role_webserver: } 
} 
if( 'database' in $roles ) { 
notice("Found 'database' role via Facts") 
class { demo_role_database: } 
} 
}
Nodeless Configuration 
class demo_defaults { 
# ... 
# If this is a vagrant box, let's just stop iptables because we don't need 
# any firewalling. 
if( $vagrant ) { 
service { "iptables": 
ensure => stopped, 
enable => false, 
} 
} 
}
(Demo)
Benefits 
‣ Short cycle time 
‣ No copying files around 
‣ Share box & manifests with development teams 
‣ Easy to try existing config on new operating systems
Advanced Usage 
‣ Multiple box environments with private networking 
‣ “vagrant share” features of Vagrant Cloud 
‣ Build production images with the same tools 
‣ Build fully automated test suites
Try it yourself 
‣ https://github.com/jtopper/vagrant-demo 
‣ Follow the instructions in the README 
‣ Open a new GitHub issue if you get stuck!
http://www.scalefactory.com/ 
@jtopper 
jon@scalefactory.com 
scalefactory

More Related Content

What's hot

Puppet Camp Chicago 2014: Running Multiple Puppet Masters (Beginner)
Puppet Camp Chicago 2014: Running Multiple Puppet Masters (Beginner) Puppet Camp Chicago 2014: Running Multiple Puppet Masters (Beginner)
Puppet Camp Chicago 2014: Running Multiple Puppet Masters (Beginner) Puppet
 
Running at Scale: Practical Performance Tuning with Puppet - PuppetConf 2013
Running at Scale: Practical Performance Tuning with Puppet - PuppetConf 2013Running at Scale: Practical Performance Tuning with Puppet - PuppetConf 2013
Running at Scale: Practical Performance Tuning with Puppet - PuppetConf 2013Puppet
 
OpenNebula Conf 2014 | Puppet and OpenNebula - David Lutterkort
OpenNebula Conf 2014 | Puppet and OpenNebula - David LutterkortOpenNebula Conf 2014 | Puppet and OpenNebula - David Lutterkort
OpenNebula Conf 2014 | Puppet and OpenNebula - David LutterkortNETWAYS
 
Deploying Drupal using Capistrano
Deploying Drupal using CapistranoDeploying Drupal using Capistrano
Deploying Drupal using CapistranoJochen Verdeyen
 
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpecMartin Etmajer
 
Serverspec and Sensu - Testing and Monitoring collide
Serverspec and Sensu - Testing and Monitoring collideServerspec and Sensu - Testing and Monitoring collide
Serverspec and Sensu - Testing and Monitoring collidem_richardson
 
HKG15-204: OpenStack: 3rd party testing and performance benchmarking
HKG15-204: OpenStack: 3rd party testing and performance benchmarkingHKG15-204: OpenStack: 3rd party testing and performance benchmarking
HKG15-204: OpenStack: 3rd party testing and performance benchmarkingLinaro
 
Delivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and DockerDelivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and DockerJorrit Salverda
 
Configuration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needsConfiguration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needsSaltStack
 
Docker ansible-make-chef-puppet-unnecessary-minnihan
Docker ansible-make-chef-puppet-unnecessary-minnihanDocker ansible-make-chef-puppet-unnecessary-minnihan
Docker ansible-make-chef-puppet-unnecessary-minnihanjbminn
 
Using Rally for OpenStack certification at Scale
Using Rally for OpenStack certification at ScaleUsing Rally for OpenStack certification at Scale
Using Rally for OpenStack certification at ScaleBoris Pavlovic
 
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and KibanaPuppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibanapkill
 
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph GaluschkaOpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph GaluschkaNETWAYS
 
Whatthestack using Tempest for testing your OpenStack deployment
Whatthestack using Tempest for testing your OpenStack deploymentWhatthestack using Tempest for testing your OpenStack deployment
Whatthestack using Tempest for testing your OpenStack deploymentChristian Schwede
 
Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021alinalexandru
 
Automation with Ansible and Containers
Automation with Ansible and ContainersAutomation with Ansible and Containers
Automation with Ansible and ContainersRodolfo Carvalho
 
Masterless puppet
Masterless puppetMasterless puppet
Masterless puppetJesus Nunez
 
Trevor McDonald - Nagios XI Under The Hood
Trevor McDonald  - Nagios XI Under The HoodTrevor McDonald  - Nagios XI Under The Hood
Trevor McDonald - Nagios XI Under The HoodNagios
 
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...Uri Cohen
 

What's hot (20)

Puppet Camp Chicago 2014: Running Multiple Puppet Masters (Beginner)
Puppet Camp Chicago 2014: Running Multiple Puppet Masters (Beginner) Puppet Camp Chicago 2014: Running Multiple Puppet Masters (Beginner)
Puppet Camp Chicago 2014: Running Multiple Puppet Masters (Beginner)
 
Running at Scale: Practical Performance Tuning with Puppet - PuppetConf 2013
Running at Scale: Practical Performance Tuning with Puppet - PuppetConf 2013Running at Scale: Practical Performance Tuning with Puppet - PuppetConf 2013
Running at Scale: Practical Performance Tuning with Puppet - PuppetConf 2013
 
OpenNebula Conf 2014 | Puppet and OpenNebula - David Lutterkort
OpenNebula Conf 2014 | Puppet and OpenNebula - David LutterkortOpenNebula Conf 2014 | Puppet and OpenNebula - David Lutterkort
OpenNebula Conf 2014 | Puppet and OpenNebula - David Lutterkort
 
Deploying Drupal using Capistrano
Deploying Drupal using CapistranoDeploying Drupal using Capistrano
Deploying Drupal using Capistrano
 
OMD and Check_mk
OMD and Check_mkOMD and Check_mk
OMD and Check_mk
 
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
 
Serverspec and Sensu - Testing and Monitoring collide
Serverspec and Sensu - Testing and Monitoring collideServerspec and Sensu - Testing and Monitoring collide
Serverspec and Sensu - Testing and Monitoring collide
 
HKG15-204: OpenStack: 3rd party testing and performance benchmarking
HKG15-204: OpenStack: 3rd party testing and performance benchmarkingHKG15-204: OpenStack: 3rd party testing and performance benchmarking
HKG15-204: OpenStack: 3rd party testing and performance benchmarking
 
Delivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and DockerDelivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and Docker
 
Configuration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needsConfiguration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needs
 
Docker ansible-make-chef-puppet-unnecessary-minnihan
Docker ansible-make-chef-puppet-unnecessary-minnihanDocker ansible-make-chef-puppet-unnecessary-minnihan
Docker ansible-make-chef-puppet-unnecessary-minnihan
 
Using Rally for OpenStack certification at Scale
Using Rally for OpenStack certification at ScaleUsing Rally for OpenStack certification at Scale
Using Rally for OpenStack certification at Scale
 
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and KibanaPuppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
 
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph GaluschkaOpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
 
Whatthestack using Tempest for testing your OpenStack deployment
Whatthestack using Tempest for testing your OpenStack deploymentWhatthestack using Tempest for testing your OpenStack deployment
Whatthestack using Tempest for testing your OpenStack deployment
 
Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021
 
Automation with Ansible and Containers
Automation with Ansible and ContainersAutomation with Ansible and Containers
Automation with Ansible and Containers
 
Masterless puppet
Masterless puppetMasterless puppet
Masterless puppet
 
Trevor McDonald - Nagios XI Under The Hood
Trevor McDonald  - Nagios XI Under The HoodTrevor McDonald  - Nagios XI Under The Hood
Trevor McDonald - Nagios XI Under The Hood
 
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
 

Similar to Getting started with puppet and vagrant (1)

A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy Systemadrian_nye
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetAchieve Internet
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierCarlos Sanchez
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012Carlos Sanchez
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modulesKris Buytaert
 
Using Vagrant
Using VagrantUsing Vagrant
Using Vagrantandygale
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in developmentAdam Culp
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Carlos Sanchez
 
Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitAndreas Heim
 
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...Acquia
 
Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionJoshua Thijssen
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesPavol Pitoňák
 
Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Hendrik Ebbers
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantBrian Hogan
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packerfrastel
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java binOlve Hansen
 
Bangpypers april-meetup-2012
Bangpypers april-meetup-2012Bangpypers april-meetup-2012
Bangpypers april-meetup-2012Deepak Garg
 

Similar to Getting started with puppet and vagrant (1) (20)

A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next Frontier
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
Using Vagrant
Using VagrantUsing Vagrant
Using Vagrant
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profit
 
Vagrant
VagrantVagrant
Vagrant
 
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
 
Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG edition
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
 
Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with Vagrant
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java bin
 
Bangpypers april-meetup-2012
Bangpypers april-meetup-2012Bangpypers april-meetup-2012
Bangpypers april-meetup-2012
 

More from Puppet

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyamlPuppet
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)Puppet
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscodePuppet
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twentiesPuppet
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codePuppet
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approachPuppet
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationPuppet
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliancePuppet
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowPuppet
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Puppet
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppetPuppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkPuppet
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping groundPuppet
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy SoftwarePuppet
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User GroupPuppet
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsPuppet
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyPuppet
 

More from Puppet (20)

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscode
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twenties
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance code
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approach
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliance
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNow
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden Windows
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael Pinson
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin Reeuwijk
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping ground
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User Group
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOps
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 

Getting started with puppet and vagrant (1)

  • 1. Getting Started with Puppet and Vagrant Jon Topper The Scale Factory
  • 2. 2 Cool Technologies That Will Actually Change Your Life
  • 3. Chronology 1995 2000 2005 2010 2015
  • 4. Sysadmin Development Lifecycle Set up test environment Make change Did change work? Yes Commit No
  • 5. Hardware Approach Set up test environment Make change Did change work? Yes Commit No ‣ Walk to server room ‣ Plug in keyboard/monitor ‣ Reboot Server (~2m) ‣ Wait for Kickstart install (~30m) ‣ Upload automation bash scripts ‣ Run them (~15m) ‣ Assess success
  • 6. Virtualisation Set up test environment Make change Did change work? Yes Commit No ‣ Use Kickstart to create base image (~30m) ‣ Roll back to VM snapshot ‣ Upload automation bash scripts ‣ Run them (~15m) ‣ Assess success
  • 7. What is Vagrant? ‣ Command line tool ‣ Supports Linux, Mac, Windows ‣ Supports multiple hypervisors ‣ Folder sharing ‣ As portable as your laptop
  • 8. What is Vagrant? ‣ Import pre-defined “base boxes” from remote servers ‣ Describe box configuration in Vagrantfile ‣ Share both with other people ‣ “vagrant up” starts a clean, new environment ‣ “vagrant destroy” throws it away.
  • 9. What is Vagrant? Webserver Messenger Database Text editor Browser Operating System Music Twitter Photoshop Filesystem
  • 10. What is Vagrant? Browser Photoshop Database Operating System Webserver Text editor Messenger Music Twitter Guest O/S Filesystem
  • 11. Puppet ‣ Configuration Management tool ‣ “Infrastructure as Code” ‣ Convergent
  • 12. Puppet ‣ Describe desired system state ‣ “What”, rather than “How” ‣ Puppet moves system from current, to desired state
  • 13. Demo Project Structure . !"" README.md !"" Vagrantfile !"" application # !"" index.php # $"" ping.php $"" puppet !"" manifests # $"" site.pp $"" modules !"" demo_apache # !"" files # # $"" httpd.conf # $"" manifests # $"" init.pp !"" demo_defaults # $"" manifests # $"" init.pp !"" demo_php # $"" manifests # $"" init.pp !"" demo_role_database
  • 14. Vagrantfile Vagrant.configure("2") do |config| # Set up some box defaults. We're going to use the Puppet Labs # CentOS 6.5 x86_64 base box, and give it 1GB RAM config.vm.box = 'puppetlabs/centos-6.5-64-puppet' # … # Set up some Puppet "facts". These will be available to the # puppet manifests when they run. puppet_facts = { "vagrant" => “1”, "roles" => [ 'webserver', 'database' ] } # Provision the Vagrant box using Puppet. config.vm.provision "puppet" do |puppet| puppet.manifests_path = "puppet/manifests" puppet.manifest_file = "site.pp" puppet.module_path = "puppet/modules" puppet.facter = puppet_facts end end
  • 15. Nodeless Configuration # On every node... node default { # ...apply some default settings class { demo_defaults: } # Then apply classes for each role we've found via facts: if( 'webserver' in $roles ) { notice("Found 'webserver' role via Facts") class { demo_role_webserver: } } if( 'database' in $roles ) { notice("Found 'database' role via Facts") class { demo_role_database: } } }
  • 16. Nodeless Configuration class demo_defaults { # ... # If this is a vagrant box, let's just stop iptables because we don't need # any firewalling. if( $vagrant ) { service { "iptables": ensure => stopped, enable => false, } } }
  • 18. Benefits ‣ Short cycle time ‣ No copying files around ‣ Share box & manifests with development teams ‣ Easy to try existing config on new operating systems
  • 19. Advanced Usage ‣ Multiple box environments with private networking ‣ “vagrant share” features of Vagrant Cloud ‣ Build production images with the same tools ‣ Build fully automated test suites
  • 20. Try it yourself ‣ https://github.com/jtopper/vagrant-demo ‣ Follow the instructions in the README ‣ Open a new GitHub issue if you get stuck!