The document discusses using Puppet and Cobbler to automate infrastructure. It describes how Cobbler can be used for machine provisioning, managing images and repositories, and kicking off installs. Puppet is then used to configure systems by specifying desired configurations and ensuring services and files are in the proper state. A deployment system is also described that allows controlled deployments of new code or configurations to servers using a simple command line tool. The key benefits highlighted are improved reliability, scalability, repeatability and reduced mistakes through automation of the provisioning and configuration process.
Report
Share
Report
Share
1 of 89
Download to read offline
More Related Content
Using Puppet and Cobbler to Automate Your Infrastructure
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. Sleeping Through the Night
Phillip J. Windley, Ph.D
Founder and CTO
Kynetx
www.kynetx.com
Monday, October 12, 2009 2
20. machine provisioning
manage images & repositories
kickstart machines
handle physical and virtual hardware
Monday, October 12, 2009 12
21. machine provisioning
manage images & repositories
kickstart machines
handle physical and virtual hardware
set up DHCP and DNS
Monday, October 12, 2009 12
40. system configuration
critical services on or off
security systems configured correctly
Monday, October 12, 2009 20
41. system configuration
critical services on or off
security systems configured correctly
users created
Monday, October 12, 2009 20
42. system configuration
critical services on or off
security systems configured correctly
users created
necessary libraries in place
Monday, October 12, 2009 20
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
47. install
package
configure
Monday, October 12, 2009 22
48. install
package configuration
should be modified
after package
installation
configure
Monday, October 12, 2009 22
49. install
package configuration
should be modified
after package
installation
configure
service
Monday, October 12, 2009 22
50. install
package configuration
should be modified
after package
installation
configure service should
restart whenever
configuration
changes
service
Monday, October 12, 2009 22
51. the hard way
yum install openssh-server
vi /etc/ssh/sshd_config
service sshd start
Monday, October 12, 2009 23
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. 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. 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. wait a minute…
that looks like a lot
more lines to me!
Monday, October 12, 2009 25
66. in the end…
I just wrote it in Perl
in a few hours
Monday, October 12, 2009 29
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
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
81. lessons learned
architect for (afford|scal|reli)ability
Monday, October 12, 2009 39
82. lessons learned
architect for (afford|scal|reli)ability
insist on consistency & repeatability
Monday, October 12, 2009 39
83. lessons learned
architect for (afford|scal|reli)ability
insist on consistency & repeatability
document process with code
Monday, October 12, 2009 39
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. 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. 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
88. Nov 18-19, 2009,
Provo UT
Use discount code
Windley50
www.kynetx.com
Monday, October 12, 2009 41
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