Create RHEL for Edge images and configure automated management

Edge management 1-latest

Getting started with edge management in the Red Hat Hybrid Cloud Console

Abstract

You can build an image, download it, install it on a system, and then register that system so it can receive updates.

Preface

Insights image builder provides the controls and information to keep your systems secure, available and operating efficiently. Update all your systems with secure, over the air updates. Organize your systems in groups that match your business and send updates that match your workflows. Use Red Hat Insights to find and fix potential vulnerabilities in your edge systems with one click.

With the Insights image builder application, you can create an image and manage the packages associated with an image. You can build an image, download it, install it on a system, and then register that system so it can receive updates.

Provisioning and registration involve the following high-level tasks:

  • Build a Red Hat Enterprise Linux for Edge image using the Insights image builder application.
  • Download the image and modify it with your organization credentials, using Podman and the fleet management ISO utility.
  • Deploy the image to systems.
  • View systems in the edge management and Red Hat Insights applications, in the Red Hat Hybrid Cloud Console.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, slave, blacklist, and whitelist. Because of the enormity of this endeavor, these changes will be implemented gradually over several upcoming releases. For more details, see our CTO Chris Wright’s message.

Chapter 1. Creating custom repositories

Define your repository with third party information to be able to add packages from the third party repository to your customized images.

Prerequisites

  • You have administrator access to the Red Hat Hybrid Cloud Console web user interface.
  • You have an account on Red Hat Customer Portal with an Insights subscription.
  • You must have the URL link to your custom repository.

Procedure

  1. Access the Red Hat Hybrid Cloud Console platform and log in.
  2. Click the Settings icon (⚙) in the top right and select Settings.
  3. Optionally, access the direct link Repositories.
  4. Select Repositories in the left side menu.
  5. Click the Add repositories button. The Add repositories wizard opens.
  6. Enter the following information:

    1. Mandatory - Name.
    2. Mandatory - URL.
    3. From the drop-down menu, choose the Restrict architecture. You can enable all the architectures or select one.
    4. From the dropdown menu, choose the Restrict OS version. You can enable all the OS versions or select one.
    5. GPG key - Drag or upload your file with the GPG key. You can also paste the URL or value of the existing GPG key.
  7. Optional: If you want to add another repository, click ⊕ Add another repository and repeat the step 5.
  8. Click Save. The system validates the repository status.

    1. If your repository is marked as Invalid, check the repository URL you added.

The Custom Repositories window opens, listing all the custom repositories you added, the architecture you chose, versions, how many packages you added, and the repository status.

Verification

  1. Open the list of custom repositories and verify that the repository you added is listed.

Chapter 2. Building a RHEL image with custom repositories

Start by using the Insights image builder application to build a RHEL for Edge image. RHEL for Edge is optimized for edge computing to provide faster data delivery. It also enables updates with OSTree, which is a git-like model of updates that sends only the changes in your update, so that updates are quick and rollback is easy. Optionally, you can add packages from custom repositories outside of Red Hat to customize your RHEL for Edge image and enable it with the features and packages that you need for your business.

Warning

Using RHEL for Edge customized images that were created using the on-premise version of RHEL image builder is not supported by the Insights image builder application. For more details, see Edge images supportability.

Prerequisites

You must have a Red Hat Hybrid Cloud Console account.

Procedure

  1. Access Red Hat Hybrid Cloud Console platform and log in.
  2. From the console dashboard, navigate to Red Hat Insights > RHEL > Inventory > Images. The Insights image builder environment opens.
  3. In the image builder application, click the Immutable (OSTree) tab.
  4. Click Create new image.
  5. On the Create image wizard, follow the steps:

    1. On the Details page, enter an image name and click Next.
    2. On the Options page, select the following details:

      1. The image base release for your image.
      2. Select the option RHEL for Edge Installer (.iso).
      3. Click Next.
    3. On the System registration page, follow the steps:

      1. Enter a username. This is the username to log in to your system after it is created.
      2. Enter a public SSH key to create a user for your image.
      3. Click Next.
    4. On the Content page:

      1. On the Additional Red Hat packages page, add any core RHEL package, for example, emacs.

        1. In the Available packages search field, enter emacs and click the search icon.
        2. Select emacs from the search results.
        3. Click the Add Selected or Add all arrow button to add emacs to the list.
      2. Click Next.
      3. On the Custom repositories page:

        1. Select the custom repository you added.
      4. Click Next.
      5. On the Review page:

        1. Check the data is correct and click Create image.

Verification

The image may take some minutes to build. After your image is created, you can see it on the Images page. You can see the following image details:

  • Name
  • Version
  • Release
  • Target environment
  • Status
  • Created/Updated

Next Steps

After you build the image, continue the installation by registering the system automatically with Red Hat so the edge management application can update the system.

Chapter 3. Locating your previous created Immutable (OSTree) images

You can list your immutable systems on the Hosted Inventory dashboard. You can see detailed information about your immutable systems, update one or more systems, and add or remove these systems to a group.

Note

If you do not have a previous Immutable OSTree system created, the Immutable(OSTree) tab is not displayed. In this case, you must create your Immutable (OStree) images from image builder. See Building an OSTree image with custom repositories.

+ To locate your images in the image builder dashboard, complete the following steps.

Prerequisites

  • You must have a Red Hat Hybrid Cloud Console account.

Procedure

  1. Access Red Hat Hybrid Cloud Console platform and log in.
  2. From the console dashboard, navigate to Red Hat Insights > RHEL > Inventory > Images. The Insights image builder environment opens.
  3. Locate your image by name.

    1. Type your image name in the search bar menu.
    2. If your image exists, click the image name.

      You can see the image details, such as version, OSTree commit hash, SSH key, added packages, among others.

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

  1. In your host, create a working directory and change to that directory. This example uses myisodir as the directory name.

    $ mkdir myisodir
    $ cd myisodir
  2. Download the ISO image that you created:

    1. In the console, click Red Hat Insights > RHEL > Inventory > Images.
    2. In the Immutable (OSTree) tab, click the More options icon (⋮) for the image you want to download and click Download.
  3. Copy the ISO into the myisodir directory you created.
  4. 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
  5. Using a text editor, create a plain text file in the working directory named fleet_rhc_vars.
  6. Paste the following example and replace YOUR_RHC_ORG_ID and YOUR_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
  7. Use Podman to pull the Fleet Utility app container.

    $ podman pull quay.io/fleet-management/fleet-iso-util:latest
  8. 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 your myisodir directory. Enter the pwd command in your terminal in your myisodir directory to get the full path to your myisodir directory.

    $ podman run -it --rm -v /full/path/to/myisodir:/isodir:z quay.io/fleet-management/fleet-iso-util:latest
  9. Copy the new ISO fleet_out.iso to a location used by your deployment process such as a USB drive. For example, when using libvirt and the default image directory setting, move the ISO to /var/lib/libvirt/images.
  10. Install RHEL for Edge onto your device using the new ISO.
  11. 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
  12. 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

  13. Verify the registration of the new system in the Red Hat Hybrid Cloud Console platform. Click Edge Management > Inventory > Systems.
  14. (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 is localhost.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-
Note

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.

Chapter 5. Updating an image

You can update the packages and the package version for an image you have already created. For that, you can use one of the following options to perform the update.

  • Use the Update button in the dashboard to add the latest package version update to the image.
  • Use the More options icon (⋮) to the image you plan to update to be able to choose the package version to update your image. For example, if the system is running the version 2 and you are running the version 5, you can pick one of the versions between 2 and 5 to update the image.
Warning

Using RHEL for Edge customized images that were created using the on-premise version of RHEL image builder is not supported in the Red Hat Hybrid Cloud Console.

There is no support for updating an Edge system by using the CLI. You can only update your Edge systems by using the Red Hat Hybrid Cloud Console.

Prerequisites

  • You must have a Red Hat Hybrid Cloud Console account.
  • You must have built an image in the Red Hat Hybrid Cloud Console.

Procedure

  1. Access Red Hat Hybrid Cloud Console platform and log in.
  2. From the console dashboard, navigate to Red Hat Insights > RHEL > Inventory > Images. The Insights image builder environment opens.
  3. In the image builder application, click the Immutable (OSTree) tab.
  4. Choose between one of the 2 ways to update your image:

    Either the click the Update button or click the More options icon (⋮).

  5. Click Update image.
  6. On the Update image: image-name wizard, follow the steps:

    1. On the Details page, enter a description for the image.
    2. Click Next.
    3. On the Options page, follow the steps:

      1. Select the image base release for your image.
      2. To build an update, clear the RHEL for Edge installer (.iso) check box.
      3. Click Next.
    4. On the Content page:

      1. On the Additional Red Hat packages page, add any core RHEL package, for example, emacs.

        1. In the Available packages search field, enter emacs and click the search icon.
        2. Select emacs from the search results.
        3. Click the Add Selected or Add all arrow button to add emacs to the list.
      2. Click Next.
      3. On the Custom repositories page:

        1. Select the custom repository you added.
      4. On the Additional custom packages page:

        1. Add the packages that you want.
      5. Click Next.
      6. On the Review page:

        1. Check the data is correct and click Update image.

Chapter 6. Updating a system

You can send an update to a system through the dashboard application. For that, you can use the Update button in the dashboard to add the latest package version update to the image. You must use the following procedure to perform the update.

Warning

Currently, there is no support for updating an Edge system by using the CLI. You can only update your Edge systems by using the Red Hat Hybrid Cloud Console. See How to start the upgrade process of an Edge Management deployed system.

Prerequisite

  • You must have a Red Hat Hybrid Cloud Console account.
  • A system is built from an image and registered with the Red Hat Hybrid Cloud Console.
  • An update to that image has been built.

Procedure

  1. Access Red Hat Hybrid Cloud Console platform and log in.
  2. From the console dashboard, navigate to Red Hat Insights > RHEL > Inventory > Systems.
  3. Click the More options icon (⋮) for the system you want to update.
  4. Click Update Image. The Status column for the system will say Update available if your image update was successful.
  5. On the Update page, select an image version. If there are two or more newer image updates for your system, you can learn more about any package changes and choose the one you want.
  6. Click Update system.
  7. Confirm the update completed successfully in the dashboard.

Verification

From the console dashboard, navigate to Red Hat Insights > RHEL > Inventory > Systems.

  • If the update was successful, the system status is Up to date.
  • If the system status is Error or Unresponsive, the system did not update properly. Click the Status to learn more about the failure.
  • If the system status is Error, you can try the update again. Click the Error status, then click Retry.

Chapter 7. Updating multiple systems

You can send an update to Edge several systems through the dashboard application. If the image is the same for all the systems you select, you can update them at the same time. For that, you can select the Edge several systems and use the Update button in the dashboard. The action adds the latest package version update to the image.

Optionally, you can select one image and use the More options icon (⋮) to update, to be able to choose the package version for that image.

Prerequisites

  • You must have a Red Hat Hybrid Cloud Console account.
  • A system is built from an image and registered with the Red Hat Hybrid Cloud Console.
  • You built an update to that image.

Procedure

  1. Access Red Hat Hybrid Cloud Console platform and log in.
  2. From the console dashboard, navigate to Red Hat Insights > RHEL > Inventory > Systems.
  3. Select the systems that you want to update. The Status column for the system will say Update available if your image update was successful.
  4. In the Systems toolbar, click Update to apply the update to the systems.
  5. Review the information about the update and click Update system.
  6. Confirm that the update completed successfully in the image dashboard.

Verification

  • From the console dashboard, navigate to Red Hat Insights > RHEL > Inventory > Systems. If the update was successful, the system status is Up to date.
  • If the system status is Error or Unresponsive the system did not update properly. Click the status to learn more about the failure.
  • If the system status is Error, you can try the update again. Click the Error status, then click Retry.

Chapter 8. Configuring event notification

You can use the Red Hat Hybrid Cloud Console settings to configure notifications for events that happen in the edge management. At the moment, the following notifications are configurable:

  • Image Creation
  • Update Devices

Prerequisites

  • You have administrator access to the Red Hat Hybrid Cloud Console web user interface.
  • You have an account on Red Hat Customer Portal with an Insights subscription.

Procedure

To configure the notifications, you must:

  1. Create a behavior group.
  2. Select the Send an email action.
  3. Choose the recipients of that event notification.
  4. Associate it to the event type or types that you want.

With that, every time a device is updated or a new image is created, the group of recipients will be notified in an email about the changes.

To learn how to set email notifications, see Configuring notifications for recommendations.

Legal Notice

Copyright © 2024 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.