Bookmark this page

Lab: Register Hosts

Create a host collection and an activation key, and use these resources to register hosts.

Outcomes

  • Create a host collection.

  • Create an activation key and set host attributes in it.

  • Clean repository and subscription data from a system.

  • Register a content host with an activation key.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

This command prepares your environment and ensures that all required resources are available.

[student@workstation ~]$ lab start clients-review

Instructions

  1. Create the FinanceServers host collection, which can contain unlimited hosts, with Finance Servers as the description.

    1. Log in to the Satellite Server web UI, https://satellite.lab.example.com, as admin with redhat as the password.

    2. In the upper-left corner of the web page, set the organization to Finance. Set the location to Any Location.

    3. Click HostsHost Collections, and then click Create Host Collection. Enter FinanceServers in the Name field and Finance Servers in the Description field. Select Unlimited Hosts, and then click Save.

  2. Create the FinanceServers activation key to register unlimited hosts to the Build lifecycle environment and the FinanceServerBase content view.

    1. Click ContentActivation Keys, and then click Create Activation Key. Enter FinanceServers in the Name field. Select Unlimited Hosts. Select the Build environment. Select FinanceServerBase from the Content View list, and then click Save.

  3. Configure the FinanceServers activation key for release version 9, and to assign FinanceServers host collection membership during host registration.

    1. In the Activation Key Content section, select 9 from the Release Version list, and then click Save.

    2. Click the Host Collections tab, and then click the Add tab. Select the checkbox for FinanceServers, and then click Add Selected.

  4. Prepare the serverb system for registration to Satellite Server with the FinanceServers activation key. Clean any previous subscription data, install the CA certificate, and then register the host.

    1. From workstation, log in to the serverb system as the student user, and switch to the root user.

      [student@workstation ~]$ ssh student@serverb
      [student@serverb ~]$ sudo -i
      [sudo] password for student: student
      [root@serverb ~]#
    2. Although the serverb system was not previously registered, cleaning the repository and subscription data verifies that the system is ready for registration.

      [root@serverb ~]# dnf clean all
      Updating Subscription Management repositories.
      Unable to read consumer identity
      
      This system is not registered with an entitlement server. You can use subscription-manager to register.
      
      0 files removed
      [root@serverb ~]# rm -rf /var/cache/dnf/
      [root@serverb ~]# subscription-manager remove --all
      0 subscriptions removed at the server.
      [root@serverb ~]# subscription-manager unregister
      This system is currently not registered.
      [root@serverb ~]# subscription-manager clean
      All local data removed
    3. Install the Katello CA certificate from Satellite Server.

      [root@serverb ~]# dnf localinstall \
      http://satellite.lab.example.com/pub/katello-ca-consumer-latest.noarch.rpm
      ...output omitted...
    4. Register the serverb system to the Finance organization by using the FinanceServers activation key.

      [root@serverb ~]# subscription-manager register --org 'Finance' \
      --activationkey 'FinanceServers'
      The system has been registered with ID: 8fa907ce-7e50-4ee0-8070-b19847e3a5a2
      The registered system name is: serverb.lab.example.com
    5. Return to the workstation system as the student user.

      [root@serverb ~]# exit
      logout
      [student@serverb ~]$ exit
      logout
      Connection to serverb closed.

Evaluation

As the student user on the workstation machine, use the lab command to grade your work. Correct any reported failures and rerun the command until successful.

[student@workstation ~]$ lab grade clients-review

Finish

On the workstation machine, change to the student user home directory and use the lab command to complete this exercise. This step is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish clients-review

Revision: rh403-6.11-3ad886e