1. Preparing your Environment for Installation

1.1. System Requirements

The following requirements apply to the networked base operating system:

  • x86_64 architecture

  • 4-core 2.0 GHz CPU at a minimum

  • Administrative user (root) access

  • A system umask of 0022

  • Full forward and reverse DNS resolution using a fully-qualified domain name

Foreman only supports UTF-8 encoding. If your territory is USA and your language is English, set en_US.utf-8 as the system-wide locale settings. For more information about configuring system locale in Enterprise Linux, see Configuring System Locale guide. Before you install Smart Proxy server, ensure that your environment meets the requirements for installation.

Smart Proxy server must be installed on a freshly provisioned system that serves no other function except to run Smart Proxy server. The freshly provisioned system must not have the following users provided by external identity providers to avoid conflicts with the local users that Smart Proxy server creates:

  • apache

  • foreman

  • foreman-proxy

  • postgres

  • puppet

  • puppetserver

  • redis

1.2. 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

Debian 10 (Buster)

amd64

Ubuntu 18.04 (Bionic)

amd64

Ubuntu 20.04 (Focal)

amd64

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

Install Smart Proxy server on a freshly provisioned system.

1.3. Ports and Firewalls Requirements

For the components of Foreman architecture to communicate, ensure that the required network ports are open and free on the base operating system. You must also ensure that the required network ports are open on any network-based firewalls.

The installation of a Smart Proxy server fails if the ports between Foreman server and Smart Proxy server are not open before installation starts.

Use this information to configure any network-based firewalls. Note that some cloud solutions must be specifically configured to allow communications between machines because they isolate machines similarly to network-based firewalls. If you use an application-based firewall, ensure that the application-based firewall permits all applications that are listed in the tables and known to your firewall. If possible, disable the application checking and allow open port communication based on the protocol.

Integrated Smart Proxy

Foreman server has an integrated Smart Proxy and any host that is directly connected to Foreman server is a Client of Foreman in the context of this section. This includes the base operating system on which Smart Proxy server is running.

Clients of Smart Proxy

Hosts which are clients of Smart Proxies, other than Foreman’s integrated Smart Proxy, do not need access to Foreman server. For more information on Foreman Topology and an illustration of port connections, see Smart Proxy Networking in Planning for Foreman.

Required ports can change based on your configuration.

The following tables indicate the destination port and the direction of network traffic:

Table 2. Smart Proxy incoming traffic
Destination Port Protocol Service Source Required For Description

53

TCP and UDP

DNS

DNS Servers and clients

Name resolution

DNS (optional)

67

UDP

DHCP

Client

Dynamic IP

DHCP (optional)

69

UDP

TFTP

Client

TFTP Server (optional)

8000

TCP

HTTP

Client

Provisioning templates

Template retrieval for client installers, iPXE or UEFI HTTP Boot

8000

TCP

HTTP

Client

PXE Boot

Installation

8140

TCP

HTTPS

Client

Puppet agent

Client updates (optional)

8443

TCP

HTTPS

Client

OpenSCAP

Configure Client

8443

TCP

HTTPS

Foreman

Smart Proxy API

Smart Proxy functionality

Any managed host that is directly connected to Foreman server is a client in this context because it is a client of the integrated Smart Proxy. This includes the base operating system on which a Smart Proxy server is running.

A DHCP Smart Proxy performs ICMP ping and TCP echo connection attempts to hosts in subnets with DHCP IPAM set to find out if an IP address considered for use is free. This behavior can be turned off using foreman-installer --foreman-proxy-dhcp-ping-free-ip=false.

Table 3. Smart Proxy outgoing traffic
Destination Port Protocol Service Destination Required For Description

ICMP

ping

Client

DHCP

Free IP checking (optional)

7

TCP

echo

Client

DHCP

Free IP checking (optional)

22

TCP

SSH

Target host

Remote execution

Run jobs

53

TCP and UDP

DNS

DNS Servers on the Internet

DNS Server

Resolve DNS records (optional)

53

TCP and UDP

DNS

DNS Server

Smart Proxy DNS

Validation of DNS conflicts (optional)

68

UDP

DHCP

Client

Dynamic IP

DHCP (optional)

443

TCP

HTTPS

Foreman

Smart Proxy

Smart Proxy

Configuration management

Template retrieval

OpenSCAP

Remote Execution result upload

443

TCP

HTTPS

Infoblox DHCP Server

DHCP management

When using Infoblox for DHCP, management of the DHCP leases (optional)

623

Client

Power management

BMC On/Off/Cycle/Status

7911

TCP

DHCP, OMAPI

DHCP Server

DHCP

The DHCP target is configured using --foreman-proxy-dhcp-server and defaults to localhost

ISC and remote_isc use a configurable port that defaults to 7911 and uses OMAPI

8443

TCP

HTTPS

Client

Discovery

Smart Proxy sends reboot command to the discovered host (optional)

Note
ICMP to Port 7 UDP and TCP must not be rejected, but can be dropped. The DHCP Smart Proxy sends an ECHO REQUEST to the Client network to verify that an IP address is free. Any response will prevent IP addresses being allocated.

1.4. Enabling Connections from Smart Proxy server to Foreman server

On Foreman server, you must enable the incoming connection from Smart Proxy server to Foreman server and make this rule persistent across reboots.

Prerequisites
  • Ensure that the firewall rules on Foreman server are configured to enable connections for client to Foreman communication, because Smart Proxy server is a client of Foreman server. For more information, see Enabling Connections from a Client to Foreman server in Installing Foreman 2.5 server on Debian.

If you do not use firewall-cmd to configure the Linux firewall, implement using the command of your choice.

Procedure
  1. On Foreman server, enter the following command to open the port for Smart Proxy to Foreman communication:

    # firewall-cmd --add-port="5646/tcp"
  2. Make the changes persistent:

    # firewall-cmd --runtime-to-permanent

1.5. Enabling Connections from Foreman server and Clients to a Smart Proxy server

On the base operating system on which you want to install Smart Proxy, you must enable incoming connections from Foreman server and clients to Smart Proxy server and make these rules persistent across reboots.

If you do not use firewall-cmd to configure the Linux firewall, implement using the command of your choice.

Procedure
  1. On the base operating system on which you want to install Smart Proxy, enter the following command to open the ports for Foreman server and clients communication to Smart Proxy server:

    # firewall-cmd --add-port="53/udp" --add-port="53/tcp" \
    --add-port="67/udp" --add-port="69/udp" \
    --add-port="80/tcp" --add-port="443/tcp" \
    --add-port="5647/tcp" \
    --add-port="8000/tcp" --add-port="8140/tcp" \
    --add-port="8443/tcp" --add-port="9090/tcp"
  2. Make the changes persistent:

    # firewall-cmd --runtime-to-permanent

1.6. Verifying Firewall Settings

Use this procedure to verify your changes to the firewall settings.

If you do not use firewall-cmd to configure the Linux firewall, implement using the command of your choice.

Procedure
  1. Enter the following command:

    # firewall-cmd --list-all

2. Installing Smart Proxy server

Before you install Smart Proxy server, you must ensure that your environment meets the requirements for installation. For more information, see Preparing your Environment for Installation.

2.1. Configuring Repositories

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

2.1.1. Debian 10 (Buster)

  1. Install the ca-certificates package:

    # apt-get install ca-certificates
  2. Change directory to /tmp and install the puppet6-release-buster.deb package:

    cd /tmp && wget https://apt.puppet.com/puppet6-release-buster.deb
  3. Install the puppet6-release-buster.deb package:

    # dpkg -i /tmp/puppet6-release-buster.deb
  4. Enable the Foreman repository:

    echo "deb http://deb.theforeman.org/ buster 2.5" | sudo tee /etc/apt/sources.list.d/foreman.list
    echo "deb http://deb.theforeman.org/ plugins 2.5" | sudo tee -a /etc/apt/sources.list.d/foreman.list
    sudo apt-get -y install ca-certificates gpg
    wget -q https://deb.theforeman.org/pubkey.gpg -O- | sudo apt-key add -

2.1.2. Ubuntu 18.04 (Bionic)

  1. Install the ca-certificates package:

    # apt-get install ca-certificates
  2. Change directory to /tmp and install the puppet6-release-bionic.deb package:

    cd /tmp && wget https://apt.puppet.com/puppet6-release-bionic.deb
  3. Install the puppet6-release-bionic.deb package:

    # dpkg -i /tmp/puppet6-release-bionic.deb
  4. Enable the Foreman repository:

    echo "deb http://deb.theforeman.org/ bionic 2.5" | sudo tee /etc/apt/sources.list.d/foreman.list
    echo "deb http://deb.theforeman.org/ plugins 2.5" | sudo tee -a /etc/apt/sources.list.d/foreman.list
    sudo apt-get -y install ca-certificates gpg
    wget -q https://deb.theforeman.org/pubkey.gpg -O- | sudo apt-key add -

2.1.3. Ubuntu 20.04 (Focal)

  1. Install the ca-certificates package:

    # apt-get install ca-certificates
  2. Change directory to /tmp and install the puppet6-release-focal.deb package:

    cd /tmp && wget https://apt.puppet.com/puppet6-release-focal.deb
  3. Install the puppet6-release-focal.deb package:

    # dpkg -i /tmp/puppet6-release-focal.deb
  4. Enable the Foreman repository:

    echo "deb http://deb.theforeman.org/ focal 2.5" | sudo tee /etc/apt/sources.list.d/foreman.list
    echo "deb http://deb.theforeman.org/ plugins 2.5" | sudo tee -a /etc/apt/sources.list.d/foreman.list
    sudo apt-get -y install ca-certificates gpg
    wget -q https://deb.theforeman.org/pubkey.gpg -O- | sudo apt-key add -

2.2. Installing Smart Proxy server Packages

Before installing Smart Proxy server packages, you must update all packages that are installed on the base operating system.

Procedure

To install Smart Proxy server, complete the following steps:

  1. Update all packages:

    # apt-get upgrade
  2. Install the foreman-proxy-content package:

    # apt-get install foreman-proxy-content

2.3. Installing Smart Proxy server

Procedure
  • To install an external Smart Proxy, enter the following command:

    foreman-installer \
      --no-enable-foreman \
      --no-enable-foreman-cli \
      --enable-puppet \
      --puppet-server-ca=false \
      --puppet-server-foreman-url=https://foreman.example.com \
      --enable-foreman-proxy \
      --foreman-proxy-puppetca=false \
      --foreman-proxy-tftp=false \
      --foreman-proxy-foreman-base-url=https://foreman.example.com \
      --foreman-proxy-trusted-hosts=foreman.example.com \
      --foreman-proxy-oauth-consumer-key=oAuth_Consumer_Key \
      --foreman-proxy-oauth-consumer-secret=oAuth_Consumer_Secret

2.4. Synchronizing the System Clock With chronyd

To minimize the effects of time drift, you must synchronize the system clock on the base operating system on which you want to install Smart Proxy server with Network Time Protocol (NTP) servers. If the base operating system clock is configured incorrectly, certificate verification might fail.

For more information about the chrony suite, see Configuring NTP Using the chrony Suite in the Red Hat Enterprise Linux 7 System Administrator’s Guide.

Procedure
  1. Install the chrony package:

    # apt-get install chrony
  2. Start and enable the chronyd service:

    # systemctl start chronyd
    # systemctl enable chronyd

2.5. Assigning the Correct Organization and Location to Smart Proxy server in the Foreman web UI

After installing Smart Proxy server packages, if there is more than one organization or location, you must assign the correct organization and location to Smart Proxy to make Smart Proxy visible in the Foreman web UI.

Procedure
  1. Log into the Foreman web UI.

  2. From the Organization list in the upper-left of the screen, select Any Organization.

  3. From the Location list in the upper-left of the screen, select Any Location.

  4. Navigate to Hosts > All Hosts and select Smart Proxy server.

  5. From the Select Actions list, select Assign Organization.

  6. From the Organization list, select the organization where you want to assign this Smart Proxy.

  7. Click Fix Organization on Mismatch.

  8. Click Submit.

  9. Select Smart Proxy server. From the Select Actions list, select Assign Location.

  10. From the Location list, select the location where you want to assign this Smart Proxy.

  11. Click Fix Location on Mismatch.

  12. Click Submit.

  13. Navigate to Administer > Organizations and click the organization to which you have assigned Smart Proxy.

  14. Click Smart Proxies tab and ensure that Smart Proxy server is listed under the Selected items list, then click Submit.

  15. Navigate to Administer > Locations and click the location to which you have assigned Smart Proxy.

  16. Click Smart Proxies tab and ensure that Smart Proxy server is listed under the Selected items list, then click Submit.

Verification

Optionally, you can verify if Smart Proxy server is correctly listed in the Foreman web UI.

  1. Select the organization from the Organization list.

  2. Select the location from the Location list.

  3. Navigate to Hosts > All Hosts.

  4. Navigate to Infrastructure > Smart Proxies.

3. Performing Additional Configuration on Smart Proxy server

Use this chapter to configure additional settings on your Smart Proxy server.

3.1. Enabling OpenSCAP on External Smart Proxies

On Foreman server and the integrated Smart Proxy of your Foreman server, OpenSCAP is enabled by default.

To use the OpenSCAP plug-in and content on an external Smart Proxy, you must enable OpenSCAP on each Smart Proxy.

Procedure
  • To enable OpenSCAP, enter the following command:

    # foreman-installer --no-enable-foreman \
    --enable-foreman-proxy-plugin-openscap

3.2. Enabling Power Management on Managed Hosts

To perform power management tasks on managed hosts using the intelligent platform management interface (IPMI) or a similar protocol, you must enable the baseboard management controller (BMC) module on Smart Proxy server.

Prerequisites
Procedure
  • To enable BMC, enter the following command:

    # foreman-installer --no-enable-foreman \
    --foreman-proxy-bmc "true" \
    --foreman-proxy-bmc-default-provider "freeipmi"

3.3. Configuring DNS, DHCP, and TFTP on Smart Proxy server

To configure the DNS, DHCP, and TFTP services on Smart Proxy server, use the foreman-installer command with the options appropriate for your environment. To view a complete list of configurable options, enter the foreman-installer --scenario foreman --help command.

Any changes to the settings require entering the foreman-installer command again. You can enter the command multiple times and each time it updates all configuration files with the changed values.

Adding Multihomed DHCP details

If you want to use Multihomed DHCP, you must inform the installer.

Prerequisites
  • You must have the correct network name (dns-interface) for the DNS server.

  • You must have the correct interface name (dhcp-interface) for the DHCP server.

  • Contact your network administrator to ensure that you have the correct settings.

Procedure
  • Enter the foreman-installer command with the options appropriate for your environment. The following example shows configuring full provisioning services:

    # foreman-installer --no-enable-foreman \
    --foreman-proxy-dns true \
    --foreman-proxy-dns-managed true \
    --foreman-proxy-dns-interface eth0 \
    --foreman-proxy-dns-zone example.com \
    --foreman-proxy-dns-reverse 2.0.192.in-addr.arpa \
    --foreman-proxy-dhcp true \
    --foreman-proxy-dhcp-managed true \
    --foreman-proxy-dhcp-interface eth0 \
    --foreman-proxy-dhcp-additional-interfaces eth1 \
    --foreman-proxy-dhcp-additional-interfaces eth2 \
    --foreman-proxy-dhcp-range "192.0.2.100 192.0.2.150" \
    --foreman-proxy-dhcp-gateway 192.0.2.1 \
    --foreman-proxy-dhcp-nameservers 192.0.2.2 \
    --foreman-proxy-tftp true \
    --foreman-proxy-tftp-managed true \
    --foreman-proxy-tftp-servername 192.0.2.3

For more information about configuring DHCP, DNS, and TFTP services, see the Configuring Network Services section in the Provisioning Guide.

Appendix A: Smart Proxy server Scalability Considerations

The maximum number of Smart Proxy servers that Foreman server can support has no fixed limit. The tested limit is 17 Smart Proxy servers with 2 vCPUs on a Foreman server with Red Hat Enterprise Linux 7. However, scalability is highly variable, especially when managing Puppet clients.

Smart Proxy server scalability when managing Puppet clients depends on the number of CPUs, the run-interval distribution, and the number of Puppet managed resources. Smart Proxy server has a limitation of 100 concurrent Puppet agents running at any single point in time. Running more than 100 concurrent Puppet agents results in a 503 HTTP error.

For example, assuming that Puppet agent runs are evenly distributed with less than 100 concurrent Puppet agents running at any single point during a run-interval, a Smart Proxy server with 4 CPUs has a maximum of 1250-1600 Puppet clients with a moderate workload of 10 Puppet classes assigned to each Puppet client. Depending on the number of Puppet clients required, the Foreman installation can scale out the number of Smart Proxy servers to support them.

If you want to scale your Smart Proxy server when managing Puppet clients, the following assumptions are made:

  • There are no external Puppet clients reporting directly to the Foreman integrated Smart Proxy.

  • All other Puppet clients report directly to an external Smart Proxy.

  • There is an evenly distributed run-interval of all Puppet agents.

Note
Deviating from the even distribution increases the risk of overloading Foreman server. The limit of 100 concurrent requests applies.

The following table describes the scalability limits using the recommended 4 CPUs.

Table 4. Puppet Scalability Using 4 CPUs
Puppet Managed Resources per Host Run-Interval Distribution

1

3000-2500

10

2400-2000

20

1700-1400

The following table describes the scalability limits using the minimum 2 CPUs.

Table 5. Puppet Scalability Using 2 CPUs
Puppet Managed Resources per Host Run-Interval Distribution

1

1700-1450

10

1500-1250

20

850-700