Setting Up Puppet on Ubuntu


Puppet is an opensource configuration management tool. It is written in Ruby & released under GPL until version 2.7.0 then Apache 2.0 license after that. It is supported by various Linux flavors, unix like os & windows. It operates in a client-server fashion. In puppet, everything which it can handle will be stated in understandable language. This declarative language is called Domain Specific Language (DSL) or Ruby DSL.

Puppet is a good companion for the system administrators (Sys Admins). It will be pretty handy while configuring many systems / desktops / servers. Suppose we need to have some 100 machines configured with LAMP (Linux-Apache-MySQL-PHP). Here, installing everything manually might kill the time / day / mood of a system administrator. In this situation puppet can be a savior for the Sys Admins. By configuring a single PC as server & adding all other PC's (whatever they are) as clients the above mentioned (LAMP) thing can be easily achieved.

Here, in this article I will be covering a basic idea about the Master-Client configuration . Actually, explaining all / every / half the aspects of puppet is a very very difficult task. So, we will have a brief introduction only.Also, i will be covering the installation / configuration on Ubuntu PC's only. It will be slightly different on other flavors of linux, even though the basic idea is the same.

Installing Puppet on Ubuntu

sudo apt-get update

sudo apt-get install puppetmaster (This will install master on machine A)

sudo apt-get install puppet (This will install client on machine B)

Once this done, we need to install connectivity between the two PC's A & B (master & client).

Prior to that, we have to make sure that both puppetmaster & client can resolve each other's name. For that we have to add the corresponding entries in the file / etc / hosts.

On master

sudo vim / etc / hosts

Now append the following entries, (edit it accordingly)

On client

sudo vim / etc / hosts

Now append the following entries, (edit it accordingly)

Now, issue the following command from client (machine B)

puppetd -server -waitforcert 60 -test

You will see some information appearing on the screen. It will be like,

info: Creating a new certificate request for

warning: peer certificate will not be verified in this SSL session

notice: Did not receive certificate

At the moment, you can ignore this one.

On machine A, as root user, type the following command

puppetca -list

If the connectivity is established properly, you can see the certificate request from puppetclient. Now, we need to sign the certificate from puppetclient to implement the proper connectivity.

for this, from puppetmaster, run the following command,

puppetca -sign

Now, the client-server connection is established in a secure / proper manner.

If you want to start the client on system boot itself, do the following,

vim / etc / default / puppet

START = yes (By default it will be 'NO')


Leave a Reply