User:Renich/HowTo/Puppet

Description
A simple Puppet installation HowTo.

The following assumptions have been made:
 * server: puppetmaster.exmaple.tld
 * client: puppet1.example.tld

Applicable to Fedora Versions

 * Fedora 14
 * Fedora 15

Requirements

 * ruby

Server requirements

 * puppet-server

These are the client's requirements

 * puppet
 * facter

If you don't have a DNS server resolving the hostnames, add them to /etc/hosts

127.0.0.1      localhost localhost.localdomain localhost4 localhost4.localdomain4
 * Server
 * 1            localhost localhost.localdomain localhost6 localhost6.localdomain6

127.0.0.1      puppetmaster.example.tld 192.168.1.100  puppet1.example.tld

127.0.0.1      localhost localhost.localdomain localhost4 localhost4.localdomain4
 * Client
 * 1            localhost localhost.localdomain localhost6 localhost6.localdomain6

127.0.0.1      puppet1.example.tld 192.168.1.1    puppetmaster.example.tld

Doing the Work
su -c 'lokkit --high -p 8140:tcp'
 * Open up the firewall

Configuring the server (phase 1)
su -c 'yum -y install ruby puppet-server'
 * Install ruby and puppet-server

su -c 'service puppetmaster start'
 * Start puppetmaster

su -c 'chkconfig puppetmaster on'
 * Enable it permanently

Configuring clients
su -c 'yum -y install ruby puppet'
 * Install ruby and puppet

PUPPET_SERVER=puppetmaster.example.tld
 * Configure puppet by editing /etc/sysconfig/puppet
 * 1) The puppetmaster server

PUPPET_PORT=8140
 * 1) If you wish to specify the port to connect to do so here

PUPPET_LOG=/var/log/puppet/puppet.log
 * 1) Where to log to. Specify syslog to send log messages to the system log.

PUPPET_EXTRA_OPTS=--waitforcert=60
 * 1) You may specify other parameters to the puppet client here

su -c 'service puppet start'
 * Start puppet

su -c 'chkconfig puppet on'
 * Enable it permanently

Configuring the server (phase 2)
su -c 'puppetca --list'
 * The puppet client has made a request for an autograph; verify it

su -c 'puppetca -s puppet1.example.tld'
 * If the information is coherent and proper, sign away

Troubleshooting

 * Conectivity: be sure that puppetmaster responds to ping from the client and vise-versa.
 * Firewall: Both; server and client, need port 8140:tcp open.

Disclaimer
We take great effort on making this article flawless. Sometimes, we can't test every scenario. Please, contribute to this page's |Talk page if you feel some corrections need to be made.

Added Reading

 * 1) http://docs.puppetlabs.com/guides/setting_up.html