Chapter 5. 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.

5.1. Applying Configuration on Clients During Provisioning

We first define a new host's Puppet configuration using the following procedure. This procedure uses the uploaded mymodule as an example.

Procedure 5.1. Applying Configuration on Clients During Provisioning

  1. Navigate to HostsNew host.
  2. 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.
  3. 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
  4. Choose the necessary options from the Network and Operating System tabs. 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.
  5. Click the Parameters tab and provide any custom overrides to our Puppet class parameters. For example, modify the httpd_port from the mymodule to set your own custom port.
  6. 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:
<% if puppet_enabled %>
# and add the puppet package
yum -t -y -e 0 install puppet

echo "Configuring puppet"
cat > /etc/puppet/puppet.conf << EOF
<%= snippet 'puppet.conf' %>
EOF

# Setup puppet to run on system reboot
/sbin/chkconfig --level 345 puppet on

/usr/bin/puppet agent --config /etc/puppet/puppet.conf -o --tags no_such_tag <%= @host.puppetmaster.blank? ? '' : "--server #{@host.puppetmaster}" %> --no-daemonize
<% end -%>
This section performs the following:
  • Installs the puppet package from the Red Hat Satellite 6 Tools RPMs repository.
  • Installs the Puppet configuration snippet to the system at /etc/puppet/puppet.conf.
  • Enables the Puppet service to run on the system.
  • Run Puppet for the first time and apply the system configuration.
After the provisioning and configuration processes complete on the new host, access the host and user-defined port in your web browser. For example, navigate to http://newhost.example.com:8120/ and the following message appears in your browser:
Congratulations

Your puppet module has correctly applied your configuration.