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
810
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 Tables + Amazon Athena / Apache Iceberg
okaru
0
240
All You Need Is Kusa 〜Slackデータで始めるデータドリブン〜
jonnojun
0
140
IVRyにおけるNLP活用と NLP2025の関連論文紹介
keisukeosone
0
180
“パスワードレス認証への道" ユーザー認証の変遷とパスキーの関係
ritou
1
390
От ручной разметки к LLM: как мы создавали облако тегов в Lamoda. Анастасия Ангелова, Data Scientist, Lamoda Tech
lamodatech
0
220
開発視点でAWS Signerを考えてみよう!! ~コード署名のその先へ~
masakiokuda
3
130
大AI時代で輝くために今こそドメインにディープダイブしよう / Deep Dive into Domain in AI-Agent-Era
yuitosato
1
270
Tokyo dbt Meetup #13 dbtと連携するBI製品&機能ざっくり紹介
sagara
0
420
ゆるくVPC Latticeについてまとめてみたら、意外と奥深い件
masakiokuda
2
230
【2025年度新卒技術研修】100分で学ぶ サイバーエージェントのデータベース 活用事例とMySQLパフォーマンス調査
cyberagentdevelopers
PRO
4
6.3k
GitHub MCP Serverを使って Pull Requestを作る、レビューする
hiyokose
2
710
OSSコントリビュートをphp-srcメンテナの立場から語る / OSS Contribute
sakitakamachi
0
1.3k
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
336
57k
Agile that works and the tools we love
rasmusluckow
328
21k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Six Lessons from altMBA
skipperchong
27
3.7k
Building Adaptive Systems
keathley
41
2.5k
Statistics for Hackers
jakevdp
798
220k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
How to Ace a Technical Interview
jacobian
276
23k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
5
520
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
YesSQL, Process and Tooling at Scale
rocio
172
14k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.4k
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: gary@puppetlabs.com • Web:
http://www.puppetlabs.com Saturday, October 22, 2011