Chapter 3. Managing subscription usage

A system can be registered in three main ways:

  • On the local system
  • Through the Customer Portal, registered as an offline system
  • To an on-premise service such as Red Hat Satellite

3.1. Viewing available and used subscriptions in Red Hat Subscription Manager

To manage subscriptions, administrators need to know both what subscriptions are currently attached to a system and what subscriptions are available to the system. You can manage your usage from the Customer Portal from the Subscription Utilization page.

To manage subscriptions from the command line:

Table 3.1. Table 3.1 subscription-manager list Options

Command

Description

--installed (or nothing)

Lists all of the installed products on the system. If no option is given with 'list', it is the same as using the '--installed' argument.

--consumed

Lists all of the subscriptions attached to the system.

--available[-all]

Using '--available' alone lists all of the compatible, active subscriptions for the system. Using '--available --all' lists all options, even ones not compatible with the system.

sect-Red_Hat_Subscription_Management-Using_Red_Hat_Subscription_Management-Registering_and_Attaching_Subscriptions_Section_ --ondate=YYYY-MM-DD

Shows subscriptions which are active and available on the specified date. This is only used with the '--available' option. If this is not used, then the command uses the current date.

--installed

Lists all of the products that are installed on the system (and whether they have a subscription) and it lists all of the product subscriptions which are attached to the system (and whether those products are installed).

Example 3.1 'list' showing subscriptions consumed

[root@server1 ~]# subscription-manager list --consumed

+-------------------------------------------+
		Consumed Product Subscriptions
+-------------------------------------------+


ProductName:        	Red Hat Enterprise Linux Server
ContractNumber:     	1458961
SerialNumber:       	171286550006020205
Active:             	True
Begins:             	2009-01-01
Expires:            	2011-12-31

Example 3.2 'list' showing all available subscriptions

[root@server1 ~]# subscription-manager list --available --all

+-------------------------------------------+
		Available Subscriptions
+-------------------------------------------+


ProductName:            RHEL for Physical Servers
ProductId:              MKT-rhel-server
PoolId:                 ff8080812bc382e3012bc3845ca000cb
Quantity:               10
Expires:                2011-09-20


ProductName:            RHEL Workstation
ProductId:              MKT-rhel-workstation-mkt
PoolId:                 5e09a31f95885cc4
Quantity:               10
Expires:                2011-09-20

3.2. Stopping package list collection

The registration process automatically begins creating and maintaining a package list for the given subscription service. Since package lists are a core aspect of subscription maintenance, this data collection cannot be suspended. If it is necessary to prevent data collection on the system, then remove the system from the subscription management service.

  • Unregister the system.
  • Unregister the system and delete the entry from the Customer Portal.
  • Since package lists for systems registered in the portal are also stored in the portal subscription database, the entire system entry must be deleted for the information to be removed.
  • Unregister the system from the on-premise subscription service.

3.3. Using system purpose

New to Red Hat Enterprise Linux, system administrators can use System Purpose to record the intended use of a Red Hat Enterprise Linux 8.0 Beta system by the organization. When a system’s purpose is recorded, entitlements are automatically attached.

You can enter System Purpose data in the following ways:

  • During Composer image creation
  • During Installation using the Anaconda GUI and Kickstart automation scripts
  • Using Runtime operations, for example in the command line and Cockpit

You can configure the following components:

  • Role: Server, Desktop, Workstation, or HPC computenode systems
  • Service Level Agreement: Premium, Standard, or Self-Support service level
  • Usage: Production or Disaster Recovery environments

3.3.1. Listing available values for system purpose attributes

The subscription-manager CLI tool now has the ability to list available values for all system purpose attributes (role, usage, addons* and service-level) of a user’s organization. While this capability was already implemented for service-level, it is now possible for role, usage and addons* using the --list option.

When a system is registered, simply use following syntax:

[root@localhost ~]# subscription-manager usage --list
+-------------------------------------------+
               Available usage
+-------------------------------------------+
 - Production
 - Development

When the system is not registered, then it is necessary to provide authentication options --username --password and --org as follows:

[root@localhost ~]# subscription-manager usage --list --username user@redhat.com --password secret --org 12345678
+-------------------------------------------+
               Available usage
+-------------------------------------------+
 - Production
 - Development

When a user tries to set a non-available value, then subscription-manager will print a warning. Keep in mind that subscription-manager will still set the value despite the printed warning as shown here:

[root@localhost ~]# subscription-manager usage --set=Foo
Warning: Provided value "Foo" is not included in the list of valid values
 - Production
 - Development
usage set to "Foo".

Likewise when the system is not registered and the user tries to set a non-available value while passing credentials, a warning will also be displayed and the value of the system purpose attribute value will still be set:

[root@localhost ~]# subscription-manager usage --set=Foo --username user@redhat.com --password secret --org 12345678
Warning: Provided value "Foo" is not included in the list of valid values
 - Production
 - Development
usage set to "Foo".
Caution

While setting invalid system purpose attribute values is still possible, the warning messages are only printed when the user has already registered or has provided authentication options.

3.4. Using module streams

Modules are a package organization mechanism which enables the user to choose from multiple versions of package sets. Modules combine features of groups and repositories. For example, it would allow a network to more frequently update some systems with the most recent version of one piece of software while keeping the version consistent on others.

The Anaconda installer can enable module streams and install module profiles.

3.4.1. Installing module profiles

Install module profiles to enable the module and stream combination and install multiple packages at once. Use the @module:stream/profile syntax in place of a package in the %packages section.

  • When a module has a default stream specified, you can leave it out. When the default stream is not specified, you must specify it.
  • When a module stream has a default profile specified, you can leave it out. When the default profile is not specified, you must specify it.
  • Installing a module multiple times with different streams is not possible.
  • Installing multiple profiles of the same module and stream is possible.

    When a module and a package group exist with the same name, the module takes precedence.
    The following values are possible in the _%packages_ section after introduction of modules:
    ----
    %packages

@^an_environment @a_group @module_with_default_stream @module_without_default_stream:stream_name @some_module:some_stream_name/profile_1 @some_module:some_stream_name/profile_2 a_package

3.4.1.1. %end

In Red Hat Enterprise Linux 8, modules are present only in the Application Stream repository. To list available modules, use the yum module list command on an installed Red Hat Enterprise Linux 8 system.

3.4.2. Enabling module streams

You can also enable modules and streams with a command.

Procedure

To enable a package module stream within kickstart script, use the module command:

module --name=NAME [--stream=STREAM]

In the command:

  • --name= Specifies a name of the module to enable. Replace NAME with the actual name.
  • --stream= Specifies a name of the module stream to enable. Replace STREAM with the actual name.