此内容没有您所选择的语言版本。
Chapter 2. Enabling Puppet integration with Satellite
Enable Puppet integration in Satellite to deploy and manage Puppet server on Satellite Server or Capsule Servers, or to connect an external Puppet server for reporting, facts, and external node classification (ENC).
Deploy Puppet server to enable Puppet integration on Satellite Server and optionally also on Capsule Servers.
Procedure
Enable Puppet integration and install Puppet server on Satellite Server:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you want to use Puppet integration on Capsule Servers, enable Puppet integration and install Puppet server on Capsule Servers:
satellite-installer \ --enable-puppet \ --foreman-proxy-puppet true \ --foreman-proxy-puppetca true \ --puppet-server true
# satellite-installer \ --enable-puppet \ --foreman-proxy-puppet true \ --foreman-proxy-puppetca true \ --puppet-server trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow
You can install and configure the Puppet agent on a host during the provisioning process. A configured Puppet agent is required on the host for Puppet integration with your Satellite.
Prerequisites
- Puppet must be enabled in your Satellite. For more information, see Chapter 2, Enabling Puppet integration with Satellite.
- Red Hat Satellite Client 6 repository for the operating system version of the host is synchronized on Satellite Server and enabled in the activation key you use. For more information, see Importing Content in Managing content.
- You have an activation key. For more information, see Managing Activation Keys in Managing content.
Procedure
- In the Satellite web UI, navigate to Hosts > Templates > Provisioning Templates.
- Select a provisioning template depending on your host provisioning method. For more information, see Kinds of Provisioning Templates in Provisioning hosts.
Ensure the
puppet_setupsnippet is included as follows:<%= snippet 'puppet_setup' %>
<%= snippet 'puppet_setup' %>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note that this snippet is already included in the templates shipped with Satellite, such as
Kickstart defaultorPreseed default.-
Enable the Puppet agent using a host parameter in global parameters, a host group, or for a single host. To use Puppet 8, add a host parameter named
enable-puppet8, select the boolean type, and set the value totrue. To use Puppet 7, add a host parameter namedenable-puppet7, select the boolean type, and set the value totrue. Set configuration for the Puppet agent.
- If you use an integrated Puppet server, ensure that you select a Puppet Capsule, Puppet CA Capsule, and Puppet environment when you create a host.
If you use a non-integrated Puppet server, either set the following host parameters in global parameters, or a host group, or when you create a host:
-
Add a host parameter named
puppet_server, select the string type, and set the value to the hostname of your Puppet server, such aspuppet.example.com. -
Optional: Add a host parameter named
puppet_ca_server, select the string type, and set the value to the hostname of your Puppet CA server, such aspuppet-ca.example.com. Ifpuppet_ca_serveris not set, the Puppet agent will use the same server aspuppet_server. -
Optional: Add a host parameter named
puppet_environment, select the string type, and set the value to the Puppet environment you want the host to use.
-
Add a host parameter named
- Ensure your host has access to the Puppet agent packages from Satellite Server by using an appropriate activation key.
You can install and configure the Puppet agent on the host during registration. A configured Puppet agent is required on the host for Puppet integration with your Satellite.
Prerequisites
- Puppet must be enabled in your Satellite. For more information, see Chapter 2, Enabling Puppet integration with Satellite.
- Red Hat Satellite Client 6 repository for the operating system version of the host is synchronized on Satellite Server and enabled in the activation key you use. For more information, see Importing Content in Managing content.
- You have an activation key. For more information, see Managing Activation Keys in Managing content.
Procedure
- In the Satellite web UI, navigate to Configure > Global Parameters to add host parameters globally. Alternatively, you can navigate to Configure > Host Groups and edit or create a host group to add host parameters only to a host group.
Enable the Puppet agent using a host parameter in global parameters or a host group.
Add a host parameter named
enable-puppet7, select the boolean type, and set the value totrue.Specify configuration for the Puppet agent using the following host parameters in global parameters or a host group:
-
Add a host parameter named
puppet_server, select the string type, and set the value to the hostname of your Puppet server, such aspuppet.example.com. -
Optional: Add a host parameter named
puppet_ca_server, select the string type, and set the value to the hostname of your Puppet CA server, such aspuppet-ca.example.com. Ifpuppet_ca_serveris not set, the Puppet agent will use the same server aspuppet_server. -
Optional: Add a host parameter named
puppet_environment, select the string type, and set the value to the Puppet environment you want the host to use.
Until the BZ2177730 is resolved, you must use host parameters to specify the Puppet agent configuration even in integrated setups where the Puppet server is a Capsule Server.
-
Add a host parameter named
- Navigate to Hosts > Register Host and register your host using an appropriate activation key. For more information, see Registering hosts by using global registration in Managing hosts.
- Navigate to Infrastructure > Capsules.
- From the list in the Actions column for the required Capsule Server, select Certificates.
- Click Sign to the right of the required host to sign the SSL certificate for the Puppet agent.
2.4. Installing and configuring Puppet agent manually 复制链接链接已复制到粘贴板!
You can install and configure the Puppet agent on a host manually. A configured Puppet agent is required on the host for Puppet integration with your Satellite.
Prerequisites
- Puppet must be enabled in your Satellite. For more information, see Chapter 2, Enabling Puppet integration with Satellite.
- The host must have a Puppet environment assigned to it.
- Red Hat Satellite Client 6 repository for the operating system version of the host is synchronized on Satellite Server, available in the content view and the lifecycle environment of the host, and enabled for the host. For more information, see Changing the repository sets status for a host in Satellite in Managing content.
Procedure
-
Log in to the host as the
rootuser. Install the Puppet agent package.
On hosts running Red Hat Enterprise Linux 8 and above:
dnf install puppet-agent
# dnf install puppet-agentCopy to Clipboard Copied! Toggle word wrap Toggle overflow On hosts running Red Hat Enterprise Linux 7 and below:
yum install puppet-agent
# yum install puppet-agentCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Add the Puppet agent to
PATHin your current shell using the following script:. /etc/profile.d/puppet-agent.sh
. /etc/profile.d/puppet-agent.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the Puppet agent. Set the
environmentparameter to the name of the Puppet environment to which the host belongs:puppet config set server satellite.example.com --section agent puppet config set environment My_Puppet_Environment --section agent
# puppet config set server satellite.example.com --section agent # puppet config set environment My_Puppet_Environment --section agentCopy to Clipboard Copied! Toggle word wrap Toggle overflow Start the Puppet agent service:
puppet resource service puppet ensure=running enable=true
# puppet resource service puppet ensure=running enable=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a certificate for the host:
puppet ssl bootstrap
# puppet ssl bootstrapCopy to Clipboard Copied! Toggle word wrap Toggle overflow - In the Satellite web UI, navigate to Infrastructure > Capsules.
- From the list in the Actions column for the required Capsule Server, select Certificates.
- Click Sign to the right of the required host to sign the SSL certificate for the Puppet agent.
On the host, run the Puppet agent again:
puppet ssl bootstrap
# puppet ssl bootstrapCopy to Clipboard Copied! Toggle word wrap Toggle overflow