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


About Divyashree - The GNULINUX Guy

I am a Linux and Opensource enthusiast. I started working on Linux early in 2007 while I was doing my Masters in Computer Science and passed out in 2010. Currently working as a DevOps Developer in in Public/Private cloud domain. my @github : https://github.com/kumarprd my @nagiosexchange : https://exchange.nagios.org/directory/Owner/divyaimca/1 my @linkedin : https://www.linkedin.com/in/priyadarshee-kumar-☁-a9415615
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s