Puppet Quick Tutorial with examples

Puppet Version Used : 3.8

Distro Used : RHEL,CentOS, OEL

1. Puppet master :

Get the repo with below link.
rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm

install the master
yum install puppet-server

Enter the master server hostname in the puppet.conf file under [main]
dns_alt_names = puppet,puppetmaster01,vmf0270,vmf0270.us.xxx.com

certname = vmf0270.us.xxx.com
server = vmf0270.us.xxx.com
environment = prod
runinterval = 1h
strict_variables = true

If this is the only puppet master in your deployment, or if it will be acting as the CA server :
puppet master –verbose –no-daemonize

2. Install puppet agent;

Get the repo –
rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm
Install the puppet package
yum install puppet /

For upgrade the existing package –
puppet resource package puppet ensure=latest and restart the service

Update puppet.conf and add master server IP.
Update under [main]
certname = vmf0207.us.xxx.com
server = vmf0270.us.xxx.com
environment = prod
runinterval = 1h

start the puppet service
puppet resource service puppet ensure=running enable=true

create a cronjob which will pull the configurations in every 30 mins
puppet resource cron puppet-agent ensure=present user=root minute=30 command=’/usr/bin/puppet agent –onetime –no-daemonize –splay’

3. Keep all the required manifests and modules in the directory server or create an empty site.pp file.
touch /etc/puppet/manifests/site.pp

4. A prod ready webserver is required to operate and manage from GUI Webpage.(else all can be managed from CLI)

5. Sign all the client requests by the server:

To check the list:
puppet cert list

To sign;
puppet cert sign –all OR individually by puppet cert sign


I have created few puppet manifests to manage the compute infrastructure.

Can be found here : https://github.com/kumarprd/puppet-manifests