Title: Install Puppet
Course: CIS 208: Linux/UNIX III: Intermediate System Administration, Networking, and Security ~ For IGNITE Review > Section: Learning Modules

Install Puppet

If you are not familiar with Puppet, watch this video.  It gives a quick overview of Puppet and a demonstration of how it works.

https://www.youtube.com/watch?v=Hiu_ui2nZa0

The main server needs to have the correct time, since it will manage certificates which are time sensitive.  Install the ntp service and ensure that it works and that it is set to run at boot time.

yum -y install ntp

service ntpd start

chkconfig ntpd on

For the initial installation, turn off SELinux.  It can be enabled later if desired.

setenforce permissive

sed -i '/^SELINUX=/s/.*/SELINUX=permissive/' /etc/selinux/config

Install the puppet repo, then install the puppet-server package.

rpm -Uvh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm

yum -y install puppet-server

Start the puppet master, then verify the certificate which it creates.

puppet master --verbose --no-daemonize

hit ^C at "Notice: Starting Puppet master..."

puppet cert list --all

puppet cert print puppet... | more

Create a simple site manifest.

Manifest='notify {"This server is managed by puppet.":}'

echo "$Manifest" > /etc/puppet/manifest/site.pp

For a simple installation, the files under /etc/puppet are not being checked out from a versioning system.  Ideally these files will be created elsewhere, checked in to the versioning system, and then pulled down to /etc/puppet on the puppet server.  At this point the server is ready for its first client.

The commands below show how to install the puppet client and manage the certificate required for communications with the server.

Master:
puppet cert --list
puppet cert --revoke client.fqdn.tld
puppet cert --clean client.fqdn.tld
Agent:
rpm -Uvh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm
yum -y install puppet
puppet agent --test
Master:
puppet cert --list
puppet cert --sign client.fqdn.tld
Agent:
puppet agent --test --noop
sed -i 's/#\(PUPPET_LOG\)/\1/' /etc/sysconfig/puppet
service puppet start; chkconfig puppet on