The software described in this documentation is either no longer supported or is in extended support.
Oracle recommends that you upgrade to a current supported release.

Chapter 3 Working With Activation Keys in Spacewalk

This chapter describes how to create and manage activation keys in Spacewalk.

3.1 About Spacewalk Activation Keys

An activation key enables a client system to register with Spacewalk without having to provide a user name and password. After you have configured and synchronized a base software channel and any child channels, create an activation key so that client systems can register with Spacewalk.

Note

If you use the spacewalk-common-channels command with the -k option to set up Oracle Linux software channels and repositories, the command also creates an activation key and associates this key with the software channels.

If required, you can also use an activation key to define the default parent and child software channel subscriptions and any configuration channels. Spacewalk subscribes a client to these channels during registration. However, you can change the channels at any later time without changing the activation key.

Note

Take care not to oversubscribe client systems to channels. Oracle recommends that you configure activation keys to subscribe a client to a minimal number of channels.

If required, you can create an activation key for each combination of base channel, system architecture, and server type. For example, you could create separate activation keys for web, mail, or application servers running on Oracle Linux 6 (i386), Oracle Linux 6 (x86_64), and Oracle Linux 7 (x86_64). Alternatively, you can create a single, default activation key without any channel assignments and then use it for all server types.

Oracle recommends that you enter a meaningful label for the activation key in the Key field and that you do not use automatic key generation.

Create a key with a label that is easy to understand, for example, based on the version number and architecture (oraclelinux6-x86_64), or based on the server type (webserver or appserver).

Spacewalk automatically prefixes the organization ID to the activation key label. For example, if you select oraclelinux-x86_64 as the label, Spacewalk creates a key named 1-oraclelinux-x86_64, where the prefix identifies the organization. You can create multiple activation keys for the same base channel, each with different configuration options. The name that you use is presented during Spacewalk client registration. Creating your own key labels helps you to select the correct key.

3.2 Working with Activation Keys by Using the Spacewalk Web Interface

Figure 3.1 Activation Keys Page

Go to Systems and select Activation Keys:

  • To create an activation key:

    1. Click + create new key.

    2. On the Create Activation Key page, enter the key settings in the following fields:

      Description

      Enter a description for the key, for example, Oracle Linux 6 (x86_64).

      Key

      Enter a meaningful label for the activation key, for example, oraclelinux6-x86_64.

      Usage

      Leave this field blank to allow unlimited use by clients.

      Base Channels

      Select the base channel with which the key is associated. For example, Oracle Linux 6 (x86_64) Base.

      Add-on Entitlements

      If you are running the KVM hypervisor on Oracle Linux 6 or Oracle Linux 7, you should enable the Virtualization entitlement. This entitlement installs additional packages on the target host so that Spacewalk is able to identify and manage virtual guests on that host.

      Note

      In Spacewalk 2.6, most entitlements are removed, with the exception of the Virtualization entitlement.

      Universal Default

      Select if the key should be used as the default activation key for all newly-registered systems.

      Note

      Oracle strongly recommends that you do not associate any channels with a universal default key. Spacewalk uses the universal default key if a key is not specified so it might be used by any version of any operating system.

    3. Click Create Activation Key to create the activation key.

  • To view an activation key, select its entry to display its details.

  • To modify an activation key:

    1. Select the activation key whose settings you want to edit.

    2. On the Activation Key Details page, modify the key settings.

    3. Click Update Activation Key to save your changes.

  • To delete an activation key:

    1. Select the activation key that you want to delete.

    2. On the Activation Key Details page, click delete key and then click Delete Activation Key to confirm.

3.3 Working with Activation Keys by Using the spacecmd Command

To create an activation key, use the activationkey_create command as follows:

spacecmd {SSM:0}> activationkey_create 
Name (blank to autogenerate): oraclelinux6-x86_64
Description [None]: Oracle Linux 6 (x86_64)

Base Channels
-------------
oraclelinux6-x86_64
oraclelinux7-x86_64

Base Channel (blank for default): oraclelinux6-x86_64

virtualization_host Entitlement [y/N]: N

Universal Default [y/N]: N
INFO: Created activation key 1-oraclelinux6-x86_64

To list all activation keys, use the activationkey_list command:

spacecmd {SSM:0}> activationkey_list
1-oraclelinux6-x86_64
1-oraclelinux7-x86_64

To display the details of an activation key, use the activationkey_details command:

spacecmd {SSM:0}> activationkey_details 1-oraclelinux7-x86_64
Key:                    1-oraclelinux7-x86_64
Description:            Oracle Linux 7 x86_64
Universal Default:      False
Usage Limit:            0
Deploy Config Channels: False

Software Channels
-----------------
oraclelinux7-x86_64
 |-- oraclelinux7-x86_64-addons
 |-- oraclelinux7-x86_64-mysql55
 |-- oraclelinux7-x86_64-mysql56
 |-- oraclelinux7-x86_64-optional
 |-- oraclelinux7-x86_64-spacewalk24-client
 |-- oraclelinux7-x86_64-uek-r4

Configuration Channels
----------------------

Entitlements
------------

System Groups
-------------

Packages
--------

To delete an activation key, use the activationkey_delete command:

spacecmd {SSM:0}> activationkey_delete 1-oraclelinux7-x86_64
1-oraclelinux7-x86_64

Delete activation key(s) [y/N]: y