Using Puppet and Cobbler to Automate Your Infrastructure

12,772 views
12,578 views

Published on

Using tools to automate your infrastructure will let you sleep through the night. In addition, you'll have o hire fewer people, scale to meet demand more quickly, and make fewer mistakes.

Published in: Technology
0 Comments
10 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
12,772
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
309
Comments
0
Likes
10
Embeds 0
No embeds

No notes for slide

Using Puppet and Cobbler to Automate Your Infrastructure

  1. 1. Using Puppet and Cobbler to Automate Your Infrastructure Phillip J. Windley, Ph.D Founder and CTO Kynetx www.kynetx.com Monday, October 12, 2009 1
  2. 2. Sleeping Through the Night Phillip J. Windley, Ph.D Founder and CTO Kynetx www.kynetx.com Monday, October 12, 2009 2
  3. 3. (afford|scal|reli)ability Monday, October 12, 2009 3
  4. 4. hire fewer people Monday, October 12, 2009 4
  5. 5. meet demand quickly Monday, October 12, 2009 5
  6. 6. make fewer mistakes Monday, October 12, 2009 6
  7. 7. Monday, October 12, 2009 7
  8. 8. Monday, October 12, 2009 8
  9. 9. Monday, October 12, 2009 8
  10. 10. Monday, October 12, 2009 8
  11. 11. Monday, October 12, 2009 9
  12. 12. 1. machine provisioning Monday, October 12, 2009 9
  13. 13. 1. machine provisioning 2. system configuration Monday, October 12, 2009 9
  14. 14. 1. machine provisioning 2. system configuration 3. deployment Monday, October 12, 2009 9
  15. 15. Monday, October 12, 2009 10
  16. 16. provisioning Monday, October 12, 2009 11
  17. 17. machine provisioning Monday, October 12, 2009 12
  18. 18. machine provisioning manage images & repositories Monday, October 12, 2009 12
  19. 19. machine provisioning manage images & repositories kickstart machines Monday, October 12, 2009 12
  20. 20. machine provisioning manage images & repositories kickstart machines handle physical and virtual hardware Monday, October 12, 2009 12
  21. 21. machine provisioning manage images & repositories kickstart machines handle physical and virtual hardware set up DHCP and DNS Monday, October 12, 2009 12
  22. 22. Monday, October 12, 2009 13
  23. 23. cobbler is a collection of tools that support machine provisioning Monday, October 12, 2009 13
  24. 24. Monday, October 12, 2009 14
  25. 25. cobblerd dns power dhcp Monday, October 12, 2009 14
  26. 26. cobblerd dns power dhcp cobbler web repos images kickstart Monday, October 12, 2009 14
  27. 27. koan cobblerd dns power dhcp cobbler web repos images kickstart Monday, October 12, 2009 14
  28. 28. cobbler uses a collection of specifications that define your systems Monday, October 12, 2009 15
  29. 29. Monday, October 12, 2009 16
  30. 30. distro Monday, October 12, 2009 16
  31. 31. profile repo distro Monday, October 12, 2009 16
  32. 32. system profile repo distro Monday, October 12, 2009 16
  33. 33. import a distro cobbler import --mirror ~/fc8 --name fc8 Monday, October 12, 2009 17
  34. 34. import a distro cobbler import --mirror ~/fc8 --name fc8 create a profile cobbler profile add --name=base-fc8 --distro=fc8-xen-i386 --kickstart=/root/base-fc8.ks --repos=fc8-newkey-repo Monday, October 12, 2009 17
  35. 35. import a distro cobbler import --mirror ~/fc8 --name fc8 create a profile cobbler profile add --name=base-fc8 --distro=fc8-xen-i386 --kickstart=/root/base-fc8.ks --repos=fc8-newkey-repo define a system cobbler system add --name=log0 --mac=00:16:3E:4B:40:00 --ip=192.168.122.180 --profile=base-fc8 --hostname=log0 Monday, October 12, 2009 17
  36. 36. building a machine koan --server=cobbler.kobj.net --virt --nogfx --system=log0 Monday, October 12, 2009 18
  37. 37. configuration Monday, October 12, 2009 19
  38. 38. system configuration Monday, October 12, 2009 20
  39. 39. system configuration critical services on or off Monday, October 12, 2009 20
  40. 40. system configuration critical services on or off security systems configured correctly Monday, October 12, 2009 20
  41. 41. system configuration critical services on or off security systems configured correctly users created Monday, October 12, 2009 20
  42. 42. system configuration critical services on or off security systems configured correctly users created necessary libraries in place Monday, October 12, 2009 20
  43. 43. system configuration critical services on or off security systems configured correctly users created necessary libraries in place right packages built & installed Monday, October 12, 2009 20
  44. 44. Monday, October 12, 2009 21
  45. 45. puppet is a language for specifying desired system configuration Monday, October 12, 2009 21
  46. 46. install package Monday, October 12, 2009 22
  47. 47. install package configure Monday, October 12, 2009 22
  48. 48. install package configuration should be modified after package installation configure Monday, October 12, 2009 22
  49. 49. install package configuration should be modified after package installation configure service Monday, October 12, 2009 22
  50. 50. install package configuration should be modified after package installation configure service should restart whenever configuration changes service Monday, October 12, 2009 22
  51. 51. the hard way yum install openssh-server vi /etc/ssh/sshd_config service sshd start Monday, October 12, 2009 23
  52. 52. the puppet way class ssh { package { ssh: ensure => installed } file { sshd_config: name => “/etc/ssh/sshd_config”, owner=> root, source => “puppet://server/apps/ssh/…”, after => Package[ssh] } service { sshd: ensure => running, subscribe => [Package[ssh], File[sshd_config]] } } Monday, October 12, 2009 24
  53. 53. the puppet way class ssh { package { ssh: ensure => installed } file { sshd_config: name => “/etc/ssh/sshd_config”, owner=> root, source => “puppet://server/apps/ssh/…”, after => Package[ssh] } service { sshd: ensure => running, subscribe => [Package[ssh], File[sshd_config]] } } Monday, October 12, 2009 24
  54. 54. the puppet way class ssh { package { ssh: ensure => installed } file { sshd_config: name => “/etc/ssh/sshd_config”, owner=> root, source => “puppet://server/apps/ssh/…”, after => Package[ssh] } service { sshd: ensure => running, subscribe => [Package[ssh], File[sshd_config]] } } Monday, October 12, 2009 24
  55. 55. wait a minute… that looks like a lot more lines to me! Monday, October 12, 2009 25
  56. 56. deployment Monday, October 12, 2009 26
  57. 57. requirements Monday, October 12, 2009 27
  58. 58. requirements deployment happens over & over again Monday, October 12, 2009 27
  59. 59. requirements deployment happens over & over again controlled, not continuous Monday, October 12, 2009 27
  60. 60. requirements deployment happens over & over again controlled, not continuous role-based Monday, October 12, 2009 27
  61. 61. requirements deployment happens over & over again controlled, not continuous role-based remotable Monday, October 12, 2009 27
  62. 62. now for deployment... Monday, October 12, 2009 28
  63. 63. now for deployment... Monday, October 12, 2009 28
  64. 64. now for deployment... Monday, October 12, 2009 28
  65. 65. now for deployment... Monday, October 12, 2009 28
  66. 66. in the end… I just wrote it in Perl in a few hours Monday, October 12, 2009 29
  67. 67. [root@ops deploy]# ./deploy.pl -d The following tasks are configured: deploy | Export a new copy of the code install | deploy, initialize, restart uninstall | rollback code, initialize,restart start_httpd | Start the HTTP server rollback | Rollback to the deploy stop_httpd | Stop the HTTP server test_server | Run the appropriate server test cleanup | Remove old copies of code test_code | Run the all tests configure_httpd| Build the httpd.conf file install_init | Install the init JS files restart_httpd | Restart the HTTP server Monday, October 12, 2009 30
  68. 68. [root@ops deploy]# ./deploy.pl -s server | version -----------------------|---------------- init0.kobj.net | 340M init1.kobj.net | 340M log.kobj.net | 340 log0.kobj.net | 340 log1.kobj.net | 340 krl.kobj.net | 340 cs0.kobj.net | 341 cs1.kobj.net | 341 cs2.kobj.net | 341 cs3.kobj.net | 341 Monday, October 12, 2009 31
  69. 69. [root@ops deploy]# ./deploy.pl -m krl -t install Performing install on krl with role krl... A /web/lib/releases/perl_0910091229/ops ... A /web/lib/releases/perl_0910091229/startup.pl A /web/lib/releases/perl_0910091229/Kynetx.pm A /web/lib/releases/perl_0910091229/README Checked out revision 342. Writing /web/conf/httpd.conf Stopping httpd: [ OK ] Starting httpd: [ OK ] Testing RuleManager.....ok All tests successful. Files=1, Tests=73, 8 wallclock secs ... Result: PASS Monday, October 12, 2009 32
  70. 70. TODO Monday, October 12, 2009 33
  71. 71. TODO configuration database Monday, October 12, 2009 33
  72. 72. TODO configuration database (more) automated testing Monday, October 12, 2009 33
  73. 73. TODO configuration database (more) automated testing continuous integration Monday, October 12, 2009 33
  74. 74. results Monday, October 12, 2009 34
  75. 75. Monday, October 12, 2009 35
  76. 76. kynetx can stand up a new server in < 30 minutes Monday, October 12, 2009 36
  77. 77. our servers stay up downtime* 0.00229% uptime 99.99772% * includes scheduled maintenance Monday, October 12, 2009 37
  78. 78. Warning! Monday, October 12, 2009 38
  79. 79. Warning! Monday, October 12, 2009 38
  80. 80. lessons learned Monday, October 12, 2009 39
  81. 81. lessons learned architect for (afford|scal|reli)ability Monday, October 12, 2009 39
  82. 82. lessons learned architect for (afford|scal|reli)ability insist on consistency & repeatability Monday, October 12, 2009 39
  83. 83. lessons learned architect for (afford|scal|reli)ability insist on consistency & repeatability document process with code Monday, October 12, 2009 39
  84. 84. lessons learned architect for (afford|scal|reli)ability insist on consistency & repeatability document process with code rolling releases and change control Monday, October 12, 2009 39
  85. 85. lessons learned architect for (afford|scal|reli)ability insist on consistency & repeatability document process with code rolling releases and change control put ops procedures online Monday, October 12, 2009 39
  86. 86. learning more Introduction to Cobbler Derek Carter 2:30 Puppet Workshop Andrew Shafer 3:00 Managing your minions with func Daniel Hanks 3:45 Cobbler power tools Derek Carter 5:00 Monday, October 12, 2009 40
  87. 87. Nov 18-19, 2009, Provo UT Monday, October 12, 2009 41
  88. 88. Nov 18-19, 2009, Provo UT Use discount code Windley50 www.kynetx.com Monday, October 12, 2009 41
  89. 89. Sleeping Through the Night Contact info: pjw@kynetx.com www.windley.com @windley FREE Context Automation White Paper at Kynetx Booth Sign up free: http://www.kynetx.com/signup Monday, October 12, 2009 42

×