Chapter 11. Updating overcloud registration to Red Hat Satellite Server
Red Hat OpenStack Platform 16.1 uses Ansible-based methods to register overcloud nodes to Red Hat Satellite Server 6.
11.1. Red Hat Subscription Manager (RHSM) composable service
You can use the rhsm
composable service to register overcloud nodes through Ansible. Each role in the default roles_data
file contains a OS::TripleO::Services::Rhsm
resource, which is disabled by default. To enable the service, register the resource to the rhsm
composable service file:
resource_registry: OS::TripleO::Services::Rhsm: /usr/share/openstack-tripleo-heat-templates/deployment/rhsm/rhsm-baremetal-ansible.yaml
The rhsm
composable service accepts a RhsmVars
parameter, which you can use to define multiple sub-parameters relevant to your registration:
parameter_defaults: RhsmVars: rhsm_repos: - rhel-8-for-x86_64-baseos-tus-rpms - rhel-8-for-x86_64-appstream-tus-rpms - rhel-8-for-x86_64-highavailability-tus-rpms … rhsm_username: "myusername" rhsm_password: "p@55w0rd!" rhsm_org_id: "1234567" rhsm_release: 8.2
You can also use the RhsmVars
parameter in combination with role-specific parameters, for example, ControllerParameters
, to provide flexibility when enabling specific repositories for different nodes types.
11.2. RhsmVars sub-parameters
Use the following sub-parameters as part of the RhsmVars
parameter when you configure the rhsm
composable service. For more information about the Ansible parameters that are available, see the role documentation.
rhsm | Description |
---|---|
|
Choose the registration method. Either |
|
The organization that you want to use for registration. To locate this ID, run |
|
The subscription pool ID that you want to use. Use this parameter if you do not want to auto-attach subscriptions. To locate this ID, run |
| The activation key that you want to use for registration. |
|
Use this parameter to attach compatible subscriptions to this system automatically. Set the value to |
| The base URL for obtaining content. The default URL is the Red Hat Content Delivery Network. If you use a Satellite server, change this value to the base URL of your Satellite server content repositories. |
| The hostname of the subscription management service for registration. The default is the Red Hat Subscription Management hostname. If you use a Satellite server, change this value to your Satellite server hostname. |
| A list of repositories that you want to enable. |
| The username for registration. If possible, use activation keys for registration. |
| The password for registration. If possible, use activation keys for registration. |
| Red Hat Enterprise Linux release for pinning the repositories. This is set to 8.2 for Red Hat OpenStack Platform |
|
The hostname for the HTTP proxy. For example: |
|
The port for HTTP proxy communication. For example: |
| The username to access the HTTP proxy. |
| The password to access the HTTP proxy. |
You can use rhsm_activation_key
and rhsm_repos
together only if rhsm_method
is set to portal
. If rhsm_method
is set to 'satellite', you can only use either rhsm_activation_key
or rhsm_repos
.
11.3. Switching to the rhsm composable service
The previous rhel-registration
method runs a bash script to handle the overcloud registration. The scripts and environment files for this method are located in the core heat template collection at /usr/share/openstack-tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/
.
Complete the following steps to switch from the rhel-registration
method to the rhsm
composable service.
Procedure
Exclude the
rhel-registration
environment files from future deployments operations. In most cases, exclude the following files:-
rhel-registration/environment-rhel-registration.yaml
-
rhel-registration/rhel-registration-resource-registry.yaml
-
If you use a custom
roles_data
file, ensure that each role in yourroles_data
file contains theOS::TripleO::Services::Rhsm
composable service. For example:- name: Controller description: | Controller role that has all the controller services loaded and handles Database, Messaging and Network functions. CountDefault: 1 ... ServicesDefault: ... - OS::TripleO::Services::Rhsm ...
-
Add the environment file for
rhsm
composable service parameters to future deployment operations.
This method replaces the rhel-registration
parameters with the rhsm
service parameters and changes the heat resource that enables the service from:
resource_registry: OS::TripleO::NodeExtraConfig: rhel-registration.yaml
To:
resource_registry: OS::TripleO::Services::Rhsm: /usr/share/openstack-tripleo-heat-templates/deployment/rhsm/rhsm-baremetal-ansible.yaml
You can also include the /usr/share/openstack-tripleo-heat-templates/environments/rhsm.yaml
environment file with your deployment to enable the service.
11.4. rhel-registration to rhsm mappings
To help transition your details from the rhel-registration
method to the rhsm
method, use the following table to map your parameters and values.
rhel-registration | rhsm / RhsmVars |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11.5. Registering the overcloud to Red Hat Satellite Server
Create an environment file that enables and configures the rhsm
composable service to register nodes to Red Hat Satellite instead of the Red Hat Customer Portal.
Procedure
-
Create an environment file named
templates/rhsm.yml
to store the configuration. Include your configuration in the environment file. For example:
resource_registry: OS::TripleO::Services::Rhsm: /usr/share/openstack-tripleo-heat-templates/deployment/rhsm/rhsm-baremetal-ansible.yaml parameter_defaults: RhsmVars: rhsm_activation_key: "myactivationkey" rhsm_method: "satellite" rhsm_org_id: "ACME" rhsm_server_hostname: "satellite.example.com" rhsm_baseurl: "https://satellite.example.com/pulp/repos" rhsm_release: 8.2
The
resource_registry
associates therhsm
composable service with theOS::TripleO::Services::Rhsm
resource, which is available on each role.The
RhsmVars
variable passes parameters to Ansible for configuring your Red Hat registration.- Save the environment file.
11.6. Preparing Leapp to use Satellite Server
If you use Satellite Server 6 to host RPM content, complete these preparation steps to ensure a successful Leapp upgrade with Satellite.
Prerequisites
- Create a Satellite Server activation key that is linked to repositories for Red Hat OpenStack Platform 16.1 and Red Hat Enterprise Linux 8.2.
- Generate an Ansible inventory file for your overcloud nodes.
- On your Satellite Server, create and promote a content view for Red Hat OpenStack Platform 16.1 upgrade and include the repositories that required for the upgrade. For more information, see Red Hat Satellite Server 6 considerations.
If you use a Ceph subscription and have configured director to use the
overcloud-minimal
image for Ceph storage nodes, on your Satellite Server you must create a Content View and add the following Red Hat Enterprise Linux (RHEL) 8.2 repositories to it:Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
rhel-8-for-x86_64-appstream-rpms x86_64 8.2
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
rhel-8-for-x86_64-baseos-rpms x86_64 8.2
For more information, see Importing Red Hat Content and Managing Content Views in the Red Hat Satellite Content Management Guide.
Procedure
-
Log in to the undercloud as the
stack
user. Create a file called
playbook-satellite.yaml
and paste the following content in the file:- name: Pre-install leapp hosts: overcloud become: yes tasks: - name: Pre-install leapp yum: name: - leapp - leapp-repository state: installed - name: Remove katello-host-tools-fact-plugin yum: name: - katello-host-tools-fact-plugin state: removed - name: Register system redhat_subscription: activationkey: "osp16-key" org_id: "ACME" server_hostname: "satellite.example.com" rhsm_baseurl: "https://satellite.example.com/pulp/repos" force_register: True
Modify the
redhat_subscription
variables to suit your Satellite Server.Run the playbook:
$ ansible-playbook -i ~/inventory.yaml playbook-satellite.yaml