Friday, August 28, 2020

How to install Puppet 6 on Ubuntu 18.0.4 | Puppet Master install Ubuntu 18.0.4 | Setup Puppet on Ubuntu

Puppet is a configuration management tool, similar to Ansible, Chef and SaltStack. Puppet also can be used for automating infrastrcture as well.

Puppet is based in client/server model. The server does all the automation of tasks on nodes/servers that have a client(agent) installed. The work of the Puppet agent is to send facts to the puppet master and request a catalog based on certain interval level(default time 30 mins). Once it receives a catalog, Puppet agent applies it to the node by checking each resource the catalog describes. It makes relevant changes to attain the desired state. The work of the Puppet master is to control configuration information.  Each managed agent node requests its own configuration catalog from the master.

We will see how to setup Puppet Master in Ubuntu 18.0.4.

Install Puppet master on new Ubuntu with medium instance
port 8140 needs to be opened.

First let us see how to install Puppet 6.x on Ubuntu 18.0.4.

Steps for Puppet Master Installation
1. Modify Puppet Master Hosts file to add hostname of Puppet Master
sudo vi /etc/hosts

2. Download puppet installable

curl -O
sudo dpkg -i puppet6-release-bionic.deb
sudo apt-get update
sudo apt-get install puppetserver -y
sudo ufw allow 8140
sudo systemctl enable puppetserver.service

(the above command is to start the service during starting the Ubuntu instance)
sudo systemctl start puppetserver.service           

(The above command is for starting the server and this may take some time)
sudo systemctl status puppetserver.service

Now press q to come out of window.
Add puppet master ip address and puppet next to it like shown below

This confirms that Puppet Master is installed successfully.

Verify which version of Puppet installed by executing below command:
apt policy puppetserver

2. you need to install the aws-sdk-core and retries gems as root (or superuser):
sudo /opt/puppetlabs/puppet/bin/gem install aws-sdk-core retries
Done installing documentation for retries after 0 seconds
6 gems installed
3. Also install AWS SDK for accessing resources in AWS
sudo /opt/puppetlabs/puppet/bin/gem install aws-sdk -v 2.0.42

Done installing documentation for retries after 0 seconds
4 gems installed
4. Now you can install puppet-labs-aws module
sudo /opt/puppetlabs/bin/puppet module install puppetlabs-aws

That's it. Puppet Master is setup successfully!!!! You can watch the above steps in YouTube as well.

No comments:

Post a Comment

Create Freestyle job in Jenkins | How to create build job in Jenkins to automate Java build and deployment of WAR into Tomcat | Bitbucket Jenkins Integration

Jenkins is popular open source Continuous integration tool. It was written entirely in Java. Jenkins is a self-contained automation server u...