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

  • A minimum of 12 GB RAM is required for Smart Proxy server to function. In addition, a minimum of 4 GB RAM of swap space is also recommended. Smart Proxy running with less RAM than the minimum value might not operate correctly.

  • A unique host name, which can contain lower-case letters, numbers, dots (.) and hyphens (-)

  • Administrative user (root) access

  • A system umask of 0022

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

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:

  • foreman-proxy

  • puppet

  • puppetserver

Note
The Foreman Server and Smart Proxy server versions must match. For example, a Foreman 1.22 Server cannot run an earlier or later version of Smart Proxy server. Mismatching Foreman server and Smart Proxy server versions results in the Smart Proxy server failing silently.

For more information on scaling your Smart Proxy servers, see Smart Proxy server Scalability Considerations.

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

Ubuntu 16.04 (Xenial)

amd64

Ubuntu 18.04 (Bionic)

amd64

Debian 9 (Stretch)

amd64

Other operating systems must use alternative installation methods, such as from source.

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

All operating systems require Puppet 5 or higher, which you can install from the operating system or the Puppet Labs repositories.

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, 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. Ports for Smart Proxy to Foreman Communication
Port Protocol Service Required For

5646

TCP

amqp

Smart Proxy’s Qpid dispatch router to Qpid dispatch router in Foreman

Some of the following ports apply only to deployments that use the Katello plug-in. For Debian deployments, ignore references to the Katello plug-in.

Table 3. Ports for Client to Smart Proxy Communication
8140 TCP HTTPS Puppet agent to Puppet master connections

8443

TCP

HTTPS

Subscription Management Services and Telemetry Services

9090

TCP

HTTPS

Sending SCAP reports to the Smart Proxy and for the discovery image during provisioning

53

TCP and UDP

DNS

Client DNS queries to a Smart Proxy’s DNS service (Optional)

67

UDP

DHCP

Client to Smart Proxy broadcasts, DHCP broadcasts for Client provisioning from a Smart Proxy (Optional)

69

UDP

TFTP

Clients downloading PXE boot image files from a Smart Proxy for provisioning (Optional)

Table 4. Ports for Smart Proxy to Client Communication
Port Protocol Service Required For

7

TCP and UDP

ICMP

DHCP Smart Proxy to Client network, ICMP ECHO to verify IP address is free (Optional)

68

UDP

DHCP

Smart Proxy to Client broadcasts, DHCP broadcasts for Client provisioning from a Smart Proxy (Optional)

8443

TCP

HTTP

Smart Proxy to Client "reboot" command to a discovered host during provisioning (Optional)

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.

Table 5. Optional Network Ports
Port Protocol Service Required For

22

TCP

SSH

Foreman and Smart Proxy originated communications, for Remote Execution (Rex) and Ansible.

7911

TCP

DHCP

  • Smart Proxy originated commands for orchestration of DHCP records (local or external).

  • If DHCP is provided by an external service, you must open the port on the external server.

Note
A DHCP Smart Proxy sends an ICMP ECHO to confirm an IP address is free, no response of any kind is expected. ICMP can be dropped by a networked-based firewall, but any response prevents the allocation of IP addresses.

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 server on Debian.

Procedure

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

  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.

Procedure

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

  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="5000/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.

Procedure

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

To verify the firewall settings, complete the following step:

  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 System Requirements.

2.1. Configuring Repositories

Use the following procedure to enable the repositories that are required to install Foreman.

  1. Add the Debian repository sources to the /etc/apt/sources.list.d/foreman.list file:

    # echo "deb http://deb.theforeman.org/ buster 2.0" | tee /etc/apt/sources.list.d/foreman.list
    # echo "deb http://deb.theforeman.org/ plugins 2.0" | tee -a /etc/apt/sources.list.d/foreman.list
  2. Install the ca-certificates and gpg packages

    # apt-get -y install ca-certificates gpg
  3. Download and add the public GPG key:

    # wget -q https://deb.theforeman.org/pubkey.gpg -O- | apt-key add -

2.2. Installing Smart Proxy server Packages

Before installing the 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 update
  2. Install the foreman-proxy-content package:

    # apt-get install foreman-proxy-content

2.3. Installing Smart Proxy server

  • 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. Configuring Smart Proxy server with a Default SSL Certificate

Use this section to configure Smart Proxy server with an SSL certificate that is signed by the Foreman server default Certificate Authority (CA).

Prerequisites

Before configuring Smart Proxy server with a default server certificate, ensure that your Smart Proxy server meets the following conditions:

Procedure

To configure Smart Proxy server with a default server certificate, complete the following steps:

  1. On Foreman server, to store all the source certificate files for your Smart Proxy server, create a directory that is accessible only to the root user, for example /root/smart-proxy_cert:

    # mkdir /root/smart-proxy_cert
  2. On Foreman server, generate the /root/smart-proxy_cert/smart-proxy_certs.tar certificate archive for your Smart Proxy server:

    # foreman-proxy-certs-generate \
    --foreman-proxy-fqdn smartproxy.example.com \
    --certs-tar /root/smart-proxy_cert/smart-proxy_certs.tar

    Retain a copy of the foreman-installer command that the foreman-proxy-certs-generate command returns for deploying the certificate to your Smart Proxy server.

    Example output of foreman-proxy-certs-generate
    output omitted
    foreman-installer \
    --scenario foreman-proxy-content \
    --certs-tar-file                              "/root/smart-proxy_certs.tar"\
    --foreman-proxy-content-parent-fqdn           "foreman.example.com"\
    --foreman-proxy-register-in-foreman           "true"\
    --foreman-proxy-foreman-base-url              "https://foreman.example.com"\
    --foreman-proxy-trusted-hosts                 "foreman.example.com"\
    --foreman-proxy-trusted-hosts                 "smartproxy.example.com"\
    --foreman-proxy-oauth-consumer-key            "s97QxvUAgFNAQZNGg4F9zLq2biDsxM7f"\
    --foreman-proxy-oauth-consumer-secret         "6bpzAdMpRAfYaVZtaepYetomgBVQ6ehY"\
    --puppet-server-foreman-url                   "https://foreman.example.com"
  3. On Foreman server, copy the certificate archive file to your Smart Proxy server:

    # scp /root/smart-proxy_cert/smartproxy.example.com-certs.tar \
    root@smartproxy.example.com:/root/smartproxy.example.com-certs.tar
  4. On Smart Proxy server, to deploy the certificate, enter the foreman-installer command that the foreman-proxy-certs-generate command returns.

    When network connections or ports to Foreman are not yet open, you can set the --foreman-proxy-register-in-foreman option to false to prevent Smart Proxy from attempting to connect to Foreman and reporting errors. Run the installer again with this option set to true when the network and firewalls are correctly configured.

    Important
    Do not delete the certificate archive file after you deploy the certificate. It is required, for example, when upgrading Smart Proxy server.

3. Performing Additional Configuration on Smart Proxy server

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

3.1. Enabling Remote Execution on Smart Proxy server

To run commands on hosts that are registered to Smart Proxy server, you must enable the remote execution feature on your Smart Proxy.

Remote execution on external Smart Proxies is disabled by default.

Procedure
  • To enable remote execution on Smart Proxy server, enter the following command:

    # foreman-installer --no-enable-foreman \
    --enable-foreman-proxy-plugin-remote-execution-ssh

3.2. 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.3. 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.4. 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 --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 update the network interface file.

  1. In the /etc/systemd/system/dhcpd.service.d/interfaces.conf file, edit the following line to add Multihomed DHCP:

    [Service]
    ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid eth0 eth1 eth2

    If this file does not exist already, create it.

  2. Enter the following command to perform a daemon reload:

    # systemctl --system daemon-reload
  3. Enter the following command to restart the dhcpd service:

    # systemctl restart dhcpd.service
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-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 the 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. The 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 filling the passenger request queue. The limit of 100 concurrent requests applies.

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

Table 6. 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 7. Puppet Scalability Using 2 CPUs
Puppet Managed Resources per Host Run-Interval Distribution

1

1700-1450

10

1500-1250

20

850-700