Chapter 4. Configuring automatic registration and management
To enable remote host configuration auto-registration with Red Hat Subscription Management, embed your Remote Host Configuration and Management credentials in your ISO after you have downloaded it.
Prerequisites
- You must have a Red Hat Hybrid Cloud Console account.
-
You must have a Remote Host Configuration and Management
org ID
and activation key for your RHEL subscription. If you have Organization Administrator access for your account, you can set up an activation key at the Activation keys page. - You must have Podman installed and running.
Procedure
In your host, create a working directory and change to that directory. This example uses
myisodir
as the directory name.$ mkdir myisodir $ cd myisodir
Download the ISO image that you created:
- In the console, click Red Hat Insights > RHEL > Inventory > Images.
- In the Immutable (OSTree) tab, click the More options icon (⋮) for the image you want to download and click Download.
-
Copy the ISO into the
myisodir
directory you created. Rename your ISO to
fleet_source.iso
. In this example,mydownloaded.iso
is an example name of the ISO you downloaded.$ mv mydownloaded.iso fleet_source.iso
-
Using a text editor, create a plain text file in the working directory named
fleet_rhc_vars
. Paste the following example and replace
YOUR_RHC_ORG_ID
andYOUR_RHC_ACTIVATION_KEY
with your credentials. Contact the Organization Administrator for your account, or check the Activation keys page to find your credentials.RHC_ORGID=YOUR_RHC_ORG_ID RHC_ACTIVATION_KEY=YOUR_RHC_ACTIVATION_KEY RHC_FIRSTBOOT=true
Use Podman to pull the Fleet Utility app container.
$ podman pull quay.io/fleet-management/fleet-iso-util:latest
Run the fleet utility tool with Podman to create a new ISO with your RHC credentials embedded. Replace
/full/path/to/myisodir
with the full path to yourmyisodir
directory. Enter thepwd
command in your terminal in yourmyisodir
directory to get the full path to yourmyisodir
directory.$ podman run -it --rm -v /full/path/to/myisodir:/isodir:z quay.io/fleet-management/fleet-iso-util:latest
-
Copy the new ISO
fleet_out.iso
to a location used by your deployment process such as a USB drive. For example, when usinglibvirt
and the default image directory setting, move the ISO to/var/lib/libvirt/images
. - Install RHEL for Edge onto your device using the new ISO.
Log in to the system using the SSH username and key you provided when you created your image.
$ ssh username@ipaddress -i /path/to/private_key
To verify the registration, enter the following command:
$ rhc status
Example output
Connection status for localhost.localdomain: - Connected to Red Hat Subscription Management - The Remote Host Configuration and Management daemon is active Manage your Remote Host Configuration and Management systems: https://red.ht/connector
- Verify the registration of the new system in the Red Hat Hybrid Cloud Console platform. Click Edge Management > Inventory > Systems.
(Optional) To make the system more recognizable during development or testing, you can add a prefix to the
fleet_rhc_vars
file and it will be added to the Insights display name at install. Otherwise, if the system hostname islocalhost.localdomain
, the auto-registration process only sets the Insights display name to the subscription-manager ID.RHC_ORGID=YOUR_RHC_ORG_ID RHC_ACTIVATION_KEY=YOUR_RHC_ACTIVATION_KEY DISPLAY_NAME_PREFIX=myprefix-
After you register a RHEL for Edge device, it is not automatically removed after a period of inactivity. If you would like to unregister and remove it from the Red Hat Hybrid Cloud Console, you must unregister your device to remove it. To unregister the device, go to the Red Hat Hybrid Cloud Console and click Red Hat Insights > Inventory, find your Edge device, select it, and click Delete.