If your organization uses Red Hat Satellite, then you can use it to convert multiple hosts to Red Hat Enterprise Linux at the same time.
The basic procedure is as follows:
On Red Hat Satellite, you use an Ansible Role to help prepare Satellite Server to run conversions to RHEL.
You register the non-RHEL hosts that you plan to convert to your Red Hat Satellite Server, and prepare them for automated remote execution and conversion.
On your Satellite Server, you run automation to perform pre-conversion analysis and the actual conversion on each host.
You validate the systems that were converted by Satellite in the same way that you validate systems that are converted from the command line.
This section assumes that Red Hat Satellite 6.14 is already installed and operating correctly. For more information about Red Hat Satellite, refer to https://learn.spidernet.pl/satellite.
You must have a Red Hat Satellite subscription manifest with sufficient Red Hat Enterprise Linux entitlements allocated for all the conversions that you intend to perform. Confirm that you have installed the subscription manifest on your Satellite Server.
In the Satellite Server web UI, select → to view the total number of appropriate entitlements and how many are already in use.
You can click on that page to visit the Red Hat Hybrid Cloud Console (https://console.redhat.com), where you can update your subscription manifest to add subscriptions.
Enabling Simple Content Access for your organization can make subscription management simpler by removing the need to attach subscriptions at a per-system level. This configuration can help the conversion process to go more smoothly.
Confirm that you have enabled the Satellite repositories for the version of Red Hat Enterprise Linux to which you plan to convert the hosts.
The hosts that you plan to convert require access to the Convert2RHEL software repository and the repositories for the correct version of Red Hat Enterprise Linux. For example, if you are converting CentOS Linux 7 to RHEL 7, then the hosts require access to the RHEL 7 software repositories.
Make sure that the required repositories are enabled.
In the web UI of your Satellite Server, navigate to → .
For conversions to Red Hat Enterprise Linux 7 for x86_64, you must have at least the (rhel-7-server-rpms) repository enabled.
If this repository is not enabled, then find it in the pane, click the repository name, and then click the plus symbol () to enable it.
You might also choose to enable the Optional, Extras, or Supplementary repositories for RHEL 7.
If you are converting to Red Hat Enterprise Linux 8 for x86_64 directly from a distribution such as CentOS Linux 8, then enable the BaseOS (rhel-8-for-x86_64-baseos-rpms) and AppStream (rhel-8-for-x86_64-appstream-rpms) repositories.
The next step is to import an Ansible Role into Satellite Server. You run this Ansible Role on your Satellite Server to help configure your Satellite Server to perform RHEL conversions.
In the Satellite Server web UI, go to → → . Click .
Use the less than () and greater than () buttons at the lower right of the page until you find the redhat.satellite.convert2rhel role in the list.
Select its checkbox, and then click .
If this operation succeeds, then you return to the → → page and the redhat.satellite.convert2rhel role is on the list of available roles.
For the Ansible Role to function correctly, you must set some Ansible variables that configure the redhat.satellite.convert2rhel role.
Navigate to → → .
In the table of roles, locate the row for the redhat.satellite.convert2rhel role.
On that row, in the column, click the link that displays the number of variables for that role.
That link opens a page that lists all the variables that are used by that role.
You must set the following Ansible variables for the role. Some variables are preconfigured by the role and can be edited in the Satellite web UI. Most of the variables are not automatically created or configured, so you must create them by clicking , and then configure them in the web UI.
If you must create the variable, then enter the following parameters on the page:
is the name of the variable.
is redhat.satellite.convert2rhel.
must be selected.
is the type of the variable, for example string or boolean.
is the variable's default value. Set the appropriate value for the variable, based on the following discussion of the Ansible Role variables that you must set.
To convert a CentOS Linux system to RHEL, you must set the following Ansible variables for the redhat.satellite.convert2rhel role.
satellite_server_url
String.
The URL of your Satellite Server, such as https://satellite.example.com.
satellite_username
String. The username of a Satellite account that can make administrative changes to Satellite.
satellite_password
String.
The password for the username in the satellite_username variable.
satellite_organization
String. The name of your Satellite organization.
satellite_validate_certs
Boolean.
Set to true to validate TLS certificates, or false to not validate.
satellite_convert2rhel_manage_subscription
Boolean.
Set to false if your Satellite Server has a valid manifest.
satellite_content_rhel_enable_rhel7
Boolean.
Set to true if you intend to convert directly to RHEL 7, or false otherwise.
satellite_content_rhel_enable_rhel8
Boolean.
Set to true if you intend to convert directly to RHEL 8, or false otherwise.
If you are converting Oracle Linux systems, then other variables might be needed. Refer to the Converting a Host to Red Hat Enterprise Linux section of the Managing Hosts guide for details.
To configure your Satellite Server to perform conversions to RHEL, you must run the redhat.satellite.convert2rhel Ansible Role.
Navigate to → . From the list of hosts, click the hostname of your Satellite Server.
Click the tab. If no roles are assigned to your Satellite Server, then click ; otherwise, click .
In the interface, make sure that the redhat.satellite.convert2rhel role is listed under .
Click .
That role is now assigned to your Satellite Server.
Return to → .
Make sure that only your Satellite Server is selected, and no other hosts.
Run the role on your Satellite Server by clicking , and then selecting Run all Ansible roles.
If the Ansible Role succeeds, then you can continue to the next step. If the Ansible Role fails, then click the name of your Satellite Server at the end of the job page and review the output to determine what went wrong.
Make certain that the software repositories that are configured on your Satellite Server are up to date.
In the Satellite Server web UI, navigate to → . For RHEL 7, make sure that the product has been synchronized. If this product has not been synchronized, then click its name. On the page for that product, select the checkboxes for all the repositories and click to ensure that the latest packages are available.
You should also confirm that the product has been synchronized in the same way.
If you are converting to RHEL 8 for x86_64 directly from a distribution such as CentOS Linux 8, then the names of the products are and .
The next step is to add the repositories in those products to a content view that Convert2RHEL uses for the conversion.
In the web UI for your Satellite Server, navigate to → . If you are converting to RHEL 7 for x86_64, then the Ansible Role that you ran on your Satellite Server should have created a content view named . Select that content view by clicking its name.
On the page, select the tab.
On the list, select All repositories, and on the list, select All.
Select the checkboxes for the repository, the repository, and any other repositories for RHEL 7 that you want to have available during the conversion process. Click .
Then, publish the changed content view by clicking .
In the pane displayed by Satellite Server, select , assign the content view to a lifecycle environment (select Library if you have no others), and click .
Review the details on the next page, and then click .
Wait for the content view to be published.
When you perform a pre-conversion analysis or an actual conversion of your hosts with Red Hat Satellite, you use an activation key to grant your hosts access to the content view.
In the Red Hat Satellite web UI, navigate to → .
If you are converting to RHEL 7, then the Ansible Role created an activation key that is named convert2rhel_centos7.
The content view assigned to the activation key is probably set to when you first visit the page.
You must select the content view that you want to use for the conversion.
Click the name of the activation key (convert2rhel_centos7) and on the next page, find the heading.
Under that heading, set to the name of the lifecycle environment to which you assigned the content view that you want to use (Library in this example).
For , select the convert2rhel_centos7 content view.
Click to save your changes.
For CentOS Linux 7 conversions, the Ansible Role sets up two activation keys, convert2rhel_centos7 and convert2rhel_rhel7.
The distinction between them does not seem to be clearly documented, but you could choose to use one for pre-conversion analysis and the second for conversion or post-conversion activation.
For CentOS Linux 8 conversions, the convert2rhel_centos8 and convert2rhel_rhel8 activation keys are available.
To prepare the hosts for conversion to RHEL by using Satellite, you must complete the following tasks:
Back up your hosts and verify that they can be restored if necessary.
Review the known issues and limitations that are documented in the Known Issues and Limitations section of the Converting from an RPM-based Linux Distribution to RHEL guide.
Ensure that the standard kernel is the currently running kernel on those hosts. (On CentOS Linux, ensure that you are not running the real-time kernel. On Oracle Linux, ensure that you are running the Red Hat Compatible Kernel (RHCK).)
Remove any CentOS Stream packages from your hosts. (CentOS Stream conversion to RHEL is not currently supported.)
On each host to be converted to RHEL by Satellite, you must enable remote execution by the Satellite Server that will perform the conversion.
If you can log in to the root account on a host, then you can enable remote execution manually from Satellite Server by running the following command as the root user on Satellite Server:
ssh-copy-id -i ~foreman-proxy/.ssh/id_foreman_proxy.pub root@hostAlternatively, if the curl command is installed on each host, then you can download and install the key by running the following commands as the root user account on each host.
If the /root/.ssh directory does not exist, then create it:
[root@host ~]# mkdir /root/.sshRun the following command so that Satellite Server can authenticate to the root user account on the host:
[root@host ~]# curl -k https://satellite:9090/ssh/pubkey \
>> ~/.ssh/authorized_keysSet the correct permissions for the ~/.ssh directory:
[root@host ~]# chmod 700 ~/.sshSet the correct permissions for the authorized_keys file:
[root@host ~]# chmod 600 ~/.ssh/authorized_keysThe next step is to make sure that the non-RHEL hosts that you plan to convert to RHEL are registered with your Red Hat Satellite Server.
If the curl command is installed on your non-RHEL hosts, then you can generate a curl command on Satellite to run on your hosts to register them.
On your Satellite Server, navigate to → .
On the tab, configure the following settings:
The and should be set to the values that you want for the host that is being converted.
Set to CentOS 7 converting if you are converting from CentOS Linux 7.
Set to convert2rhel_centos7 if you are converting to RHEL 7.
Select if your host has not been configured with the TLS CA certificate that signed the Satellite Server's TLS certificate.
On the tab, set the to the lifecycle environment that you want your host to use after conversion.
Click .
Copy the command that displays below the button. By default, this command is valid for four hours.
Run that command as the root user on each host that you want to register with Satellite.
After the command completes, in the web UI on your Satellite Server, go to → and confirm that the host you just registered appears in the list of hosts.
Navigate to → in the web UI of your Satellite Server, and select the checkbox for each host on which you want to perform a pre-conversion analysis.
Then, click the button at the upper right of the UI, and select Schedule Remote Job.
On the first page, set to Convert 2 RHEL, and set to Convert to RHEL analyze.
Click .
On the review page, confirm that all the hosts that you plan to analyze are listed, that is set to Convert to RHEL analyze, that is set to Immediate execution, and that is set to Static query.
If everything looks correct, then click .
Satellite Server starts the convert2rhel analyze job on the hosts that you selected.
Wait until the job has succeeded or failed on all hosts.
At the end of the job page is a list of all the hosts that are being analyzed and their current status.
Click the hostname of a host to review the pre-conversion analysis report for that host. Correct any errors that you find and repeat the preceding steps until the pre-conversion analysis report is successful.
Converting your hosts with Satellite is similar to running the pre-conversion analysis.
Navigate to → in the web UI of your Satellite Server again.
Select the checkbox for each host that passed its pre-conversion analysis that you want to convert.
Then click at the upper right of the UI and select Schedule Remote Job again.
On the first page, set to Convert 2 RHEL, but this time, set to Convert to RHEL, and then click .
On the page, set to convert2rhel_rhel7 if you are converting to RHEL 7, and set to yes.
Click .
Review the parameters on the page.
Make sure that the is set to Convert to RHEL, that the lists only the hosts that you want to convert, that is set to Immediate execution, and that is set to Static query.
After confirming that all settings are correct, click .
After you click , the conversion process starts for all target hosts. Changes made after this point in the conversion process might be difficult or impossible to undo. Be certain that you are ready to perform the conversion before clicking .
On the job page, wait until the job has succeeded or failed on all hosts. At the end of the job page is a list of all the hosts that are being converted and their current status.
After the job completes, inspect the results for each host and validate that the conversions succeeded. Validating the conversions and addressing post-conversion issues are covered in a separate section of this course.
You can assign the converted hosts to a different host group and manage these hosts like other RHEL systems in Red Hat Satellite.
For more information about the conversion process, refer to the Converting a Host to Red Hat Enterprise Linux chapter in the Managing Hosts guide for Red Hat Satellite 6.14 at https://access.redhat.com/documentation/en-us/red_hat_satellite/6.14/html-single/managing_hosts/index#converting-a-host-to-rhel_managing-hosts
For more information about registering hosts in Red Hat Satellite, refer to the Registering Hosts by Using Global Registration section in the Managing Hosts guide for Red Hat Satellite 6.14 at https://access.redhat.com/documentation/en-us/red_hat_satellite/6.14/html-single/managing_hosts/index#Registering_Hosts_by_Using_Global_Registration_managing-hosts