Managing Infrastructure with Puppet by James Loope

Managing Infrastructure with Puppet by James Loope

Author:James Loope
Language: eng
Format: mobi, epub, pdf
Tags: COMPUTERS / System Administration / General
Publisher: O'Reilly Media
Published: 2011-06-09T16:00:00+00:00


file { '/etc/ntp.conf':

mode => '640',

owner => root,

group => root,

source => "puppet:///modules/apps/ntp/ntp.conf",

require => Package[ntp],

}

service { "ntp":

ensure => running,

enable => true,

pattern => 'ntpd',

subscribe => [Package["ntp"], File["/etc/ntp.conf"]],

}

}

With our node defined and importing the ntp class that we’ve written, we can now test out the agent. On the Puppet agent node, run sudo puppetd --test --noop --server puppet.example.com. This will tell the agent to run without daemonizing into the background (--test) and without actually modifying anything (--noop). The first run will not obtain a configuration from the Puppet Master because the agent has not yet been authenticated. It did, however, leave its certificate on the master for inspection. The next step in getting our agent and master talking is to have the Puppet Master sign our agent’s SSL certificate. This initial authentication step is done with the puppetca command. On the Puppet Master, run sudo puppetca -la. This will list all of the certificates in our Puppet Master’s certificate store. Certificates that are signed will have a + in front of them, and unsigned certificates will not. You should see a certificate for your agent that is not yet signed. To sign it, simply run sudo puppetca -sa. This will sign all the outstanding requests and allow those agents to talk to the master.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.