Chapter 3. Registering Hosts

There are two main methods for registering a host to Satellite Server or Capsule Server:

  • Download and install the consumer RPM (server.example.com/pub/katello-ca-consumer-latest.noarch.rpm) and then run Subscription Manager. This method is suited for freshly installed hosts.
  • Download and run the bootstrap script (server.example.com/pub/bootstrap.py). This method is suited for both freshly installed hosts and hosts that have been previously registered, for example, to Satellite 5 or another Satellite 6.

You can also register Atomic Hosts to Satellite Server or Capsule Server.

Use one of the following procedures to register a host:

Use the following procedures to install and configure host tools:

Supported Host Operating Systems

Hosts must use one of the following Red Hat Enterprise Linux versions:

  • 5.7 or later
  • 6.1 or later*
  • 7.0 or later
  • 8.0 or later
Note

Red Hat Enterprise Linux versions 6.1, 6.2, and 6.3 require subscription-manager and related packages to be updated manually. For more information, see https://access.redhat.com/solutions/1256763.

Supported Architectures

All architectures of Red Hat Enterprise Linux are supported:

  • i386
  • x86_64
  • s390x
  • ppc_64

3.1. Registering a Host to Red Hat Satellite

Use the following procedure to register a host to Red Hat Satellite 6.

Prerequisites

  • Satellite Server, any Capsule Servers, and all hosts must be synchronized with the same NTP server, and have a time synchronization tool enabled and running.
  • The daemon rhsmcertd must be running on the hosts.
  • An activation key must be available for the host. For more information, see Managing Activation Keys in the Content Management Guide.
  • Subscription Manager must be version 1.10 or later. The package is available in the standard Red Hat Enterprise Linux repository.

Procedure

  1. Red Hat Enterprise Linux hosts register to the Content Delivery Network by default. Update each host configuration so that they receive updates from the correct Satellite Server or Capsule Server:

    1. Take note of the fully qualified domain name (FQDN) of the Satellite Server or Capsule Server, for example server.example.com.
    2. Log in to the host as the root user and install the consumer RPM from the Satellite Server or Capsule Server to which the host is to be registered. The consumer RPM updates the content source location of the host and allows the host to download content from the content source specified in Red Hat Satellite.

      # rpm -Uvh http://server.example.com/pub/katello-ca-consumer-latest.noarch.rpm
      Note

      The RPM package is not signed. If required, you can add the --nosignature option to install the package. The katello-ca-consumer-hostname-1.0-1.noarch.rpm package is an additional katello-ca-consumer RPM that contains the server’s host name. The katello-ca-consumer-latest.noarch.rpm package always reflects the most recent version. Both serve the same purpose.

  2. Clear any old host data related to Red Hat Subscription Manager (RHSM):

    # subscription-manager clean
  3. Register the host using RHSM:

    # subscription-manager register --org=your_org_name \
    --activationkey=your_activation_key

    Example 3.1. Command Output after Registration:

    # subscription-manager register --org=MyOrg --activationkey=TestKey-1
    The system has been registered with id: 62edc0f8-855b-4184-b1b8-72a9dc793b96
Note

You can use the --environment option to override the Content View and life cycle environment defined by the activation key. For example, to register a host to the Content View "MyView" in a "Development" life cycle environment:

 # subscription-manager register --org=your_org_name \
 --environment=Development/MyView \
 --activationkey=your_activation_key
Note

For Red Hat Enterprise Linux 6.3 hosts, the release version defaults to Red Hat Enterprise Linux 6 Server and needs to be pointed to the 6.3 repository:

  1. In the Satellite web UI, navigate to Hosts > Content Hosts.
  2. Select the check box next to the host that needs to be changed.
  3. From the Select Action list, select Set Release Version
  4. From the Release Version list, select 6.3.
  5. Click Done.

3.2. Registering an Atomic Host to Red Hat Satellite

Use the following procedure to register an Atomic Host to Red Hat Satellite 6.

Procedure

  1. Log in to the Atomic Host as the root user.
  2. Retrieve katello-rhsm-consumer from Satellite Server:

    # wget http://satellite.example.com/pub/katello-rhsm-consumer
  3. Change the mode of katello-rhsm-consumer to make it executable:

    # chmod +x katello-rhsm-consumer
  4. Run katello-rhsm-consumer:

    # ./katello-rhsm-consumer

    Register with Red Hat Subscription Manager:

    # subscription-manager register
Note

The Katello agent is not supported on Atomic Hosts.

3.3. Registering a Host to Red Hat Satellite Using The Bootstrap Script

Use the bootstrap script to automate content registration and Puppet configuration. You can use the bootstrap script to register new hosts, or to migrate existing hosts to Red Hat Satellite 6 from Satellite 5, RHN, SAM, or RHSM.

The katello-client-bootstrap package is installed by default on Satellite Server’s base operating system. The bootstrap.py script is installed in the /var/www/html/pub/ directory to make it available to hosts at satellite6.example.com/pub/bootstrap.py. The script includes documentation in the /usr/share/doc/katello-client-bootstrap-version/README.md file.

To use the bootstrap script, you must install it on the host. As the script is only required once, and only for the root user, you can place it in /root or /usr/local/sbin and remove it after use. This procedure uses /root.

Prerequisites

  • You have a Satellite user with the permissions required to run the bootstrap script. The examples in this procedure specify the admin user. If this is not acceptable to your security policy, create a new role with the minimum permissions required and add it to the user that will run the script. For more information, see Section 3.3.1, “Setting Permissions for the Bootstrap Script”.
  • You have an activation key for your hosts with the Satellite Tools repository enabled. For information on configuring activation keys, see Managing Activation Keys in the Content Management Guide.
  • You have created a host group. For more information about creating host groups, see Section 2.4, “Creating a Host Group”.

Puppet Considerations

If a host group is associated with a Puppet environment created inside a Production environment, Puppet fails to retrieve the Puppet CA certificate while registering a host from that host group.

To create a suitable Puppet environment to be associated with a host group, complete the following steps:

  1. Manually create a directory and change the owner:

    # mkdir /etc/puppetlabs/code/environments/example_environment
    # chown apache /etc/puppetlabs/code/environments/example_environment
  2. Navigate to Configure > Environments and click Import environment from. The button name includes the FQDN of the internal or external Capsule.
  3. Choose the created directory and click Update.

Red Hat Enterprise Linux 8 Considerations

Python is not installed by default on Red Hat Enterprise Linux 8, but Ansible requires Python to gather facts. If you want to use the bootstrap script for a host with a Red Hat Enterprise Linux 8 operating system, you must add a parameter to specify the Python interpreter to use. You can use either the platform Python, /usr/libexec/platform-python, or specify the version you want, for example, /usr/bin/python3.6.

  1. In the Satellite web UI, navigate to Hosts > Operating Systems, and click the Red Hat Enterprise Linux 8 profile.
  2. Click the Parameters tab and click Add Parameter.
  3. In the Name field, enter ansible_python_interpreter.
  4. In the Value field, enter /usr/libexec/platform-python.
  5. Click Submit to save.

Procedure

  1. Log in to the host as the root user.
  2. Download the script:

    # curl -O http://satellite6.example.com/pub/bootstrap.py
  3. Make the script executable:

    # chmod +x bootstrap.py
  4. Confirm that the script is executable by viewing the help text:

    • On Red Hat Enterprise Linux 8:

      # /usr/libexec/platform-python bootstrap.py -h
    • On other Red Hat Enterprise Linux versions:

      # ./bootstrap.py -h
  5. Enter the bootstrap command with values suitable for your environment.

    For the --server option, specify the FQDN of Satellite Server or a Capsule Server. For the --location, --organization, and --hostgroup options, use quoted names, not labels, as arguments to the options. See Section 3.3.2, “Advanced Bootstrap Script Configuration” for advanced use cases.

    • On Red Hat Enterprise Linux 8, enter the following command:

      # /usr/libexec/platform-python bootstrap.py \
      --login=admin \
      --server satellite6.example.com \
      --location="Example Location" \
      --organization="Example Organization" \
      --hostgroup="Example Host Group" \
      --activationkey=activation_key
    • On other Red Hat Enterprise Linux versions, enter the following command:

      # ./bootstrap.py --login=admin \
      --server satellite6.example.com \
      --location="Example Location" \
      --organization="Example Organization" \
      --hostgroup="Example Host Group" \
      --activationkey=activation_key
  6. Enter the password of the Satellite user you specified with the --login option.

    The script sends notices of progress to stdout.

  7. When prompted by the script, approve the host’s Puppet certificate. In the Satellite web UI, navigate to Infrastructure > Capsules and find the Satellite or Capsule Server you specified with the --server option.
  8. From the list in the Actions column, select Certificates.
  9. In the Actions column, click Sign to approve the host’s Puppet certificate.
  10. Return to the host to see the remainder of the bootstrap process completing.
  11. In the Satellite web UI, navigate to Hosts > All hosts and ensure that the host is connected to the correct host group.
  12. Optional: After the host registration is complete, remove the script:

    # rm bootstrap.py

3.3.1. Setting Permissions for the Bootstrap Script

Use this procedure to configure a Satellite user with the permissions required to run the bootstrap script.

Procedure

  1. In the Satellite web UI, navigate to Administer > Users.
  2. Select an existing user by clicking the required Username. A new pane opens with tabs to modify information about the selected user. Alternatively, create a new user specifically for the purpose of running this script.
  3. Click the Roles tab.
  4. Select Edit hosts and Viewer from the Roles list.

    Important

    The Edit hosts role allows the user to edit and delete hosts as well as being able to add hosts. If this is not acceptable to your security policy, create a new role with the following permissions and assign it to the user:

    • view_organizations
    • view_locations
    • view_domains
    • view_hostgroups
    • view_hosts
    • view_architectures
    • view_ptables
    • view_operatingsystems
    • create_hosts
  5. Click Submit.

For CLI Users

  1. Create a role with the minimum permissions required by the bootstrap script. This example creates a role with the name Bootstrap:

    # ROLE='Bootstrap'
    hammer role create --name "$ROLE"
    hammer filter create --role "$ROLE" --permissions view_organizations
    hammer filter create --role "$ROLE" --permissions view_locations
    hammer filter create --role "$ROLE" --permissions view_domains
    hammer filter create --role "$ROLE" --permissions view_hostgroups
    hammer filter create --role "$ROLE" --permissions view_hosts
    hammer filter create --role "$ROLE" --permissions view_architectures
    hammer filter create --role "$ROLE" --permissions view_ptables
    hammer filter create --role "$ROLE" --permissions view_operatingsystems
    hammer filter create --role "$ROLE" --permissions create_hosts
  2. Assign the new role to an existing user:

    # hammer user add-role --id user_id --role Bootstrap

    Alternatively, you can create a new user and assign this new role to them. For more information on creating users with Hammer, see Creating Users in the Hammer CLI Guide.

3.3.2. Advanced Bootstrap Script Configuration

This section has more examples for using the bootstrap script to register or migrate a host.

Warning

These examples specify the admin Satellite user. If this is not acceptable to your security policy, create a new role with the minimum permissions required by the bootstrap script. For more information, see Section 3.3.1, “Setting Permissions for the Bootstrap Script”.

Migrating a host from one Satellite 6 to another Satellite 6

Use the script with --force to remove the katello-ca-consumer-* packages from the old Satellite and install the katello-ca-consumer-* packages on the new Satellite.

  • On Red Hat Enterprise Linux 8, enter the following command:

    # /usr/libexec/platform-python bootstrap.py \
    --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --force
  • On Red Hat Enterprise Linux 5, 6, or 7, enter the following command:

    # bootstrap.py --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --force

Migrating a host from Red Hat Network (RHN) or Satellite 5 to Satellite 6

The bootstrap script detects the presence of /etc/syconfig/rhn/systemid and a valid connection to RHN as an indicator that the system is registered to a legacy platform. The script then calls rhn-classic-migrate-to-rhsm to migrate the system from RHN. By default, the script does not delete the system’s legacy profile due to auditing reasons. To remove the legacy profile, use --legacy-purge, and use --legacy-login to supply a user account that has appropriate permissions to remove a profile. Enter the user account password when prompted.

  • On Red Hat Enterprise Linux 8, enter the following command:

    # /usr/libexec/platform-python bootstrap.py \
    --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --legacy-purge \
    --legacy-login rhn-user
  • On Red Hat Enterprise Linux 5, 6, or 7, enter the following command:

    # bootstrap.py --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --legacy-purge \
    --legacy-login rhn-user

Registering a host to Satellite 6, omitting Puppet setup

By default, the bootstrap script configures the host for content management and configuration management. If you have an existing configuration management system and do not want to install Puppet on the host, use --skip-puppet.

  • On Red Hat Enterprise Linux 8, enter the following command:

    # /usr/libexec/platform-python bootstrap.py \
    --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --skip-puppet
  • On Red Hat Enterprise Linux 5, 6, or 7, enter the following command:

    # bootstrap.py --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --skip-puppet

Registering a host to Satellite 6 for content management only

To register a system as a content host, and omit the provisioning and configuration management functions, use --skip-foreman.

  • On Red Hat Enterprise Linux 8, enter the following command:

    # /usr/libexec/platform-python bootstrap.py \
    --server satellite6.example.com \
    --organization="Example Organization" \
    --activationkey=activation_key \
    --skip-foreman
  • On Red Hat Enterprise Linux 5, 6, or 7, enter the following command:

    # bootstrap.py --server satellite6.example.com \
    --organization="Example Organization" \
    --activationkey=activation_key \
    --skip-foreman

Changing the method the bootstrap script uses to download the consumer RPM

By default, the bootstrap script uses HTTP to download the consumer RPM (server.example.com/pub/katello-ca-consumer-latest.noarch.rpm). In some environments, you might want to allow HTTPS only between the host and Satellite. Use --download-method to change the download method from HTTP to HTTPS.

  • On Red Hat Enterprise Linux 8, enter the following command:

    # /usr/libexec/platform-python bootstrap.py \
    --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --download-method https
  • On Red Hat Enterprise Linux 5, 6, or 7, enter the following command:

    # bootstrap.py --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --download-method https

Providing the host’s IP address to Satellite

On hosts with multiple interfaces or multiple IP addresses on one interface, you might need to override the auto-detection of the IP address and provide a specific IP address to Satellite. Use --ip.

  • On Red Hat Enterprise Linux 8, enter the following command:

    # /usr/libexec/platform-python bootstrap.py \
    --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --ip 192.x.x.x
  • On Red Hat Enterprise Linux 5, 6, or 7, enter the following command:

    # bootstrap.py --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --ip 192.x.x.x

Enabling remote execution on the host

Use --rex and --rex-user to enable remote execution and add the required SSH keys for the specified user.

  • On Red Hat Enterprise Linux 8, enter the following command:

    # /usr/libexec/platform-python bootstrap.py \
    --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --rex \
    --rex-user root
  • On Red Hat Enterprise Linux 5, 6, or 7, enter the following command:

    # bootstrap.py --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --rex \
    --rex-user root

Creating a domain for a host during registration

To create a host record, the DNS domain of a host needs to exist in Satellite prior to running the script. If the domain does not exist, add it using --add-domain.

  • On Red Hat Enterprise Linux 8, enter the following command:

    # /usr/libexec/platform-python bootstrap.py \
    --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --add-domain
  • On Red Hat Enterprise Linux 5, 6, or 7, enter the following command:

    # bootstrap.py --login=admin \
    --server satellite6.example.com \
    --location="Example Location" \
    --organization="Example Organization" \
    --hostgroup="Example Host Group" \
    --activationkey=activation_key \
    --add-domain

Providing an alternative FQDN for the host

If the host’s host name is not an FQDN, or is not RFC-compliant (containing a character such as an underscore), the script will fail at the host name validation stage. If you cannot update the host to use an FQDN that is accepted by Satellite, you can use the bootstrap script to specify an alternative FQDN.

  1. Set create_new_host_when_facts_are_uploaded and create_new_host_when_report_is_uploaded to false using Hammer:

    # hammer settings set \
    --name  create_new_host_when_facts_are_uploaded \
    --value false
    # hammer settings set \
    --name  create_new_host_when_report_is_uploaded \
    --value false
  2. Use --fqdn to specify the FQDN that will be reported to Satellite:

    • On Red Hat Enterprise Linux 8, enter the following command:

      # /usr/libexec/platform-python bootstrap.py --login=admin \
      --server satellite6.example.com \
      --location="Example Location" \
      --organization="Example Organization" \
      --hostgroup="Example Host Group" \
      --activationkey=activation_key \
      --fqdn node100.example.com
    • On Red Hat Enterprise Linux 5, 6, or 7, enter the following command:

      # bootstrap.py --login=admin \
      --server satellite6.example.com \
      --location="Example Location" \
      --organization="Example Organization" \
      --hostgroup="Example Host Group" \
      --activationkey=activation_key \
      --fqdn node100.example.com

3.4. Installing the Katello Agent

To remotely update Satellite clients, you must install the Katello agent.

The katello-agent package depends on the gofer package that provides the goferd service. This service must be enabled so that Satellite Server or Capsule Server can provide information about errata that are applicable for content hosts.

Prerequisites

Before installing the Katello agent, ensure the following conditions are met:

  • You have enabled the Satellite Tools repository on Satellite Server. For more information, see Enabling the Satellite Tools Repository in Installing Satellite Server from a Connected Network.
  • You have synchronized the Satellite Tools repository on Satellite Server. For more information, see Synchronizing the Satellite Tools Repository in Installing Satellite Server from a Connected Network.
  • You have enabled the Satellite Tools repository on the client. For example, to ensure that the repository is enabled on the Red Hat Enterprise Linux 7 client, enter the following command on the client:

    # subscription-manager repos --enable rhel-7-server-satellite-tools-6.5-rpms

Procedure

To install the Katello agent, complete the following steps:

  1. Install the katello-agent package:

    # yum install katello-agent
  2. Start the goferd service :

    # systemctl start goferd

3.5. Installing Tracer

Use this procedure to install Tracer on Red Hat Satellite 6.5, and access Traces. Tracer displays a list of services and applications that are outdated and need to be restarted. Traces is the output generated by Tracer in the Satellite web UI.

Important

The integration of Tracer with Satellite Server is a Technology Preview feature. Technology Preview features are not fully supported under Red Hat Subscription Service Level Agreements (SLAs), may not be functionally complete, and are not intended for production use. These features provide early access to upcoming product innovations, enabling customers to test functionality and provide feedback during the development process. For more information see Red Hat Technology Preview Features Support Scope.

Prerequisites

  • The host must be registered to Red Hat Satellite.
  • The Red Hat Satellite Tools 6.5 repository must be enabled and synchronized on Satellite Server, and enabled on the host.

Procedure

  1. On the content host, install the katello-host-tools-tracer RPM package:

    # yum install katello-host-tools-tracer
  2. Enter the following command:

    # katello-tracer-upload
  3. In the Satellite web UI, navigate to Hosts > All hosts, then click the required host name.
  4. In the Properties tab, examine the Properties table and find the Traces item. If you cannot find a Traces item in the Properties table, then Tracer is not installed.
  5. Navigate to Hosts > Content Hosts, then click the required host name.
  6. Click the Traces tab to view Traces.

3.6. Installing and Configuring the Puppet Agent

Use this procedure to install and configure the Puppet agent on a host. For more information about Puppet, see the Puppet Guide.

Prerequisites

  • The host must be registered to Red Hat Satellite.
  • The host must have a Puppet environment assigned to it.
  • The Red Hat Satellite Tools 6.5 repository must be enabled and synchronized on Satellite Server, and enabled on the host.

Procedure

  1. Log in to the host as the root user.
  2. Install the Puppet agent package:

    # yum install puppet-agent
  3. Configure the Puppet agent to start on boot:

    • On Red Hat Enterprise Linux 6:

      # chkconfig puppet on
    • On Red Hat Enterprise Linux 7:

      # systemctl enable puppet
  4. Append the following server and environment settings to the /etc/puppetlabs/puppet/puppet.conf file. Set the environment parameter to the name of the Puppet environment to which the host belongs:

    environment = My_Example_Org_Library
    server = satellite.example.com
    ca_server = satellite.example.com
  5. Run the Puppet agent on the host:

    # puppet agent -t
  6. In the Satellite web UI, navigate to Infrastructure > Capsules.
  7. From the list in the Actions column for the required Capsule Server, select Certificates.
  8. Click Sign to the right of the required host to sign the SSL certificate for the Puppet client.
  9. Enter the puppet agent command again:

    # puppet agent -t