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
PHPからはじめるコンピュータアーキテクチャ / From Scripts to Silicon: A Journey Through the Layers of Computing
tomzoh
2
380
AI時代にも変わらぬ価値を発揮したい: インフラ・クラウドを切り口にユーザー価値と非機能要件に向き合ってエンジニアとしての地力を培う
netmarkjp
0
220
claude codeでPrompt Engineering
iori0311
0
420
SAE J1939シミュレーション環境構築
daikiokazaki
0
130
QuickBooks®️ Customer®️ USA Contact Numbers: Complete 2025 Support Guide
qbsupportinfo
0
100
会社もクラウドも違うけど 通じたコスト削減テクニック/Cost optimization strategies effective regardless of company or cloud provider
aeonpeople
2
160
DATA+AI SummitとSnowflake Summit: ユーザから見た共通点と相違点 / DATA+AI Summit and Snowflake Summit
nttcom
0
210
Snowflake のアーキテクチャは本当に筋がよかったのか / Data Engineering Study #30
indigo13love
0
250
激動の時代、新卒エンジニアはAIツールにどう向き合うか。 [LayerX Bet AI Day Countdown LT Day1 ツールの選択]
tak848
0
540
QAを早期に巻き込む”って どうやるの? モヤモヤから抜け出す実践知
moritamasami
2
180
複数のGemini CLIが同時開発する狂気 - Jujutsuが実現するAIエージェント協調の新世界
gunta
11
3.2k
DatabricksのOLTPデータベース『Lakebase』に詳しくなろう!
inoutk
0
100
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
6.5k
Unsuck your backbone
ammeep
671
58k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1k
Typedesign – Prime Four
hannesfritz
42
2.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
108
19k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
850
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