Install and configure Foreman 2.x on Debian 10 (Buster)

You can download this article in PDF format to support us through the following link.

Download the guide as a PDF

turn off


Manual infrastructure management is now a thing of the past. It is difficult to extend the existing enterprise infrastructure, troubleshoot and perform deep integration. Foreman is an open source tool designed to help system administrators automatically configure and configure IT systems. With Foreman, you can actually automate the entire system life cycle. This guide will guide you through the steps of installing and configuring Foreman 2.x on Debian 10 (Buster) Linux.

With the intelligent agent architecture of Chef, Puppet, Salt, Ansible and Foreman, Foreman can easily automate repetitive tasks, quickly deploy applications and proactively manage changes, whether it is on-premises VMs or on bare metal or in the cloud.

For Ubuntu: Install Foreman on Ubuntu Linux

Foreman Construction:

With the foreman, you can:

  • Discover, configure and upgrade your entire bare metal infrastructure
  • Create and manage instances in virtualized environments and private and public clouds
  • Install operating system via PXE, local media or from template or image
  • Control and collect reports from your configuration management software
  • Group hosts and manage them in batches regardless of location
  • View historical changes for review or troubleshooting
  • Web user interface, JSON REST API and CLI for Linux
  • Expand on demand with a powerful plug-in architecture

Foreman provides comprehensive interactive functions, including Web front end, CLI and RESTful API, so that you can build a higher level of business logic on a solid foundation. It has been deployed in many organizations, from 10s to 10,000s server. Several commercial products are based on Foreman.

Install Foreman on Debian 10 (Buster)

We will use the Foreman installer, which is a collection of Puppet modules that can install everything required by the complete Foreman installer. The installer uses native OS packaging for both Debian-based and Red Hat-based systems.

Step 1: Update the system

We always start the installation by ensuring that the system has been updated.

sudo apt update
sudo apt get -y upgrade
sudo reboot

After the system reboots, you can proceed to step 2.

Step 2: Add a puppet and foreman repository

Next, we need to add the dependencies and all the repositories needed for the actual Foreman package installation.

Add the Puppet repository:

sudo apt update
sudo apt -y install ca-certificates wget
sudo apt install ./puppet6-release-buster.deb

Add the Foreman repository to the Debian 10 (Buster) system.

sudo apt -y install gpg ca-certificates
echo "deb buster 2.0" | sudo tee /etc/apt/sources.list.d/foreman.list
echo "deb plugins 2.0" | sudo tee -a /etc/apt/sources.list.d/foreman.list
wget -q -O- | sudo apt-key add -

Step 3: Download the Foreman installer

Use the following command to download the installer.

sudo apt update
sudo apt -y install foreman-installer

Before using the installer to obtain the latest version of Foreman running on a Debian 10 (Buster) computer, delete the entry for localhost on / etc / hosts.

$ sudo vim /etc/hosts deb10.novalocal deb10

Test to confirm that the host name does not return the local host address.

$ ping $(hostname -f)
PING deb10.novalocal ( 56(84) bytes of data.
64 bytes from deb10.novalocal ( icmp_seq=1 ttl=64 time=0.024 ms
64 bytes from deb10.novalocal ( icmp_seq=2 ttl=64 time=0.019 ms
--- deb10.novalocal ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 4ms
rtt min/avg/max/mdev = 0.019/0.021/0.024/0.005 ms

Step 4: Install Foreman on Debian 10 (Buster)

By default, the installation will run in non-interactive mode, but you can customize the configuration by providing any of the options listed below:

$ foreman-installer --help

For interactive mode, run:

$ foreman-installer -i

More examples at Installation options section. Adding -v The progress bar will be disabled and all changes will be displayed.

I will start the Foreman installer by executing the following command:

$ sudo foreman-installer

If Smart Proxy, Puppet master is installed on Foreman, the installer will output detailed information about them after installation.

Preparing installation Done                                              
  * Foreman is running at https://deb10.novalocal
      Initial credentials are admin / yafNTaFNNJRUGP84
  * Foreman Proxy is running at https://deb10.novalocal:8443
  The full log is at /var/log/foreman-installer/foreman.log

Log in to Foreman Dashboard using the details given in the output.

Install and configure Foreman 2.x on Debian 10 (Buster)

You should see a dashboard similar to the following.

Install and configure Foreman 2.x on Debian 10 (Buster)

You are now on the right path, using Foreman to define infrastructure automation.

Install and configure Foreman 2.x on Debian 10 (Buster)

References and more reading:

You can download this article in PDF format to support us through the following link.

Download the guide as a PDF

turn off