Registering Red Hat Enterprise Linux Clients with CDN

This section contains information about using the Red Hat content delivery network (CDN) to register clients running Red Hat Enterprise Linux operating systems.

For information about using Red Hat update infrastructure (RHUI) instead, see Registering Red Hat Enterprise Linux clients with RHUI.

You are responsible for arranging access to Red Hat base media repositories and RHEL installation media, as well as connecting Uyuni Server to the Red Hat content delivery network. You must obtain support from Red Hat for all your RHEL systems. If you do not do this, you might be violating your terms with Red Hat.

1. Import Entitlements and Certificates

Red Hat clients require a Red Hat certificate authority (CA) and entitlement certificate, and an entitlement key.

Entitlement certificates are embedded with expiration dates, which match the length of the support subscription. To avoid disruption, you need to repeat this process at the end of every support subscription period.

Red Hat supplies a subscription manager tool to manage subscription assignments. It runs locally to track installed products and subscriptions. Clients must be registered with the subscription manager to obtain certificates.

Red Hat clients use a URL to replicate repositories. The URL changes depending on where the Red Hat client is registered.

Red Hat clients can be registered in three different ways:

  • Red Hat content delivery network (CDN) at redhat.com

  • Red Hat Satellite Server

  • Red Hat update infrastructure (RHUI) in the cloud

This guide covers clients registered to Red Hat CDN. You must have at least one system registered to the CDN, with an authorized subscription for repository content.

For information about using Red Hat update infrastructure (RHUI) instead, see Registering Red Hat Enterprise Linux clients with RHUI.

Satellite certificates for client systems require a Satellite server and subscription. Clients using Satellite certificates are not supported with Uyuni Server.

Entitlement certificates are embedded with expiration dates, which match the length of the support subscription. To avoid disruption, you need to repeat this process at the end of every support subscription period.

Red Hat supplies the subscription-manager tool to manage subscription assignments. It runs locally on the client system to track installed products and subscriptions. Register to redhat.com with subscription-manager, then follow this procedure to obtain certificates.

Procedure: Registering Clients to Subscription Manager
  1. On the client system, at the command prompt, register with the subscription manager tool:

    subscription-manager register

    Enter your Red Hat Portal username and password when prompted.

  2. Run command:

    subscription-manager activate
  3. Copy your entitlement certificate and key from the client system, to a location that the Uyuni Server can access:

    cp /etc/pki/entitlement/ /<example>/entitlement/

    Your entitlement certificate and key both have a file extension of .pem. The key also has key in the filename.

  4. Copy the Red Hat CA Certificate file from the client system, to the same web location as the entitlement certificate and key:

    cp /etc/rhsm/ca/redhat-uep.pem /<example>/entitlement

To manage repositories on your Red Hat client, you need to import the CA and entitlement certificates to the Uyuni Server. This requires that you perform the import procedure three times, to create three entries: one each for the entitlement certificate, the entitlement key, and the Red Hat certificate.

Procedure: Importing Certificates to the Server
  1. On the Uyuni Server Web UI, navigate to Systems  Autoinstallation  GPG and SSL Keys.

  2. Click Create Stored Key/Cert and set these parameters for the entitlement certificate:

    • In the Description field, type Entitlement-Cert-date.

    • In the Type field, select SSL.

    • In the Select file to upload field, browse to the location where you saved the entitlement certificate, and select the .pem certificate file.

  3. Click Create Key.

  4. Click Create Stored Key/Cert and set these parameters for the entitlement key:

    • In the Description field, type Entitlement-key-date.

    • In the Type field, select SSL.

    • In the Select file to upload field, browse to the location where you saved the entitlement key, and select the .pem key file.

  5. Click Create Key.

  6. Click Create Stored Key/Cert and set these parameters for the Red Hat certificate:

    • In the Description field, type redhat-uep.

    • In the Type field, select SSL.

    • In the Select file to upload field, browse to the location where you saved the Red Hat certificate, and select the certificate file.

  7. Click Create Key.

2. Add Software Channels

Before you register Red Hat clients to your Uyuni Server, you need to add the required software channels, and synchronize them.

In the following section, descriptions often default to the x86_64 architecture. Replace it with other architectures if appropriate.

The channels you need for this procedure are:

Table 1. Red Hat Channels - CLI
OS Version Base Channel Client Channel Tools Channel

Red Hat 9

rhel9-pool-uyuni

-

rhel9-uyuni-client

Red Hat 8

rhel8-pool-uyuni

-

rhel8-uyuni-client

Red Hat 7

rhel7-pool-uyuni

-

rhel7-uyuni-client

Procedure: Adding Software Channels at the Command Prompt
  1. At the command prompt on the Uyuni Server, as root, use the spacewalk-common-channels command to add the appropriate channels. Ensure you specify the correct architecture:

    spacewalk-common-channels \
    -a <architecture> \
    <base_channel_name> \
    <child_channel_name_1> \
    <child_channel_name_2> \
    ... <child_channel_name_n>
  2. If automatic synchronization is turned off, synchronize the channels:

    spacewalk-repo-sync -p <base_channel_label>-<architecture>
  3. Ensure the synchronization is complete before continuing.

The client tools channel provided by spacewalk-common-channels is sourced from Uyuni and not from SUSE.

3. Prepare Custom Repositories and Channels

To mirror the software from the Red Hat CDN, you need to create custom channels and repositories in Uyuni that are linked to the CDN by a URL. You must have entitlements to these products in your Red Hat Portal for this to work correctly. You can use the subscription manager tool to get the URLs of the repositories you want to mirror:

subscription-manager repos

You can use these repository URLs to create custom repositories. This allows you to mirror only the content you need to manage your clients.

You can only create custom versions of Red Hat repositories if you have the correct entitlements in your Red Hat Portal.

The details you need for this procedure are:

Table 2. Red Hat Custom Repository Settings
Option Setting

Repository URL

The content URL provided by Red Hat CDN

Has Signed Metadata?

Uncheck all Red Hat Enterprise repositories

SSL CA Certificate

redhat-uep

SSL Client Certificate

Entitlement-Cert-date

SSL Client Key

Entitlement-Key-date

Procedure: Creating Custom Repositories
  1. On the Uyuni Server Web UI, navigate to Software  Manage  Repositories.

  2. Click Create Repository and set the appropriate parameters for the repository.

  3. Click Create Repository.

  4. Repeat for all repositories you need to create.

The channels you need for this procedure are:

Table 3. Red Hat Custom Channels
OS Version Base Channel

Red Hat 9

rhel9-pool-uyuni

Red Hat 8

rhel8-pool-uyuni

Red Hat 7

rhel7-pool-uyuni

Procedure: Creating Custom Channels
  1. On the Uyuni Server Web UI, navigate to Software  Manage  Channels.

  2. Click Create Channel and set the appropriate parameters for the channels.

  3. In the Parent Channel field, select the appropriate base channel.

  4. Click Create Channel.

  5. Repeat for all channels you need to create. There should be one custom channel for each custom repository.

You can check that you have created all the appropriate channels and repositories, by navigating to Software  Channel List  All.

For Red Hat 9 and Red Hat 8 clients, add both the Base and AppStream channels. You require packages from both channels. If you do not add both channels, you cannot create the bootstrap repository, due to missing packages.

If you are using modular channels, you must enable the Python 3.6 module stream on the client. If you do not provide Python 3.6, the installation of the spacecmd package will fail.

When you have created all the channels, you can associate them with the repositories you created:

Procedure: Associating Channels with Repositories
  1. On the Uyuni Server Web UI, navigate to Software  Manage  Channels, and click the channel to associate.

  2. Navigate to the Repositories tab, and check the repository to associate with this channel.

  3. Click Update Repositories to associate the channel and the repository.

  4. Repeat for all channels and repositories you need to associate.

  5. OPTIONAL: Navigate to the Sync tab to set a recurring schedule for synchronization of this repository.

  6. Click Sync Now to begin synchronization immediately.

4. Check Synchronization Status

Procedure: Checking Synchronization Progress from the Web UI
  1. In the Uyuni Web UI, navigate to Software  Manage  Channels, then click the channel associated to the repository.

  2. Navigate to the Repositories tab, then click Sync and check Sync Status.

Procedure: Checking Synchronization Progress from the Command Prompt
  1. At the command prompt on the Uyuni Server, as root, use the tail command to check the synchronization log file:

    tail -f /var/log/rhn/reposync/<channel-label>.log
  2. Each child channel generates its own log during the synchronization progress. You need to check all the base and child channel log files to be sure that the synchronization is complete.

Red Hat Enterprise Linux channels can be very large. Synchronization can sometimes take several hours.

Procedure: OPTIONAL: Creating a Salt State to Deploy Configuration Files
  1. On the Uyuni Server Web UI, navigate to Configuration  Channels.

  2. Click Create State Channel.

    • In the Name field, type subscription-manager: disable yum plugins.

    • In the Label field, type subscription-manager-disable-yum-plugins.

    • In the Description field, type subscription-manager: disable yum plugins.

    • In the SLS Contents field, leave it empty.

  3. Click Create Config Channel

  4. Click Create Configuration File

    • In the Filename/Path field type /etc/yum/pluginconf.d/subscription-manager.conf.

    • In the File Contents field type:

      [main]
      enabled=0
  5. Click Create Configuration File

  6. Take note of the value of the field Salt Filesystem Path`.

  7. Click on the name of the Configuration Channel.

  8. Click on View/Edit 'init.sls' File

    • In the File Contents field, type:

      configure_subscription-manager-disable-yum-plugins:
        cmd.run:
          - name: subscription-manager config --rhsm.auto_enable_yum_plugins=0
          - watch:
            - file: /etc/yum/pluginconf.d/subscription-manager.conf
        file.managed:
          - name: /etc/yum/pluginconf.d/subscription-manager.conf
          - source: salt:///etc/yum/pluginconf.d/subscription-manager.conf
  9. Click Update Configuration File.

The Creating a Salt State to Deploy Configuration Files procedure is optional.

Procedure: Creating a System Group for Red Hat Enterprise Linux Clients
  1. On the Uyuni Server Web UI, navigate to Systems  System Groups.

  2. Click Create Group.

    • In the Name field, type rhel-systems.

    • In the Description field, type All RHEL systems.

  3. Click Create Group.

  4. Click States tab.

  5. Click Configuration Channels tab.

  6. Type subscription-manager: disable yum plugins at the search box.

  7. Click Search to see the state.

  8. Click the checkbox for the state at the Assign column.

  9. Click Save changes.

  10. Click Confirm.

If you already have RHEL systems added to Uyuni, assign them to the new system group, and then apply the highstate.

Procedure: Adding the System Group to Activation Keys

You need to modify the activation keys you used for RHEL systems to include the system group created above.

  1. On the Uyuni Server Web UI, navigate to Systems  Activation Keys.

  2. For each the Activation Keys you used for RHEL systems, click on it and:

  3. Navigate to the Groups tab, and the Join subtab.

  4. Check Select rhel-systems.

  5. Click Join Selected Groups.

5. Manage GPG Keys

Clients use GPG keys to check the authenticity of software packages before they are installed. Only trusted software can be installed on clients.

Trusting a GPG key is important for security on clients. It is the task of the administrator to decide which keys are needed and can be trusted. Because a software channel cannot be used when the GPG key is not trusted, the decision of assigning a channel to a client depends on the decision of trusting the key.

For more information about GPG keys, see GPG Keys.

For the Red Hat custom channels, if you want to check the Enable GPG Check field, you need to populate the GPG Key URL field. You can use the file URL of the GPG key stored in the directory /etc/pki/rpm-gpg of the Red Hat minion.

For the complete list of the Red Hat product signing keys, see https://access.redhat.com/security/team/key.

6. Register Clients

To register your clients, you need a bootstrap repository. By default, bootstrap repositories are automatically created, and regenerated daily for all synchronized products. You can manually create the bootstrap repository from the command prompt, using this command:

mgr-create-bootstrap-repo

For more information on registering your clients, see Client Registration.