Puppet in CentOS

Puppet is a powerful configuration management and automation tool. Using the client server architecture of puppet, one can manage hundreds or even thousands of servers. Puppet saves lot of time for the system administrator. In this article I am going to give detailed steps to install and configure puppet Client/Server model in CentOS machines. Here I am using two VMs called puppet-server and puppet-client to demonstrate the puppet Client/Server setup.

Installation

Puppet package is provided in EPEL repository. We need to enable it to install puppet using YUM. On both puppet-server and puppet-client, install EPEL repository.

Note : I am using CentOS 5.7, so I am going to install EPEL for CentOS 5.

wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

rpm -ivh epel-release-5-4.noarch.rpm

Add the hostname of client and server in the /etc/hosts file of both puppet-server and puppet-client, if the hostname is not resolvable over DNS

172.16.137.175 puppet-server.test.net puppet-server

172.16.137.176 puppet-client.test.net puppet-client

Installation of puppet server

yum install puppet-server

/etc/init.d/puppetmaster start

iptables -I INPUT -p tcp –dport 8140 -j ACCEPT

The puppet server listens on port 8140. That port should be open in firewall, if the firewall is enabled in the server.

Installation of puppet-client

yum install puppet

Testing the installation

On puppet-client

puppetd –test

That will create the cert. Go to the puppet-server and see, if the cert request is there from the client.

puppet cert –list

if its there, then sign the cert

puppet cert –sign puppet-client.test.net

After signing the certificate. Try the client again.

puppetd –test

You should be able to connect. If the connection works, then start the puppet client.

/etc/init.d/puppet start

References :

http://puppetlabs.com/resources/overview-2/

http://ifireball.wordpress.com/docs/howto-install-puppet-on-centos-50/

http://bitcube.co.uk/content/puppet-errors-explained

Share
This entry was posted in CentOS, Linux, Puppet. Bookmark the permalink.

One Response to Puppet in CentOS

  1. unni says:

    Put your comments here ….

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>