Luc Suryo - Puppet on EC2
Upcoming SlideShare
Loading in...5
×
 

Luc Suryo - Puppet on EC2

on

  • 7,850 views

 

Statistics

Views

Total Views
7,850
Views on SlideShare
2,497
Embed Views
5,353

Actions

Likes
1
Downloads
42
Comments
0

7 Embeds 5,353

http://puppetlabs.com 4312
http://www.puppetlabs.com 1017
http://puppetlabs.iron-point.com 18
http://192.168.1.100 3
http://puppetdev.iron-point.com 1
http://translate.googleusercontent.com 1
http://ia.puppetlabs.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Luc Suryo - Puppet on EC2 Luc Suryo - Puppet on EC2 Presentation Transcript

  • Puppet in EC2An implementation By Luc Suryo February 8, 2011
  • 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
  • Goal• Able to launch and maintain an instance with minimal effort• Better and centralized change control
  • 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
  • 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
  • Puppet Class the Idea• Each package is split into 4 parts• Software• Services• Control and Configure• Monitor (if applicable)
  • 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", } }
  • 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", } }
  • Control and Configure • Controls, restart • Configures, configures files define ntp::ntp_conf ( $network = , $ntpservers ) { file { "/etc/ntp.conf" : mode => 0444, owner => root, group => root, content => template ("ntp/etc/ntp.conf.erb"), } } define ntp::restart () { Exec { logoutput => "on_failure", path => [ "/bin", "/usr/bin", "/sbin", "/usr/sbin", "/usr/local/bin", "/usr/local/sbin" ], } exec { "ntp_restart" : command => $operatingsystem ? { "centos" => "/etc/init.d/ntpd restart", "ubuntu" => "/etc/init.d/ntp restart", }, subscribe => File [ "/etc/ntp.conf" ], refreshonly => "true", } }
  • Monitor • Nagios or/and Munin to monitor serviceclass ntp::munin { enable_munin_plugin { [ “ntp_kernel_err”, “ntp_kernel_pll_freq”, “ ntp_kernel_pll_off”,“ntp_offset” ] : }}class ntp::nagios { enable_nagios_service { “ntp” : }}
  • class fly::ntp { include ntp::package include ntp::munin include ntp::nagios case $hostname { # NTP Server "puppet", : { $ntpservers => "us.pool.ntp.org" } # NTP Client default : { $ntpservers => [ "10.168.101.111" ] } } ntp::ntp_conf { "fly-ntp" : $ntpservers => $ntpservers } case $hostname { "base" : { service { "ntp" : name => $operatingsystem ? { "centos" => "ntpd", "ubuntu" => "ntp", }, enable => "false", ensure => "stopped", } } default : { include ntp::service ntp::restart { "fly-ntp" : } } }}
  • • Know and accepted issues and risk• = package update ; amount and time• Always can be improved... and thanks for coming