Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Agile Deployments with Puppet
Search
glarizza
October 22, 2011
Technology
3
820
Agile Deployments with Puppet
Presentation given at Camp Devops in Chicago (
http://www.campdevops.com
)
glarizza
October 22, 2011
Tweet
Share
Other Decks in Technology
See All in Technology
Amazon S3標準/ S3 Tables/S3 Express One Zoneを使ったログ分析
shigeruoda
4
570
TechLION vol.41~MySQLユーザ会のほうから来ました / techlion41_mysql
sakaik
0
190
なぜ私はいま、ここにいるのか? #もがく中堅デザイナー #プロダクトデザイナー
bengo4com
0
1.1k
使いたいMCPサーバーはWeb APIをラップして自分で作る #QiitaBash
bengo4com
0
980
BrainPadプログラミングコンテスト記念LT会2025_社内イベント&問題解説
brainpadpr
1
170
「良さそう」と「とても良い」の間には 「良さそうだがホンマか」がたくさんある / 2025.07.01 LLM品質Night
smiyawaki0820
1
380
Claude Code Actionを使ったコード品質改善の取り組み
potix2
PRO
6
2.5k
KubeCon + CloudNativeCon Japan 2025 Recap by CA
ponkio_o
PRO
0
190
AI導入の理想と現実~コストと浸透〜
oprstchn
0
110
Node-REDのFunctionノードでMCPサーバーの実装を試してみた / Node-RED × MCP 勉強会 vol.1
you
PRO
0
120
フィンテック養成勉強会#54
finengine
0
180
GeminiとNotebookLMによる金融実務の業務革新
abenben
0
240
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Into the Great Unknown - MozCon
thekraken
39
1.9k
Agile that works and the tools we love
rasmusluckow
329
21k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Optimizing for Happiness
mojombo
379
70k
Navigating Team Friction
lara
187
15k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Stop Working from a Prison Cell
hatefulcrawdad
270
20k
Documentation Writing (for coders)
carmenintech
72
4.9k
How STYLIGHT went responsive
nonsquared
100
5.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Transcript
Agile Deployments with Puppet Gary Larizza Puppet Labs @glarizza Saturday,
October 22, 2011
Agile Deployments with Puppet Gary Larizza Puppet Labs @glarizza http://bit.ly/garydevops
Saturday, October 22, 2011
DevOps • Culture not tools? • Release Management? • http://slidesha.re/itweapon
• http://bit.ly/toolsmatter • http://slidesha.re/devopstools Saturday, October 22, 2011
Example of ‘poor deployment’ Saturday, October 22, 2011
Saturday, October 22, 2011
Developer Operations Saturday, October 22, 2011
Developer Operations Saturday, October 22, 2011
Developer Production Operations Saturday, October 22, 2011
Developer Production Staging Operations Saturday, October 22, 2011
Developer Production Staging Operations Saturday, October 22, 2011
Developer Production Staging Operations Saturday, October 22, 2011
Developer Production Staging Operations Saturday, October 22, 2011
Developer Production Staging Build Time Operations Day(s) Saturday, October 22,
2011
Developer Production Staging QA Build Time Operations Day(s) Saturday, October
22, 2011
Developer Production Staging QA Build Time Operations Day(s) Saturday, October
22, 2011
Developer Production Staging QA Build Time Operations Day(s) Saturday, October
22, 2011
Developer Production Staging QA Build Time Operations Day(s) Week(s) Saturday,
October 22, 2011
Developer Production Staging QA Build Time Operations Day(s) Week(s) Saturday,
October 22, 2011
Developer Production Staging QA UK Build Time Operations Day(s) Week(s)
Saturday, October 22, 2011
Developer Production Staging QA UK Build Time Operations Day(s) Week(s)
Saturday, October 22, 2011
Developer Production Staging QA UK China Build Time Operations Day(s)
Week(s) Saturday, October 22, 2011
Developer Production Staging QA UK China Build Time Operations Day(s)
Week(s) Saturday, October 22, 2011
Developer Production Staging QA UK China Canada Build Time Operations
Day(s) Week(s) Saturday, October 22, 2011
Developer Production Staging QA UK China Canada Build Time Operations
Day(s) Week(s) Saturday, October 22, 2011
Developer Production Staging QA UK China Canada Build Time Operations
Day(s) Week(s) ??? Saturday, October 22, 2011
Rampination http://bit.ly/pconfkeynote Saturday, October 22, 2011
Example of ‘Agile’ Saturday, October 22, 2011
Saturday, October 22, 2011
Developer Operations Saturday, October 22, 2011
Developer Production Operations Saturday, October 22, 2011
Developer Production Operations Configuration Data Saturday, October 22, 2011
Developer Production Operations Configuration Data Saturday, October 22, 2011
Developer Production Operations Configuration Data Saturday, October 22, 2011
Developer Production Operations Configuration Data Saturday, October 22, 2011
Developer Production Staging Operations Configuration Data Saturday, October 22, 2011
Developer Production Staging Build Time Operations 10 Minutes Configuration Data
Saturday, October 22, 2011
Developer Production Staging Build Time Operations 10 Minutes Configuration Data
Saturday, October 22, 2011
Developer Production Staging Build Time Operations 10 Minutes Configuration Data
Saturday, October 22, 2011
Developer Production Staging QA Build Time Operations 10 Minutes 1-2
Hours Configuration Data Saturday, October 22, 2011
Developer Production Staging QA Build Time Operations 10 Minutes 1-2
Hours Configuration Data Saturday, October 22, 2011
Developer Production Staging QA Build Time Operations 10 Minutes 1-2
Hours Configuration Data Saturday, October 22, 2011
Developer Production Staging QA Build Time Operations 10 Minutes 1-2
Hours 3 Hours Configuration Data Developer Reach Saturday, October 22, 2011
Developer Production Staging QA Build Time Operations 10 Minutes 1-2
Hours 3 Hours Configuration Data Developer Reach Saturday, October 22, 2011
What can Ops learn from Dev? • Do developers re-write
their code at every step? • Version control • Testing frameworks • Expose ‘settings’ through configuration data Saturday, October 22, 2011
Infrastructure as Code with Puppet • Define what needs to
be done • Model your ideal state with simple resources • Configured State vs. Running State • Choose your level of commitment Saturday, October 22, 2011
Resource Abstraction Layer Saturday, October 22, 2011
Resource Abstraction Layer Saturday, October 22, 2011
Resource Abstraction Layer Saturday, October 22, 2011
Resource Abstraction Layer /usr/bin/yum -y install httpd Saturday, October 22,
2011
Saturday, October 22, 2011
Bare Machine Provisioning Base Install Configure Assigned Role Maintenance Puppet’s
Task Saturday, October 22, 2011
Puppet Resources service { 'httpd': ensure => running, enable =>
true, hasstatus => true, hasrestart => true, } Saturday, October 22, 2011
Type Puppet Resources service { 'httpd': ensure => running, enable
=> true, hasstatus => true, hasrestart => true, } Saturday, October 22, 2011
Type Title Puppet Resources service { 'httpd': ensure => running,
enable => true, hasstatus => true, hasrestart => true, } Saturday, October 22, 2011
Type Title Attributes Puppet Resources service { 'httpd': ensure =>
running, enable => true, hasstatus => true, hasrestart => true, } Saturday, October 22, 2011
Facter • Describes aspects of your machine - “facts” •
Facts written in Ruby • Nice library of existing facts • Custom facts are easy Saturday, October 22, 2011
garys-mbp:$ facter domain => puppetlabs.lan facterversion => 1.5.8 fqdn =>
garys-mbp.puppetlabs.lan hardwaremodel => x86_64 hostname => garys-mbp kernel => Darwin macosx_buildversion => 10K549 macosx_productname => Mac OS X macosx_productversion => 10.6.8 macosx_productversion_major => 10.6 macosx_productversion_minor => 8 <...> Facter Saturday, October 22, 2011
Facter.add("computername") do confine :kernel => :darwin setcode('scutil --get ComputerName'.chomp) end
computername scutil --get ComputerName Custom Fact Saturday, October 22, 2011
Facter.add("computername") do confine :kernel => :darwin setcode('scutil --get ComputerName'.chomp) end
computername scutil --get ComputerName Custom Fact Saturday, October 22, 2011
Facter.add("computername") do confine :kernel => :darwin setcode('scutil --get ComputerName'.chomp) end
computername scutil --get ComputerName Fact name Custom Fact Saturday, October 22, 2011
Facter.add("computername") do confine :kernel => :darwin setcode('scutil --get ComputerName'.chomp) end
computername scutil --get ComputerName Command to Execute Fact name Custom Fact Saturday, October 22, 2011
Facter.add("computername") do confine :kernel => :darwin setcode('scutil --get ComputerName'.chomp) end
computername scutil --get ComputerName Command to Execute Fact name Custom Fact Saturday, October 22, 2011
Custom Fact ENV.each do |key,val| Facter.add("env_#{key}") do setcode do val
end end end Saturday, October 22, 2011
Separate Data from Logic • Configuration Data adapts to environment
• Easy deployment - Puppet modules do not change • Eliminate SSH access for deployment Saturday, October 22, 2011
Data Separation Examples Saturday, October 22, 2011
Node Inheritance node common { $dnsserver = '8.8.8.8' $searchdomain =
'puppetlabs.vm' } node devops inherits common { $dnsserver = '10.13.1.3' } node 'agent.puppetlabs.vm' inherits devops { file { '/etc/resolv.conf': content => "search ${searchdomain}\n nameserver ${dnsserver}\n", } } Saturday, October 22, 2011
Data Class in Module class dns::params { $dnsserver = '8.8.8.8'
$searchdomain = 'puppetlabs.vm' } class dns( $dnsserver = $dns::params::dnsserver, $searchdomain = $dns::params::searchdomain ) inherits dns::params { file { '/etc/resolv.conf': content => "search ${searchdomain}\n nameserver ${dnsserver}\n", } } Saturday, October 22, 2011
Extlookup dnsserver, 8.8.8.8 searchdomain, puppetlabs.vm dnsserver, 10.13.1.2 common.csv devops.csv $extlookup_datadir
= "/etc/puppetlabs/puppet/data" $extlookup_precedence = [$clientcert, $environment, $architecture, 'common'] node 'agent.puppetlabs.vm' { include dns } class dns { $dnsserver = extlookup('dnsserver') $searchdomain = extlookup('searchdomain') } Saturday, October 22, 2011
External Node Classifier --- classes: - dns parameters: searchdomain :
‘puppetlabs.vm’ dnsserver : ‘10.13.1.2’ Saturday, October 22, 2011
Hiera • Hierarchal data lookup system • Structured data backend
• YAML, JSON, and current Puppet state • http://bit.ly/hieradata Saturday, October 22, 2011
Saturday, October 22, 2011
Global Defaults Saturday, October 22, 2011
Global Defaults Environment Saturday, October 22, 2011
Global Defaults Environment Role Saturday, October 22, 2011
Global Defaults Environment Role Saturday, October 22, 2011
Global Defaults Environment Role Saturday, October 22, 2011
Global Defaults Environment Role Resultant Data Configuration Saturday, October 22,
2011
Saturday, October 22, 2011
Global Defaults Saturday, October 22, 2011
Global Defaults --- ntpserver: time.puppetlabs.com puppetserver: puppet.puppetlabs.com environment: production Saturday,
October 22, 2011
Global Defaults --- ntpserver: time.puppetlabs.com puppetserver: puppet.puppetlabs.com environment: production Saturday,
October 22, 2011
Global Defaults Environment --- ntpserver: time.puppetlabs.com puppetserver: puppet.puppetlabs.com environment: production
Saturday, October 22, 2011
Global Defaults Environment --- stompserver: stomp-qa.puppetlabs.com puppetserver: puppet-qa.puppetlabs.com environment: qa
--- ntpserver: time.puppetlabs.com puppetserver: puppet.puppetlabs.com environment: production Saturday, October 22, 2011
Global Defaults Environment --- ntpserver: time.puppetlabs.com stompserver: stomp-qa.puppetlabs.com environment: qa
puppetserver: puppet-qa.puppetlabs.com Saturday, October 22, 2011
Global Defaults Environment Role --- ntpserver: time.puppetlabs.com stompserver: stomp-qa.puppetlabs.com environment:
qa puppetserver: puppet-qa.puppetlabs.com Saturday, October 22, 2011
Global Defaults Environment Role --- storeconfigs: true --- ntpserver: time.puppetlabs.com
stompserver: stomp-qa.puppetlabs.com environment: qa puppetserver: puppet-qa.puppetlabs.com Saturday, October 22, 2011
Global Defaults Environment Role --- ntpserver: time.puppetlabs.com stompserver: stomp-qa.puppetlabs.com environment:
qa storeconfigs: true puppetserver: puppet-qa.puppetlabs.com Saturday, October 22, 2011
DEMO TIME Saturday, October 22, 2011
Devops Survey • http://bit.ly/devopssurvey Saturday, October 22, 2011
Code is online https://github.com/glarizza/puppet-datademo Saturday, October 22, 2011
Gary Larizza • Twitter: @glarizza • Email:
[email protected]
• Web:
http://www.puppetlabs.com Saturday, October 22, 2011