Your SlideShare is downloading. ×
0
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Agile Deployments with Puppet
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Agile Deployments with Puppet

3,290

Published on

Presentation given at by Gary Larizza at Camp Devops in Chicago ( http://www.campdevops.com ) on agile deployments with Puppet. …

Presentation given at by Gary Larizza at Camp Devops in Chicago ( http://www.campdevops.com ) on agile deployments with Puppet.

Learn more about Puppet: www.puppetlabs.com

Subscribe to Gary on Speakerdeck: https://speakerdeck.com/glarizza

Published in: Technology
2 Comments
6 Likes
Statistics
Notes
No Downloads
Views
Total Views
3,290
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
78
Comments
2
Likes
6
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Agile Deployments with Puppet Gary Larizza Puppet Labs @glarizzaSaturday, October 22, 2011
  • 2. http://bit.ly/garydevops Agile Deployments with Puppet Gary Larizza Puppet Labs @glarizzaSaturday, October 22, 2011
  • 3. DevOps • Culture not tools? • Release Management? • http://slidesha.re/itweapon • http://bit.ly/toolsmatter • http://slidesha.re/devopstoolsSaturday, October 22, 2011
  • 4. Example of ‘poor deployment’Saturday, October 22, 2011
  • 5. Saturday, October 22, 2011
  • 6. Developer OperationsSaturday, October 22, 2011
  • 7. Developer OperationsSaturday, October 22, 2011
  • 8. Developer Production OperationsSaturday, October 22, 2011
  • 9. Developer Production Operations StagingSaturday, October 22, 2011
  • 10. Developer Production Operations StagingSaturday, October 22, 2011
  • 11. Developer Production Operations StagingSaturday, October 22, 2011
  • 12. Developer Production Operations StagingSaturday, October 22, 2011
  • 13. Developer Production Operations Staging Day(s) Build TimeSaturday, October 22, 2011
  • 14. Developer Production Operations Staging QA Day(s) Build TimeSaturday, October 22, 2011
  • 15. Developer Production Operations Staging QA Day(s) Build TimeSaturday, October 22, 2011
  • 16. Developer Production Operations Staging QA Day(s) Build TimeSaturday, October 22, 2011
  • 17. Developer Production Operations Staging QA Day(s) Week(s) Build TimeSaturday, October 22, 2011
  • 18. Developer Production Operations Staging QA Day(s) Week(s) Build TimeSaturday, October 22, 2011
  • 19. Developer Production UK Operations Staging QA Day(s) Week(s) Build TimeSaturday, October 22, 2011
  • 20. Developer Production UK Operations Staging QA Day(s) Week(s) Build TimeSaturday, October 22, 2011
  • 21. Developer Production UK Operations China Staging QA Day(s) Week(s) Build TimeSaturday, October 22, 2011
  • 22. Developer Production UK Operations China Staging QA Day(s) Week(s) Build TimeSaturday, October 22, 2011
  • 23. Developer Production UK Operations China Staging QA Canada Day(s) Week(s) Build TimeSaturday, October 22, 2011
  • 24. Developer Production UK Operations China Staging QA Canada Day(s) Week(s) Build TimeSaturday, October 22, 2011
  • 25. Developer Production UK Operations China Staging QA Canada Day(s) Week(s) ??? Build TimeSaturday, October 22, 2011
  • 26. Rampination http://bit.ly/pconfkeynoteSaturday, October 22, 2011
  • 27. Example of ‘Agile’Saturday, October 22, 2011
  • 28. Saturday, October 22, 2011
  • 29. Developer OperationsSaturday, October 22, 2011
  • 30. Developer Production OperationsSaturday, October 22, 2011
  • 31. DeveloperConfiguration Production Data OperationsSaturday, October 22, 2011
  • 32. DeveloperConfiguration Production Data OperationsSaturday, October 22, 2011
  • 33. DeveloperConfiguration Production Data OperationsSaturday, October 22, 2011
  • 34. DeveloperConfiguration Production Data OperationsSaturday, October 22, 2011
  • 35. DeveloperConfiguration Production Data Staging OperationsSaturday, October 22, 2011
  • 36. DeveloperConfiguration Production Data Staging Operations 10 Minutes Build TimeSaturday, October 22, 2011
  • 37. DeveloperConfiguration Production Data Staging Operations 10 Minutes Build TimeSaturday, October 22, 2011
  • 38. DeveloperConfiguration Production Data Staging Operations 10 Minutes Build TimeSaturday, October 22, 2011
  • 39. DeveloperConfiguration Production Data Staging QA Operations 10 Minutes 1-2 Hours Build TimeSaturday, October 22, 2011
  • 40. DeveloperConfiguration Production Data Staging QA Operations 10 Minutes 1-2 Hours Build TimeSaturday, October 22, 2011
  • 41. DeveloperConfiguration Production Data Staging QA Operations 10 Minutes 1-2 Hours Build TimeSaturday, October 22, 2011
  • 42. Developer Reach DeveloperConfiguration Production Data Staging QA Operations 10 Minutes 1-2 Hours 3 Hours Build TimeSaturday, October 22, 2011
  • 43. Developer Reach DeveloperConfiguration Production Data Staging QA Operations 10 Minutes 1-2 Hours 3 Hours Build TimeSaturday, October 22, 2011
  • 44. What can Ops learn from Dev? • Do developers re-write their code at every step? • Version control • Testing frameworks • Expose ‘settings’ through configuration dataSaturday, October 22, 2011
  • 45. Infrastructure as Code with Puppet • Configured State vs. • Define what needs to be done Running State • Model your ideal state with • Choose your level of simple resources commitmentSaturday, October 22, 2011
  • 46. Resource Abstraction LayerSaturday, October 22, 2011
  • 47. Resource Abstraction LayerSaturday, October 22, 2011
  • 48. Resource Abstraction LayerSaturday, October 22, 2011
  • 49. Resource Abstraction Layer /usr/bin/yum -y install httpdSaturday, October 22, 2011
  • 50. Saturday, October 22, 2011
  • 51. Bare Machine Puppet’s Task Provisioning Maintenance Configure Assigned Base Role InstallSaturday, October 22, 2011
  • 52. Puppet Resources service { httpd:   ensure  => running,   enable   => true, hasstatus => true,   hasrestart => true, }Saturday, October 22, 2011
  • 53. Puppet Resources Type service { httpd:   ensure  => running,   enable   => true, hasstatus => true,   hasrestart => true, }Saturday, October 22, 2011
  • 54. Puppet Resources Type Title service { httpd:   ensure  => running,   enable   => true, hasstatus => true,   hasrestart => true, }Saturday, October 22, 2011
  • 55. Puppet Resources Type Title service { httpd:   ensure  => running,   enable   => true, hasstatus => true,   hasrestart => true, } AttributesSaturday, October 22, 2011
  • 56. Facter • Describes aspects of your machine - “facts” • Facts written in Ruby • Nice library of existing facts • Custom facts are easySaturday, October 22, 2011
  • 57. Facter 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 <...>Saturday, October 22, 2011
  • 58. Custom Fact Facter.add("computername") do computername      confine :kernel => :darwin      setcode(scutil --get ComputerName.chomp) scutil ComputerName endSaturday, October 22, 2011
  • 59. Custom Fact Facter.add("computername") do computername      confine :kernel => :darwin      setcode(scutil --get ComputerName.chomp) scutil ComputerName endSaturday, October 22, 2011
  • 60. Custom Fact Fact name Facter.add("computername") do computername      confine :kernel => :darwin      setcode(scutil --get ComputerName.chomp) scutil ComputerName endSaturday, October 22, 2011
  • 61. Custom Fact Fact name Facter.add("computername") do computername      confine :kernel => :darwin      setcode(scutil --get ComputerName.chomp) scutil ComputerName end Command to ExecuteSaturday, October 22, 2011
  • 62. Custom Fact Fact name Facter.add("computername") do computername      confine :kernel => :darwin      setcode(scutil --get ComputerName.chomp) scutil ComputerName end Command to ExecuteSaturday, October 22, 2011
  • 63. Custom Fact ENV.each do |key,val| Facter.add("env_#{key}") do    setcode do val end end endSaturday, October 22, 2011
  • 64. Separate Data from Logic • Configuration Data adapts to environment • Easy deployment - Puppet modules do not change • Eliminate SSH access for deploymentSaturday, October 22, 2011
  • 65. Data Separation ExamplesSaturday, October 22, 2011
  • 66. 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
  • 67. 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
  • 68. Extlookup common.csv devops.csv dnsserver, 8.8.8.8 dnsserver, 10.13.1.2 searchdomain, puppetlabs.vm $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
  • 69. External Node Classifier --- classes: - dns parameters: searchdomain : ‘puppetlabs.vm’ dnsserver : ‘10.13.1.2’Saturday, October 22, 2011
  • 70. Hiera • Hierarchal data lookup system • Structured data backend • YAML, JSON, and current Puppet state • http://bit.ly/hieradataSaturday, October 22, 2011
  • 71. Saturday, October 22, 2011
  • 72. Global DefaultsSaturday, October 22, 2011
  • 73. Global Defaults EnvironmentSaturday, October 22, 2011
  • 74. Global Defaults Environment RoleSaturday, October 22, 2011
  • 75. Global Defaults Environment RoleSaturday, October 22, 2011
  • 76. Global Defaults Environment RoleSaturday, October 22, 2011
  • 77. Global Defaults Environment Role Resultant Data ConfigurationSaturday, October 22, 2011
  • 78. Saturday, October 22, 2011
  • 79. Global DefaultsSaturday, October 22, 2011
  • 80. Global Defaults --- ntpserver: time.puppetlabs.com puppetserver: puppet.puppetlabs.com environment: productionSaturday, October 22, 2011
  • 81. Global Defaults --- ntpserver: time.puppetlabs.com puppetserver: puppet.puppetlabs.com environment: productionSaturday, October 22, 2011
  • 82. Global Defaults Environment --- ntpserver: time.puppetlabs.com puppetserver: puppet.puppetlabs.com environment: productionSaturday, October 22, 2011
  • 83. Global Defaults Environment --- --- ntpserver: time.puppetlabs.com stompserver: stomp-qa.puppetlabs.com puppetserver: puppet.puppetlabs.com environment: production puppetserver: puppet-qa.puppetlabs.com environment: qaSaturday, October 22, 2011
  • 84. Global Defaults Environment --- ntpserver: time.puppetlabs.com puppetserver: puppet-qa.puppetlabs.com environment: qa stompserver: stomp-qa.puppetlabs.comSaturday, October 22, 2011
  • 85. Global Defaults Environment Role --- ntpserver: time.puppetlabs.com puppetserver: puppet-qa.puppetlabs.com environment: qa stompserver: stomp-qa.puppetlabs.comSaturday, October 22, 2011
  • 86. Global Defaults Environment Role --- --- ntpserver: time.puppetlabs.com storeconfigs: true puppetserver: puppet-qa.puppetlabs.com environment: qa stompserver: stomp-qa.puppetlabs.comSaturday, October 22, 2011
  • 87. Global Defaults Environment Role --- ntpserver: time.puppetlabs.com puppetserver: puppet-qa.puppetlabs.com environment: qa stompserver: stomp-qa.puppetlabs.com storeconfigs: trueSaturday, October 22, 2011
  • 88. DEMO TIMESaturday, October 22, 2011
  • 89. Devops Survey • http://bit.ly/devopssurveySaturday, October 22, 2011
  • 90. Code is online https://github.com/glarizza/puppet-datademoSaturday, October 22, 2011
  • 91. Gary Larizza • Twitter: @glarizza • Email: gary@puppetlabs.com • Web: http://www.puppetlabs.comSaturday, October 22, 2011

×