The Foreman installer is a collection of Puppet modules that installs everything required for a full working Foreman setup. It uses native OS packaging (e.g. RPM and .deb packages) and adds necessary configuration for the complete installation.

Components include the Foreman web UI, Smart Proxy, a Puppet server, TFTP, DNS and DHCP servers. It is configurable and the Puppet modules can be read or run in “no-op” mode to see what changes it will make.

Supported Operating Systems

You can install the operating system from a disc, local ISO image, or kickstart.

The following operating systems are supported by the installer, have packages, and are tested for deploying Foreman:

Table 1. Operating Systems supported by foreman-installer

Operating System

Architecture

Notes

CentOS 7

x86_64 only

EPEL is required.

CentOS 8

x86_64 only

EPEL is not supported.

Red Hat Enterprise Linux 7

x86_64 only

EPEL is required.

Before you install Foreman, apply all operating system updates if possible.

Install Foreman server on a freshly provisioned system.

The installation will require 4GB of memory, see System Requirements for more information.

The Foreman installer uses Puppet (5 or later required) to install Foreman. This guide assumes that you have a newly installed operating system, on which the installer will setup Foreman, a Puppet server, and the Smart Proxy by default. It’s not advisable to follow the steps below on an existing system, since the installer will affect the configuration of several components.

1. Configuring Repositories

Use this procedure to enable the repositories that are required to install Foreman server. Choose from the available list which operating system and version you are installing on:

1.1. CentOS 7

  1. Clear any metadata:

    # yum clean all
  2. Install the foreman-release.rpm package:

    # yum localinstall https://yum.theforeman.org/releases/3.0/el7/x86_64/foreman-release.rpm
  3. Install the katello-repos-latest.rpm package

    # yum localinstall https://yum.theforeman.org/katello/4.2/katello/el7/x86_64/katello-repos-latest.rpm
  4. Install the puppet6-release-el-7.noarch.rpm package:

    # yum localinstall https://yum.puppet.com/puppet6-release-el-7.noarch.rpm
  5. Install the epel-release package:

    # yum install epel-release
  6. Install the centos-release-scl-rh package:

    # yum install centos-release-scl-rh

1.2. CentOS 8

  1. Clear any metadata:

    # dnf clean all
  2. Install the foreman-release.rpm package:

    # dnf localinstall https://yum.theforeman.org/releases/3.0/el8/x86_64/foreman-release.rpm
  3. Install the katello-repos-latest.rpm package

    # dnf localinstall https://yum.theforeman.org/katello/4.2/katello/el8/x86_64/katello-repos-latest.rpm
  4. Install the centos-release-ansible-29 package to enable repositories for dependencies of the Ansible collection support:

    # dnf install centos-release-ansible-29
  5. Install the puppet6-release-el-8.noarch.rpm package:

    # dnf localinstall https://yum.puppet.com/puppet6-release-el-8.noarch.rpm
  6. Enable Ruby 2.7 module:

    # dnf module reset ruby
    # dnf module enable ruby:2.7
  7. Enable powertools repository:

    # dnf config-manager --set-enabled powertools
  8. Enable the PostgreSQL 12 module:

    # dnf module enable postgresql:12
  9. If the PostgreSQL 10 module has already been enabled, a module reset will need to be performed.

    # dnf module reset postgresql
    # dnf module enable postgresql:12

1.3. Red Hat Enterprise Linux 7

  1. Disable all repositories:

    # subscription-manager repos --disable "*"
  2. Enable the following repositories:

    # subscription-manager repos --enable=rhel-7-server-rpms \
    --enable rhel-7-server-optional-rpms \
    --enable rhel-server-rhscl-7-rpms
  3. Install the epel-release-latest-7.noarch.rpm package:

    # yum localinstall https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  4. Clear any metadata:

    # yum clean all
  5. Install the foreman-release.rpm package:

    # yum localinstall https://yum.theforeman.org/releases/3.0/el7/x86_64/foreman-release.rpm
  6. Install the katello-repos-latest.rpm package

    # yum localinstall https://yum.theforeman.org/katello/4.2/katello/el7/x86_64/katello-repos-latest.rpm
  7. Install the puppet6-release-el-7.noarch.rpm package:

    # yum localinstall https://yum.puppet.com/puppet6-release-el-7.noarch.rpm
Note
If you are installing Foreman server as a virtual machine hosted on oVirt, you must also enable the Red Hat Common repository, and install oVirt guest agents and drivers. For more information, see Installing the Guest Agents and Drivers on Red Hat Enterprise Linux in the Virtual Machine Management Guide for more information.

2. Installing Foreman server Packages

2.1. CentOS 7

Procedure
  1. Update all packages:

    # yum update
  2. Install foreman-installer-katello

    # yum install foreman-installer-katello

2.2. CentOS 8

  1. Update all packages:

    # dnf update
  2. Install foreman-installer-katello

    # dnf install foreman-installer-katello

2.3. Red Hat Enterprise Linux 7

  1. Update all packages:

    # yum update
  2. Install foreman-installer-katello

    # yum install foreman-installer-katello

3. Running the Installer

The installation run is non-interactive, but the configuration can be customized by supplying any of the options listed in foreman-installer --help, or by running foreman-installer -i for interactive mode. More examples are given in the Installation Options section. Adding -v will disable the progress bar and display all changes.

To run the installer, execute:

# foreman-installer --scenario katello

When the installer has completed, details will be printed about where to find Foreman and the Smart Proxy.