2. About Me
• An Unix and Operation guy since ’77
• Been doing Linux since ’92
• Been doing Puppet since Nov ’10 (pretty
newbie)
• contact luc@suryo.com
• Works at http://friend.ly
3. Goal
• Able to launch and maintain an instance
with minimal effort
• Better and centralized change control
4. Choice
• Puppet, it’s mature and past experience
• Build and maintenance AMI with predefines
and preinstalled software to minimize
Puppet’s run time
• Security using EC2 and allowing auto
signing
5. AMI & Puppet
• AMI has all software installed but not
activated nor configured
• Puppet controls what piece of software is
activated and how it is to configured
6. Puppet Class the Idea
• Each package is split into 4 parts
• Software
• Services
• Control and Configure
• Monitor (if applicable)
7. Class package
• Make sure the software is installed
• Does not define nor controls the service
class ntp::package {
$ntp_uid_gid = "ntp"
case $operatingsystem {
"centos" : { $packages_list = [ "ntp" ] }
"ubuntu" : { $packages_list = [ "ntp", "ntpdate" ] }
}
package { $packages_list : ensure => "installed", }
}
8. Class Service
• Controls service, make sure the service is
in the correct state
class ntp::service {
service { "ntp::service" :
name => $operatingsystem ? {
"centos" => "ntpd",
"ubuntu" => "ntp",
},
enable => "true",
ensure => "running",
}
}