Puppet is a fully accessible automated admin platform for remote server administration and managerial chores. Puppet system operates on Linux, Unix, & Windows systems.

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Linux Systems Installation queries.

In this context, we shall look into how to deploy Puppet using Ubuntu 20.04 on both the master as well as client units.

Steps to Install Puppet on Ubuntu ?

Puppet can be setup in a client-server model that has multiple modules. Before performing this Installation procedure, you should ensure that you are using a sudo enabled account.

You can follow the steps to complete this process.

1. Update system

You need to update your system apt package for better performance. Hence, try out the update query with sudo privileges in the shell provided below:

$ sudo apt-get update -y

It requires adding a sudo password to proceed with the update. Add the password, and get started.

Now, we have to update the /etc/hosts document on both the master and client node. Firstly we will update the master node using nano editor. You have to again add the password for your account:

$ sudo nano /etc/hosts

Now the file has been opened, write out the below lines in this file:

puppet-master-ip puppetmaster puppet
puppet-client-ip puppetclient

2. Install Puppet Server

Now, it’s for the Puppet server to be installed. For this purpose, add the package repository of the puppet server by downloading it. Try out the following wget query to do so:

$ wget https://apt.puppetlabs.com/puppet6-release-focal.deb

Now you have to install the downloaded file using the dpkg command in the shell as below. Make sure to use sudo privileges to do so:

$ sudo dpkg –i puppet6-release-focal.deb

You need to install puppetserver first. Try out the below query within your console as follows:

$ sudo apt install puppetserver -y

Now the Puppet server will be installed on Ubuntu system.

You have to open the default puppet server file and update it using the beneath query:

$ sudo nano /etc/default/puppetserver

Now the file is opened, change the "JAVA_ARGS" file. 

Press Ctrl+S to save the changes. Come back to the terminal to continue again.

Start your puppet server using the systemctl command with the keyword "start" along with the name of the puppetmaster:

$ sudo systemctl start puppetserver

After the system has been started, you have to enable it as:

$ sudo systemctl enable puppetserver

You can see the puppet server status by using the below systemctl command in the shell: 

$ sudo systemctl status puppetserver

You can see that the puppet server is active and running perfectly.

How to Install Puppet Agent ?

Now it's time to mount the puppet agent in the client node. Hence login from the client node first and then add the below query to download the puppet file:

$ wget https://apt.puppetlabs.com/puppet6-release-focal.deb

Now install the download package using the dpkg package:

$ sudo dpkg –I puppet6-release-focal.deb

You have to install the puppet agent on your client node with the apt-get command:

$ sudo apt-get install puppet-agent-y

Now the puppet agent has been installed properly, you have to update its configuration file. Open this file in nano editor using the sudo command as follows:

$ sudo nano /etc/puppetlabs/puppet/puppet.conf

Now the file has been opened, add the below lines in it. Save the file and close it using Ctrl+S followed by Ctrl+X:

Certname = puppetclient
Server = puppetmaster

Now, again run the same systemctl commands to first start, and then enable the puppet:

$ sudo systemctl start puppet
$ sudo systemctl enable puppet

Now you can check the status of the puppet using the same status command. You can see it is actively running:

$ sudo systemctl status puppet

[Need help in Installing Software on Ubuntu Linux System? We can help you. ]


More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com