Chapter 7. Setting up HAProxy nodes

To provide load balancing capabilities across the CDS nodes, you must first set up the HAProxy nodes.

The following process explains how to:

7.1. Registering the HAProxy node

The following instructions explain how to register your HAProxy nodes.

Prerequisites

  • Latest version of RHEL 8 is installed.
  • Ensure you have root access to the HAProxy nodes.

Procedure

  1. On the HAProxy node, enter the following command:

    # subscription-manager register --username <admin-example> --password <secret>
    Registering to: subscription.rhsm.redhat.com:443/subscription
    The system has been registered with ID: <a1b2c3-d4e5-f6g7-2345-hij890klm123>
  2. Optional: If your system is already registered, you can override the subscription using the --force option.

    # subscription-manager register --force

    The new system will be available on the Red Hat Customer Portal, and the new HAProxy instance will not have any subscriptions attached to it.

Verification

  1. Navigate to the Red Hat Customer Portal.
  2. Verify that your system is available by locating it within the Customer Portal.

7.2. Attaching a subscription to the HAProxy node

The following instructions explain how to attach a subscription to your HAProxy node.

Note

You do not need to perform the following steps if you are using Simple Content Access.

Prerequisites

  • Ensure you have root access to the HAProxy node.

Procedure

  1. On the HAProxy node, check for available subscriptions that you can attach.

    # subscription-manager list --available
    +-------------------------------------------+
        Available Subscriptions
    +-------------------------------------------+
    ...
    Subscription Name: <Subscription-Name>
    Pool ID: <pool-ID>
    ...
  2. Attach a subscription using its pool ID.

    # subscription-manager attach --pool=<pool-ID>
    Successfully attached a subscription for: <Subscription-Name>

7.3. Enabling the required repositories on the HAProxy node

To install RHUI on your system, you must first enable certain repositories on your nodes which contain the required packages. The following instructions explain how to enable the rhel-8-for-x86_64-baseos-rhui-rpms and rhel-8-for-x86_64-appstream-rhui-rpms repositories on the HAProxy node.

Prerequisites

  • Ensure you have root access to the HAProxy node.

Procedure

  1. Navigate to a HAProxy node, list the enabled repositories, and verify that your system is correctly subscribed.

    # yum repolist enabled
    repo id                                  repo name
    codeready-builder-for-rhel-8-x86_64-rpms Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs)
    rhel-8-for-x86_64-appstream-rpms         Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
    rhel-8-for-x86_64-baseos-rpms            Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
  2. Disable all repositories.

    # subscription-manager repos --disable=*
  3. Enable the relevant repositories.

    # subscription-manager repos --enable rhel-8-for-x86_64-appstream-rpms --enable rhel-8-for-x86_64-baseos-rpms

Verification

  • List the enabled repositories and verify whether the relevant repositories appear on the list.

    # yum repolist enabled
    repo id                                repo name
    rhel-8-for-x86_64-appstream-rpms         Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
    rhel-8-for-x86_64-baseos-rpms            Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)