Chapter 3. Managing Subscriptions
Red Hat Satellite 6 imports content from Red Hat’s Content Delivery Network (CDN). Satellite Server must have a manifest that contains the subscription allocation for each organization in your Satellite. This enables Satellite to find, access, and download from the corresponding repositories. All subscription information is available in your Red Hat Customer Portal account.
Red Hat Satellite 6.3 adds the ability to use future-dated subscriptions in the allocation. This enables uninterrupted access to repositories when future-dated subscriptions are added to content hosts before the expiry date of existing subscriptions. Red Hat recommends that you manually attach the future-dated subscriptions to your content hosts before the current subscriptions expire and not rely on the auto-attach method. See Section 3.7, “Attaching Subscriptions to a Content Host” for more information.
For this chapter, we examine how to create a subscription allocation containing a subset of your subscriptions.
3.1. Managing Multiple Organizations Using Multiple Allocations
You can have more than one allocation in a Satellite Server if you want to manage more than one organization. Satellite 6 requires a single allocation for each organization configured in Satellite. The advantage of this is that since each organization maintains completely separate subscriptions, you can support multiple organizations each with their own Red Hat accounts.
3.2. Creating a Subscription Allocation in Customer Portal
You can access your subscription information on the Red Hat Customer Portal. You can also assign subscriptions for use in on-premise management applications, such as Red Hat Satellite, using subscription allocations.
- Open https://access.redhat.com/ in your browser and log in to your Red Hat account.
- Navigate to Subscriptions in the upper-left corner of the Customer Portal.
- Navigate to Subscription Allocations.
- Click Create New subscription allocation.
- In the Name field, enter a name.
- From the Type list, select the type and version that corresponds to your Satellite Server.
- Click Create.
3.3. Adding Subscriptions to an Allocation
The following procedure explains how to add subscriptions to an allocation.
- Navigate to Subscription Allocations.
- Select the name of the subscription you want to change.
- Click the Subscriptions tab.
- Click Add Subscriptions.
- A list of your Red Hat product subscriptions appears. Enter the Entitlement Quantity for each product.
- Click Submit to complete the assignment.
When you have added subscriptions to the allocation, export the manifest file.
3.4. Exporting a Subscription Manifest from the Customer Portal
While viewing a subscription allocation that has at least one subscription, you can export a manifest in either of two places:
- From the Details tab, under the Subscription section, by clicking the Export Manifest button.
- From the Subscriptions tab, by clicking the Export Manifest button.
When the manifest is exported, the Customer Portal encodes the selected subscription certificates and creates a .zip archive. This is the Subscription Manifest, which can be uploaded into the Satellite Server.
3.5. Importing a Subscription Manifest into Satellite Server
Both the Red Hat Satellite 6 Web UI and CLI provide methods for importing the manifest.
For Web UI Users
- Ensure the context is set to the organization you want to use.
- Navigate to Content > Red Hat Subscriptions.
- Click Manage Manifest to display the manifest page for the organization.
- Click Choose file, select our Subscription Manifest, then click Upload.
For CLI Users
The Red Hat Satellite 6 CLI requires the manifest to be on Satellite Server. On your local client system, copy the manifest to Satellite Server:
[user@client ~]$ scp ~/manifest_file.zip root@satellite.example.com:~/.
Then enter the following command to import it:
[root@satellite ~]# hammer subscription upload \ --file ~/manifest_file.zip \ --organization "organization_name"
After a few minutes, the CLI reports a successful manifest import.
3.6. Updating and Refreshing a Manifest
Manifests must not be deleted. If you delete the manifest from the Red Hat Customer Portal or in the Satellite Web UI it unentitles all of your content hosts.
Every time that you change a subscription allocation, you must refresh the manifest to reflect these changes. For example, you must refresh the manifest if you take any of the following actions:
- Renew a subscription
- Adjust subscription quantities
- Purchase additional subscriptions
You can updated the manifest in Satellite in one of the three following ways:
- By using the refresh button in the Satellite web UI as follows: In the web UI, navigate to Content > Red Hat Subscriptions > Manage Manifests and select the Refresh Manifest button.
- By downloading it from the Customer Portal and uploading it in the Satellite web UI as follows: In the web UI, navigate to Content > Red Hat Subscriptions > Manage Manifests and click Choose file. Select the Subscription Manifest, and then click Upload.
- By downloading it from the Customer Portal and uploading it to Satellite Server using the CLI as follows:
[root@satellite ~]# hammer subscription upload \ --file ~/manifest_file.zip \ --organization "organization_name"
3.7. Attaching Subscriptions to a Content Host
Using Activation Keys is the recommended way to attach subscriptions to content hosts during provisioning. However, an Activation key cannot update an existing host. If you need to attach new or additional subscriptions, such as future-dated subscriptions, to one host, follow the method below. If you need to update multiple hosts, see Section 3.8, “Bulk Updating Content Hosts' Subscriptions”. For more information on Activation keys, see Chapter 8, Managing Activation Keys.
Smart Management Subscriptions
In Satellite 6, the number of Red Hat Enterprise Linux Smart Management subscriptions correspond with how many systems Satellite can manage. You must maintain a Smart Management subscription for every Red Hat Enterprise Linux subscription that you want to manage with Satellite.
However, you are not required to attach Smart Management subscriptions to each content host. Smart Management subscriptions cannot attach automatically to content hosts in Satellite because they are not associated with any product certificates. Adding a Smart Management subscription to a content host does not provide any content or repository access. If you want, you can add a smart management subscription to a manifest for your own recording or tracking purposes.
For Web UI Users
- Navigate to Hosts > Content Hosts.
- Select the check box to the left of the host whose subscription you want to change.
- From the Select Action list, select Manage Subscriptions.
- Optionally, enter a key and value in the Search field to filter the subscriptions displayed.
- Select the check box to the left of the subscriptions to be added or removed and click Add Selected or Remove Selected as required.
- Click Done to save the changes.
For CLI Users
List the available subscriptions:
# hammer subscription list --organization-id 1
Attach a subscription to the host:
# hammer host subscription attach --host host_name --subscription-id subscription_id
3.8. Bulk Updating Content Hosts' Subscriptions
The methods described here are intended for post installation changes to multiple content hosts at the same time. You can use the web UI and the filter function to select the content hosts to be changed, or use the Hammer command-line tool’s CSV file export function, edit the configuration settings in the CSV file, and upload the changes.
For Web UI Users
- Navigate to Hosts > Content Hosts.
- Select the check box to the left of the hosts whose subscriptions you want to change.
- From the Select Action list, select Manage Subscriptions.
- Optionally, enter a key and value in the Search field to filter the subscriptions displayed.
- Select the check box to the left of the subscriptions to be added or removed and click Add Selected or Remove Selected as required.
- Click Done to save the changes.
For CLI Users
Export the current state of content hosts to a CSV file.
# hammer --server https://satellite.example.com csv content-hosts --export --file content_hosts.csv
Change the required values in the CSV file. You can use an editor, with a CSV plug-in, or
sed
to change strings in the CSV file.Make a backup of the file:
# cp content_hosts.csv content_hosts.csv.backup
Edit the string you want to change. For example:
# sed -i "s/1|RH1234|Red Hat Enterprise Linux Server/1|RH5678|Red Hat Enterprise Linux Server/g" content_hosts.csv
Confirm only the required changes were made. For example:
# diff content_hosts.csv content_hosts.csv.backup
Upload the changed file to Satellite Server:
# hammer --server https://satellite.example.com csv content-hosts --file content_hosts.csv
3.9. Chapter Summary
This chapter showed how to use a Subscription Allocation and Manifest to take subscription information from the Red Hat Customer Portal and import it into our Satellite Server.
The next chapter looks at how to start importing content, specifically Red Hat’s RPM repositories.