Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install Puppet on Ubuntu 22.04 - DesignLinux

Jan 03 2023
designlinux 0 Comments
How to Install Puppet on Ubuntu 22.04

Puppet is an open-source and automation tool for administrator management . It’s used to manage server remotely and do administrative tasks. This tool is available on cross platform like Linux, Unix, and Windows. In this tutorial we will show you how to install Puppet on master and client nodes on Ubuntu 22.04 systems.

Prerequisites#

  • You need two or more Ubuntu systems for master and client nodes
  • Should have sudo access of all the systems.
  • All systems should connected over public or private network.

Install Puppet on Ubuntu 22.04#

Perform the following steps to install puppet on Ubuntu 22.04 system:

Step 1 – Update Package List#

At first, you should update the list of available packages by typing:

sudo apt-get update -y

Step 2 – Configure Hosts#

Using Puppet, master and client nodes will be communicate using hostnames. Before installing Puppet, you need to set up a unique hostname for every node.

1. Edit the hosts file on each node by using:

sudo nano /etc/hosts

2. Add the following lines to the each file:

106.16.14.123 puppetmaster puppet
106.16.18.104 puppetclient

Here,

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

Ensure that, you should change IP address which your system have.

You can also add more client nodes by adding ip address as above.

3. Save and close the file.

Step 3 – Install Puppet Server on Master Node#

After that, login to your master node with root or user with sudo privileges.

1. Download the latest Puppet version on the master node:

wget https://apt.puppetlabs.com/puppet7-release-jammy.deb

2. Install the downloaded package by using

sudo dpkg -i puppet7-release-jammy.deb

3. Once you added the PPA, update Apt cache and install the Puppet server with the following command:

sudo apt update
sudo apt install puppetserver -y

4. Install the Puppet server with the following command:

sudo apt-get install puppetserver -y

5. On successful installation of all the Puppet packages. Edit the puppet server file by using:

sudo nano /etc/default/puppetserver

By default, puppet server file configured to use 2GB of memory. In case your server doesn’t have enough memory you can reduce the memory size to 1GB or any other value:

JAVA_ARGS="-Xms1g -Xmx1g -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"

6. Save and close file. To save file with nano editor press Ctrl + X and then type Y to save the changes.

7. Start the Puppet service and set it to launch on system boot by using:

sudo systemctl start puppetserver
sudo systemctl enable puppetserver

8. Verify the service status using:

sudo systemctl status puppetserver

You will see that the service status as running.

Now, we will start configuration of all client node.

Step 4 – Install Puppet Agent on Client Node#

Once again, make sure that you have configured the hosts file as per step 1.

1. Download and install the latest version of Puppet on a client node:

wget https://apt.puppetlabs.com/puppet7-release-jammy.deb
sudo dpkg -i puppet7-release-jammy.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 = puppetclient
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 on Ubuntu 22.04 system. In this tutorial you learned how to install and configure Puppet on master and client nodes.

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

Related

Tags: puppet, ubuntu

How to Install Skype on Ubuntu 22.04 LTS

Prev Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 2
  • 1,232
  • 616,921

DesignLinux.com © All rights reserved

Go to mobile version