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
つくって納得、つかって実感! 大規模言語モデルことはじめ
recruitengineers
PRO
27
9.1k
Claude Code x Androidアプリ 開発
kgmyshin
1
630
kintone開発チームの紹介
cybozuinsideout
PRO
0
73k
コスト削減の基本の「キ」~ コスト消費3大リソースへの対策 ~
smt7174
2
260
JavaScript 研修
recruitengineers
PRO
5
990
AIエージェントの活用に重要な「MCP (Model Context Protocol)」とは何か
masayamoriofficial
0
150
退屈なことはDevinにやらせよう〜〜Devin APIを使ったVisual Regression Testの自動追加〜
kawamataryo
4
850
JuniorからSeniorまで: DevOpsエンジニアの成長ロードマップ
yuriemori
2
300
どこで動かすか、誰が動かすか 〜 kintoneのインフラ基盤刷新と運用体制のシフト 〜
ueokande
0
200
スプリントレトロスペクティブはチーム観察の宝庫? 〜チームの衝突レベルに合わせたアプローチ仮説!〜
electricsatie
1
100
ZOZOTOWNフロントエンドにおけるディレクトリの分割戦略
zozotech
PRO
18
5.7k
Preferred Networks (PFN) とLLM Post-Training チームの紹介 / 第4回 関東Kaggler会 スポンサーセッション
pfn
PRO
1
270
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
Git: the NoSQL Database
bkeepers
PRO
431
65k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Making the Leap to Tech Lead
cromwellryan
134
9.5k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
Automating Front-end Workflow
addyosmani
1370
200k
Documentation Writing (for coders)
carmenintech
73
5k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Making Projects Easy
brettharned
117
6.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.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:
[email protected]
• Web:
http://www.puppetlabs.com Saturday, October 22, 2011