Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 6. Applying Configuration on Clients
At this point, Satellite 6 Server’s Puppet ecosystem is configured and contains the mymodule
module. We now aim to apply this module’s configuration to a registered system.
6.1. Applying Configuration on Clients During Provisioning Link kopierenLink in die Zwischenablage kopiert!
We first define a new host’s Puppet configuration using the following procedure. This procedure uses the uploaded mymodule as an example.
Applying Configuration on Clients During Provisioning
- Navigate to Hosts > New host.
- Click the Host tab. Enter a Name for the host and choose the organization and location for the system. Choose the Lifecycle Environment and its promoted Content View. This defines the Puppet environment to use for the configuration. Also choose a Puppet CA and Puppet Master from the Capsule Settings. The chosen capsule acts as the server that controls the configuration and communicates with the agent on the new host.
Click the Puppet Classes tab and from the Available Classes section choose the Puppet classes that contain the configuration to apply. In our example, choose:
-
mymodule
-
mymodule:httpd
-
mymodule:app
-
-
Choose the necessary options from the Operating System tab. These options depend on your own Satellite 6 infrastructure. Make sure the Provisioning templates option includes the
Satellite Kickstart Default
kickstart template. This template contains installation commands for the Puppet agent on the new host. - Click the Parameters tab and provide any custom overrides to our Puppet class parameters. See Section 3.9, “Configuring Smart Class Parameters” to enable this feature.
- After completing all provisioning options, click Submit.
The provisioning process begins. Satellite 6 installs the required configuration tools as part of the Satellite Kickstart Default
provisioning template. This provisioning template contains the following:
This section performs the following:
- Installs the puppet package from the Red Hat Satellite Tools 6.7 repository.
- Installs the Puppet configuration snippet to the system at /etc/puppetlabs/puppet/puppet.conf.
- Enables the Puppet service to run on the system.
- Runs Puppet for the first time and initializes the node.
After the provisioning and configuration processes complete on the new host, access the host at the user-defined port in your web browser. For example, navigate to http://newhost.example.com:8120/
. The following message should appear in your browser:
Congratulations Your puppet module has correctly applied your configuration.
Congratulations
Your puppet module has correctly applied your configuration.
6.2. Applying Configuration to Existing Clients Link kopierenLink in die Zwischenablage kopiert!
You might aim to have Puppet configuration applied to an existing client not provisioned through Red Hat Satellite 6. In this situation, install and configure Puppet on the existing client after registering it to Red Hat Satellite 6.
Register your existing system to Red Hat Satellite 6. For information on registering existing hosts, see Registering Hosts in the Managing Hosts guide.
The puppet
package is part of the Red Hat Satellite Tools 6.7 repository. Ensure you enable this repository before you proceed.
To Install and Enable the Puppet Agent:
- Open a terminal console and log in as root.
Install the Puppet agent:
yum install puppet
# yum install puppet
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the Puppet agent to start at boot:
On Red Hat Enterprise Linux 6:
chkconfig puppet on
# chkconfig puppet on
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On Red Hat Enterprise Linux 7:
systemctl enable puppet
# systemctl enable puppet
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Configuring the Puppet Agent
Configure the Puppet agent by changing the /etc/puppetlabs/puppet/puppet.conf file:
vi /etc/puppetlabs/puppet/puppet.conf
# vi /etc/puppetlabs/puppet/puppet.conf
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantSet the
environment
parameter to the host’s Puppet environment from the Satellite Server. The Puppet environment label contains the organization label, life-cycle environment, content view name, and the content view ID. To see a list of Puppet environments in the Satellite 6 web UI, navigate to Configure > Environments.Run the Puppet agent on the host:
puppet agent -t --server satellite.example.com
# puppet agent -t --server satellite.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sign the SSL certificate for the Puppet client through the Satellite Server web interface:
- Log in to the Satellite Server through the web interface.
- Select Infrastructure > Capsules.
- Click Certificates to the right of the required host.
- Click Sign.
Rerun the
puppet agent
command:puppet agent -t --server satellite.example.com
# puppet agent -t --server satellite.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
When the Puppet agent is configured on the host it will be listed under All Hosts but only when Any Context is selected as the host will not be assigned to an organization or location.