• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to Install Puppet Agent on Ubuntu 20.04

Written by Admin, Updated On May 20, 2021
puppet, ubuntu
How to Install Puppet Agent on Ubuntu 20.04

Puppet is a popular open-source and automation admin engine. It can be used to manage large number of servers remotely and do administrative tasks from a master server. All the client of agent puppet nodes are managed by the server or master node. Before that, all the client nodes must have installed Puppet Agent server. This tutorial shows you step by step how to install Puppet Agent on Ubuntu 20.04 systems.

Prerequisites#

  • You should have a installed and configured puppet master node.
  • Should have a Ubuntu system with sudo privileges to setup as Puppet agent clients.
  • The client system should connected to master node over public or private network.

Install Puppet Agent on Ubuntu#

Perform the following steps to install puppet agent on Ubuntu 20.04 system:

Step 1 – Update Package List#

Before starting the installation process, you should update the list of available packages by typing:

sudo apt-get update -y

Step 2 – Configure Hosts#

With Puppet, master and client nodes communicate using hostnames. Before installing Puppet, you need to set up a unique hostname on each node.

  1. On Puppet Master Node edit the hosts file by typing:
sudo nano /etc/hosts

2. Add the new server entries to the end of file:

106.16.14.230 puppetmaster puppet
106.16.18.104 puppetclient
106.16.18.105 puppetclientnew

2. On Client Node edit the hosts file by typing:

sudo nano /etc/hosts

Append you new server to the hosts files:

106.16.14.230 puppetmaster puppet
106.16.18.105 puppetclientnew

Here,

  • 106.16.14.230 is the IP address of the master node.
  • 106.16.18.104 is the IP address of the client node.

Make sure, you should change IP address which your system have.

3. Save and close the file.

Step 4 – Install Puppet Agent#

  1. Download and install the latest version of Puppet on a client node:
wget https://apt.puppetlabs.com/puppet7-release-focal.deb
sudo dpkg -i puppet7-release-focal.deb

2. Once you configured the PPA, Install the Puppet agent package on all client servers.

sudo apt update
sudo apt install puppet-agent -y

3. Open the Puppet configuration file once the installation finished:

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

Add the following lines at the end of the Puppet configuration file to define the Puppet master node details:

[main]
certname = puppetclientnew
server = puppetmaster

Save your file and close it.

4. Next, start the Puppet agent service on all the client nodes and set it to auto-start on system boot:

sudo systemctl start puppet
sudo systemctl enable puppet

5. Verify the Puppet agent service is running properly:

sudo systemctl status puppet

You will see a running status on all the agent systems.

Step 5 – Sign Puppet Agent Certificate#

  1. At this stage, you have completed all the configuration. Now, login to the master node and execute the following commands to get list of all available certificates:
sudo /opt/puppetlabs/bin/puppetserver ca list --all

2. Sign the certificates with:

sudo /opt/puppetlabs/bin/puppetserver ca sign --all

3. Finally, use the following command to test the communication between the master and client nodes:

sudo /opt/puppetlabs/bin/puppet agent --test

Conclusion#

You have successfully installed Puppet Agent on Ubuntu 20.04 system. In this tutorial you learned how to install and configure Puppet Agent on client nodes.

Visit Puppet official documentation to know more about Puppet server node configuration and client node configuration.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Install and Configure Fail2ban on Debian 10
Next Article   How to Install Gulp.js on Ubuntu 20.04

Related Posts

  • How to Install Apache, MySQL, PHP (LAMP) on Ubuntu 22.04

    How to Install LAMP on Ubuntu 22.04

    March 20, 2023
  • How to Install LEMP Stack on Ubuntu 22.04

    How to Install LEMP Stack on Ubuntu 22.04

    March 18, 2023
  • How to Install Memcached on Ubuntu 22.04

    How to Install Memcached on Ubuntu 22.04

    March 16, 2023

Leave a Reply Cancel reply

DigitalOcean Referral Badge

Popular Posts

  • How to Install Microsoft Edge Browser on Ubuntu 22.04
    How to Install Microsoft Edge Browser on Ubuntu 22.04 March 14, 2023
  • How to Install Ruby on Ubuntu 22.04 LTS
    How to Install Ruby on Ubuntu 22.04 LTS February 27, 2023
  • How to Install LEMP Stack on Ubuntu 22.04
    How to Install LEMP Stack on Ubuntu 22.04 March 18, 2023
  • How to Install Set Up Apache Virtual Hosts on Ubuntu 22.04
    How to Set Up Apache Virtual Hosts on Ubuntu 22.04 March 2, 2023
  • How to Install MariaDB on Debian 11 Bullseye
    How to Install MariaDB on Debian 11 Bullseye March 8, 2023
© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook