Red Hat Subscription Manager: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(47 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
* How to register and subscribe a system to the Red Hat Customer Portal using Red Hat Subscription-Manager https://access.redhat.com/solutions/253273


=Overview=
=Overview=
=Concepts=
==Subscription Name==
==Subscription "Provides"==
==Pool==
The Pool ID is reported by <tt>[[#list|subscription-manager list]]</tt> command.
==Available==
==Quantity==
==Monitor Subscription Allocation On-Line==
Customer Support Portal -> Subscriptions -> Red Hat Subscription Management (in page) -> Subscriber Inventory -> Systems -> Display "All" -> Click on a  specific system.
=Commands=
==list==
List subscription and product information for this system.
By default, the list shows all products that are already installed. This is equivalent with using "--installed":
<pre>
subscription-manager list
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:  Red Hat Enterprise Linux Server
Product ID:    69
Version:        7.3
Arch:          x86_64
Status:        Subscribed
Status Details:
Starts:        12/26/2016
Ends:          12/26/2017
</pre>
===--available===
<Pre>
subscription-manager list --available [--all]
</pre>
===--installed===
List installed subscriptions on the current system.
===--matches===
Applies a regular expression to the list of available subscriptions:
<pre>
subscription-manager list --available --matches '*OpenShift*'
</pre>
==status==
Show status of this system's subscriptions.
<pre>
# subscription-manager status
+-------------------------------------------+
  System Status Details
+-------------------------------------------+
Overall Status: Current
</pre>
==identity==
Display the identity of this system, as registered with the subscription management infrastructure.
<pre>
# subscription-manager identity
system identity: e8cae509-6c99-4c8b-9d7e-0e6578e79409
name: master1.openshift35.local
org name: ...
org ID: ...
</pre>
==list==
<pre>
#  subscription-manager list
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:  Red Hat Enterprise Linux Server
Product ID:    69
Version:        7.3
Arch:          x86_64
Status:        Subscribed
Status Details:
Starts:        03/20/2017
Ends:          03/19/2018
Product Name:  Red Hat OpenShift Container Platform
Product ID:    290
Version:        3.5
Arch:          x86_64
Status:        Subscribed
Status Details:
Starts:        03/20/2017
Ends:          03/19/2018
</pre>
==register==
Register this system to the Customer Portal or another subscription management service.
==refresh==
Pull the latest subscription data from the server.
<pre>
subscription-manager refresh
</pre>
==attach==
Attach a specified subscription to the registered system. The attachment can be done automatically, by attaching all compatible subscriptions, or by specifying a [[#Pool|pool]] and the [[#Quantity|quantity]].
<pre>
subscription-manager attach --auto
</pre>
<pre>
subscription-manager attach --pool=<pool-id> --quantity=<quantity>
</pre>
==repos==
List the RPM repositories the system will use as result of attaching to a subscription(s).
===--disable===
Disable repositories:
<pre>
subscription-manager repos --disable="*"
</pre>
===--list===
List all known repositories.
===--list-enabled===
List enabled repositories.
===--list-disabled===
List disabled repositories.


=Register a Linux System=
=Register a Linux System=
The first step consists in the [[r#register|registration]] of the system with the credentials linked to subscription.
<pre>
# subscription-manager register
Username: <your-subscription-user>
Password:
The system has been registered with ID: 8ccbea2c-8b26-4049-b2f5-ed5487ea9cb1
</pre>
Refresh:
<pre>
subscription-manager refresh
</pre>
Determine the subscriptions available to this system with <tt>[[#--available|subscription list --available --all]]</tt>, and note the associated [[#Pool|Pool ID]].
<pre>
subscription-manager list --available --all
</pre>
Attach various subscriptions, depending on the use case:
<pre>
subscription-manager attach --pool=<pool-id> --quantity=1
Successfully attached a subscription for: Red Hat Enterprise Linux Developer Suite
1 local certificate has been deleted.
</pre>
Example of registering a standard RHEL subscription:
==Register a Standard RHEL Subscription==
subscription-manager list --available --all
subscription-manager attach --pool=9a85f981533dfa870159417c34f86a72 --quantity=1
=Unregister a System=
Once a system has been unregistered with one of the method specified below, the subscriptions associated with it become available for reuse. The release of the associated subscription can be verified as described here [[#--available|subscription-manager list --available]].
==From the Subscription Manager==
<pre>
subscription-manager unregister
</pre>
Then verify with:
<pre>
subscription-manager identity
This system is not yet registered. Try 'subscription-manager register --help' for more information.
</pre>
==From the Portal==
Subscriptions -> Systems -> select the system -> select the subscription -> Remove Selected.

Latest revision as of 00:35, 8 November 2017

External

Overview

Concepts

Subscription Name

Subscription "Provides"

Pool

The Pool ID is reported by subscription-manager list command.

Available

Quantity

Monitor Subscription Allocation On-Line

Customer Support Portal -> Subscriptions -> Red Hat Subscription Management (in page) -> Subscriber Inventory -> Systems -> Display "All" -> Click on a specific system.

Commands

list

List subscription and product information for this system.

By default, the list shows all products that are already installed. This is equivalent with using "--installed":

subscription-manager list

+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        7.3
Arch:           x86_64
Status:         Subscribed
Status Details:
Starts:         12/26/2016
Ends:           12/26/2017

--available

subscription-manager list --available [--all]

--installed

List installed subscriptions on the current system.

--matches

Applies a regular expression to the list of available subscriptions:

subscription-manager list --available --matches '*OpenShift*'

status

Show status of this system's subscriptions.

# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

identity

Display the identity of this system, as registered with the subscription management infrastructure.

# subscription-manager identity
system identity: e8cae509-6c99-4c8b-9d7e-0e6578e79409
name: master1.openshift35.local
org name: ...
org ID: ...

list

#  subscription-manager list

+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        7.3
Arch:           x86_64
Status:         Subscribed
Status Details:
Starts:         03/20/2017
Ends:           03/19/2018

Product Name:   Red Hat OpenShift Container Platform
Product ID:     290
Version:        3.5
Arch:           x86_64
Status:         Subscribed
Status Details:
Starts:         03/20/2017
Ends:           03/19/2018

register

Register this system to the Customer Portal or another subscription management service.

refresh

Pull the latest subscription data from the server.

subscription-manager refresh

attach

Attach a specified subscription to the registered system. The attachment can be done automatically, by attaching all compatible subscriptions, or by specifying a pool and the quantity.

subscription-manager attach --auto
subscription-manager attach --pool=<pool-id> --quantity=<quantity>

repos

List the RPM repositories the system will use as result of attaching to a subscription(s).

--disable

Disable repositories:

subscription-manager repos --disable="*"

--list

List all known repositories.

--list-enabled

List enabled repositories.

--list-disabled

List disabled repositories.

Register a Linux System

The first step consists in the registration of the system with the credentials linked to subscription.

# subscription-manager register
Username: <your-subscription-user>
Password: 
The system has been registered with ID: 8ccbea2c-8b26-4049-b2f5-ed5487ea9cb1 

Refresh:

subscription-manager refresh

Determine the subscriptions available to this system with subscription list --available --all, and note the associated Pool ID.

subscription-manager list --available --all

Attach various subscriptions, depending on the use case:

subscription-manager attach --pool=<pool-id> --quantity=1
Successfully attached a subscription for: Red Hat Enterprise Linux Developer Suite
1 local certificate has been deleted.

Example of registering a standard RHEL subscription:

Register a Standard RHEL Subscription

subscription-manager list --available --all
subscription-manager attach --pool=9a85f981533dfa870159417c34f86a72 --quantity=1

Unregister a System

Once a system has been unregistered with one of the method specified below, the subscriptions associated with it become available for reuse. The release of the associated subscription can be verified as described here subscription-manager list --available.

From the Subscription Manager

subscription-manager unregister

Then verify with:

subscription-manager identity

This system is not yet registered. Try 'subscription-manager register --help' for more information.

From the Portal

Subscriptions -> Systems -> select the system -> select the subscription -> Remove Selected.