Chapter 8. Managing Activation Keys


At this point, we have published some content views, which resulted in the Satellite Server publishing repositories. Systems now can register to the Satellite Server and consume content from these repositories. Systems register in a similar way to how they register to the Red Hat Customer Portal. For example, users can use Red Hat Subscription Manager (subscription-manager) with the --baseurl pointing to the Satellite Server instead of the Red Hat Content Delivery Network.

There are two methods to register a system. The first is to authenticate with a Satellite Server user name and password, which we explored in the previous chapter. An alternative and preferred method is to use an activation key, which acts as an authentication token. Activation keys provide a method for easy system registration and subscription attachment. Users can create multiple keys and associate them with different environments and content views. For example, you might create a basic activation key with a subscription for Red Hat Enterprise Linux workstations and associate it with content views from a particular environment.

For more information about activation keys and more use case examples outside of this guide, see "Activation Key Enhancements with Red Hat Satellite 6.1" on the Red Hat Customer Portal.

8.1. Creating an Activation Key

For Web UI Users

Navigate to Content > Activation keys and click Create Activation Key. Provide the activation key with the following information:

  • Name - The name of the activation key. We use this name during the system registration process. Enter development-stack.
  • Content Host Limit - Defines how many systems the Satellite Server allows to register for this activation key. Select Unlimited Content Hosts.
  • Description - A plain text description for the activation key. Enter Exampleware Stack in the Development Environment
  • Environment - The environment to use. Select Development.
  • Content View - The Content View (and, by extension, the repository) in the environment to use. Select Stack.

Click Save. The activation key details screen displays.

Now we must define which products to attach and repositories to enable upon registration. Navigate to the Subscriptions tab. An empty product/subscription listing appears. Click Add, select both the Red Hat Enterprise Linux subscription and the PostgreSQL product, and click Add Selected.

Note

The Auto-Attach option is enabled. This automatically attaches these products to the system upon registration and enables the required repositories. If Auto-Attach is disabled for the activation key, the system only registers to the Satellite Server without attaching any subscriptions or content.

Navigate to the Product Content page. This displays all the repositories associated with the activation key’s products. As default, the Satellite Server only enables:

  • The repository that best matches the system requirements. In this case, it is only the Red Hat Enterprise Linux 7 Server RPMs.
  • Any custom content.

Our scenario should have the following defaults set:

PostgreSQL:

  • PostgreSQL 9.5 - Enabled: Yes (Default)
  • PostgreSQL Puppet Modules - Enabled: Yes (Default)

Red Hat Enterprise Linux Server:

  • Red Hat Enterprise Linux 7 Server (Kickstart) - Enabled: No (Default)
  • Red Hat Satellite Tools 6.2 (for RHEL 7 Server) (RPMs) - Enabled: No (Default)
  • Red Hat Enterprise Linux 7 Server (RPMs) - Enabled: Yes (Default)

However, we want to enable the Red Hat Satellite Tools repository because that contains our configuration tools (such as katello-agent and puppet). Change it to the following:

  • Red Hat Satellite Tools 6.2 (for RHEL 7 Server) (RPMs) - Enabled: Override to Yes

Click Save

Now we have an activation key ready for system registration.

For CLI Users

Create the activation key:

# hammer activation-key create \
--name "development-stack" \
--unlimited-content-hosts true \
--description "Exampleware Stack in the Development Environment" \
--lifecycle-environment "Development" \
--content-view "Stack"  \
--organization "ACME"

Obtain a list of your subscription IDs:

# hammer subscription list --organization "ACME"

Attach the Red Hat Enterprise Linux subscription UUID to the activation key:

# hammer activation-key add-subscription \
--name "development-stack" \
--subscription-id ff808181533518d50152354246e901aa \
--organization "ACME"

Attach the PostgreSQL product to the activation key:

#hammer activation-key add-subscription \
--name "development-stack" \
--subscription-id ff8081815239acdc015238fefaa10002 \
--organization "ACME"

List the product content associated with the activation key:

# hammer activation-key product-content \
--name "development-stack" \
--organization "ACME"

Override the default auto-enable status for the Red Hat Satellite Tools 6.2 repository. The default status is set to disabled. This command enables it:

# hammer activation-key content-override \
--name "stack-development" \
--content-label rhel-7-server-satellite-tools-6.1-rpms \
--value 1 \
--organization "ACME"

8.2. Using Activation Keys

The activation keys are used for registration. This includes:

  • Registering new systems during provisioning through Red Hat Satellite 6. The kickstart provisioning templates in Red Hat Satellite 6 contain commands to register the system using an activation key defined when creating a new host.
  • Registering existing Red Hat Enterprise Linux systems. Configure Red Hat Subscription Manager to use the Satellite Server for registration and specify the activation key when running the subscription-manager register command.

You can test the activation key we created. Register an existing Red Hat Enterprise Linux 7 system to the Satellite.

First, download the consumer RPM for your Satellite Server. This is usually located in the pub directory on the host’s web server. For example, for a Satellite Server with the host name satellite6.example.com, run the following command on the client to register:

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

This RPM installs the necessary certificates for accessing repositories on the Satellite Server and configures Red Hat Subscription Manager to use the server’s URL.

Next, run Red Hat Subscription Manager on the client:

# subscription-manager register --activationkey="stack-development" --org="acme"
The system has been registered with id: 744fb31c-c983-00f5-ca14-bddd0f711353

Check the Satellite Server to confirm the registration.

For Web UI Users

Navigate to Hosts > Content Hosts and the system appears in the list.

For CLI Users

Run the following command:

# hammer content-host list --organization "ACME"
Important

After registering a client system to the Satellite Server, install the katello-agent package on the system so that it can report back to the Satellite Server:

# yum install katello-agent

The Red Hat Satellite 6 Tools repository provides this package.

8.3. Chapter Summary

This chapter discussed activation keys, demonstrated how to create them, and how systems register to a Satellite Server with them.

The next chapter explores errata management, including how to apply errata to a system.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.