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
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
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:
Operating System |
Architecture |
Notes |
Ubuntu 18.04 (Bionic) |
amd64 |
|
Debian 10 (Buster) |
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.
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.
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:
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.
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) |
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.
Port | Protocol | Service | Required For |
---|---|---|---|
22 |
TCP |
SSH |
Foreman and Smart Proxy originated communications, for Remote Execution (Rex) and Ansible. |
7911 |
TCP |
DHCP |
|
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.
-
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.4 server on Debian.
If you do not use firewall-cmd
to configure the Linux firewall, implement using the command of your choice.
-
On Foreman server, enter the following command to open the port for Smart Proxy to Foreman communication:
# firewall-cmd --add-port="5646/tcp"
-
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.
-
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"
-
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.
-
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 the following procedure to enable the repositories that are required to install Foreman.
-
Add the Debian repository sources to the
/etc/apt/sources.list.d/foreman.list
file:# echo "deb http://deb.theforeman.org/ buster 2.4" | tee /etc/apt/sources.list.d/foreman.list # echo "deb http://deb.theforeman.org/ plugins 2.4" | tee -a /etc/apt/sources.list.d/foreman.list
-
Install the
ca-certificates
andgpg
packages:# apt-get -y install ca-certificates gpg
-
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 Smart Proxy server packages, you must update all packages that are installed on the base operating system.
To install Smart Proxy server, complete the following steps:
-
Update all packages:
# apt-get upgrade
-
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.
-
Install the
chrony
package:# apt-get install chrony
-
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.
-
Log into the Foreman web UI.
-
From the Organization list in the upper-left of the screen, select Any Organization.
-
From the Location list in the upper-left of the screen, select Any Location.
-
Navigate to Hosts > All Hosts and select Smart Proxy server.
-
From the Select Actions list, select Assign Organization.
-
From the Organization list, select the organization where you want to assign this Smart Proxy.
-
Click Fix Organization on Mismatch.
-
Click Submit.
-
Select Smart Proxy server. From the Select Actions list, select Assign Location.
-
From the Location list, select the location where you want to assign this Smart Proxy.
-
Click Fix Location on Mismatch.
-
Click Submit.
-
Navigate to Administer > Organizations and click the organization to which you have assigned Smart Proxy.
-
Click Smart Proxies tab and ensure that Smart Proxy server is listed under the Selected items list, then click Submit.
-
Navigate to Administer > Locations and click the location to which you have assigned Smart Proxy.
-
Click Smart Proxies tab and ensure that Smart Proxy server is listed under the Selected items list, then click Submit.
Optionally, you can verify if Smart Proxy server is correctly listed in the Foreman web UI.
-
Select the organization from the Organization list.
-
Select the location from the Location list.
-
Navigate to Hosts > All Hosts.
-
Navigate to Infrastructure > Smart Proxies.
2.6. 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 Foreman server default Certificate Authority (CA).
-
Smart Proxy server packages are installed. For more information, see Installing Smart Proxy server Packages.
-
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
-
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 theforeman-proxy-certs-generate
command returns for deploying the certificate to your Smart Proxy server.Example output offoreman-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"
-
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
-
On Smart Proxy server, to deploy the certificate, enter the
foreman-installer
command that theforeman-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 tofalse
to prevent Smart Proxy from attempting to connect to Foreman and reporting errors. Run the installer again with this option set totrue
when the network and firewalls are correctly configured.ImportantDo 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 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.
-
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.
-
All managed hosts must have a network interface of BMC type. Smart Proxy server uses this NIC to pass the appropriate credentials to the host. For more information, see Adding a Baseboard Management Controller (BMC) Interface in Managing Hosts.
-
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.
If you want to use Multihomed DHCP, you must inform the installer.
-
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.
-
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 filling the passenger request queue. The limit of 100 concurrent requests applies. |
The following table describes the scalability limits using the recommended 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.
Puppet Managed Resources per Host | Run-Interval Distribution |
---|---|
1 |
1700-1450 |
10 |
1500-1250 |
20 |
850-700 |