Hello everyone!!!

Have you ever heard of Puppet?
I know everyone is thinking about the Puppet-which is an object or person controlled by another, but to everyone’s surprise this is not the one which I’m referring to. I’m talking about the DevOps tool Puppet which is a powerful configuration management tool in today’s world.

For introduction of Puppet and its Architecture you can go through the previous posts published in POC Farm on Puppet for better understanding.
In this blog, I will focus mainly on Installation and configuration of Open source Puppet in an Agent/Master configuration in Ubuntu 14.04.

A Quick Introduction for those who are not aware of Puppet.

What is Puppet?

Puppet is a configuration management system that allows you to define the state of your IT infrastructure and then automatically enforces the correct state. Whether you’re managing just a few servers or thousands of physical and virtual machines, Puppet automates tasks that sysadmins often do manually, freeing up time and mental space so sysadmins can work on the projects that deliver greater business value.
Puppet usually runs in an agent/master architecture, where a Puppet master server controls important configuration info and managed agent nodes request only their own configuration catalogs.


  • Ubuntu 14.04 servers installed in both Master and Agent Machines.
  • Make a note of IP address and Hostnames of both the systems.
    In this post, I’m using as Master Machine’s IP address, as Agent Machine’s IP address and the hostnames are Puppet and web1 for Master and Agent respectively.

Installation of Puppet in Master

Step 1: Enable the Puppet Labs Package Repository

To enable the repository:

  1. Download the “puppetlabs-release” package for your OS version.
  • You can see a full list of these packages on the front page of https://apt.puppetlabs.com/.
  • Architecture is handled automatically; there is only one package per OS version.

wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb

2. Install the package by running the following command.

sudo dpkg -i puppetlabs-release-trusty.deb

3.Run apt-get update to get the new list of available packages.

sudo apt-get update

Step 2: Install Puppet on the Puppet Master Server

1.On your puppet master node, run

sudo apt-get install puppetmaster

This installs Puppet, its prerequisites, and Puppet Server, a JVM-based Puppet master server that’s ready for production. Do not start Puppet Server yet.

2.Go to Puppet directory and check whether all the files are properly installed by

cd /etc/puppet

3. Create a file site.pp in manifests under puppet and add the following code

package {
‘apache2’ :
ensure => installed
service {
‘apache2’ :
ensure => true,
enable => true,
require => Package[‘apache2’]

4. Restart the Puppetserver

/etc/init.d/puppetmaster restart

5. Add Agents’ IP address and Hostnames in Master node under /etc/hosts

Installation of Puppet in Agent

1. To install Puppet in agent, run

apt-get update
apt-get install puppet

2. To test Puppet agent, run

puppet agent –test

In Puppet Master

Run the following commands to establish connection between Master and Agent

puppet master cert –list
puppet master cert –sign <web1>

In Puppet Agent

Run the test command in puppet agent to check whether the communication between master and agent is successfully done.

puppet agent –test

To check connection with master, run

netstat -ant

If connection is established successfully, you will get to see the port of Master in Agent.
To start puppet, run

/etc/init.d/puppet start

Hurray!!! We have installed Puppet in both Master and Agent and successfully established connection between them.
So guys, as Puppet is Open source and easy to work on start playing with it…

Thank you for reading!!!
Keep following for more on Puppet!!!








Anusha Paidipalli

Sruthi Maremanda


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