Chapter 5. Creating system images by using RHEL image builder web console interface

RHEL image builder is a tool for creating custom system images. To control RHEL image builder and create your custom system images, you can use the web console interface. Note that the command-line interface is the currently preferred alternative, because it offers more features.

5.1. Accessing the RHEL image builder dashboard in the RHEL web console

With the cockpit-composer plugin for the RHEL web console, you can manage image builder blueprints and composes using a graphical interface.

Prerequisites

  • You must have root access to the system.
  • You installed RHEL image builder.
  • You installed the cockpit-composer package.

Procedure

  1. On the host, open https://<_localhost_>:9090/ in a web browser.
  2. Log in to the web console as the root user.
  3. To display the RHEL image builder controls, click the Image Builder button, in the upper-left corner of the window.

    The RHEL image builder dashboard opens, listing existing blueprints, if any.

5.2. Creating a blueprint in the web console interface

Creating a blueprint is a necessary step before creating the customized RHEL system image. All the customizations are optional.

Note

These blueprint customizations are available for Red Hat Enterprise Linux 9.2 or later versions and Red Hat Enterprise Linux 8.8 or later versions.

Prerequisites

Procedure

  1. Click Create Blueprint in the upper-right corner.

    A dialog wizard with fields for the blueprint name and description opens.

  2. On the Details page:

    1. Enter the name of the blueprint and, optionally, its description.
    2. Click Next.
  3. Optional: In the Packages page:

    1. On the Available packages search, enter the package name
    2. Click the > button to move it to the Chosen packages field.
    3. Repeat the previous steps to search and include as many packages as you want.
    4. Click Next.

      Note

      These customizations are all optional unless otherwise specified.

  4. On the Kernel page, enter a kernel name and the command-line arguments.
  5. On the File system page, you can select Use automatic partitioning or Manually configure partitions for your image file system. For manually configuring the partitions, complete the following steps:

    1. Click the Manually configure partitions button.

      The Configure partitions section opens, showing the configuration based on Red Hat standards and security guides.

    2. From the dropdown menu, provide details to configure the partitions:

      1. For the Mount point field, select one of the following mount point type options:

        • / - the root mount point
        • /var
        • /home
        • /opt
        • /srv
        • /usr
        • /app
        • /data
        • /tmp
        • /usr/local

          You can also add an additional path to the Mount point, such as /tmp. For example: /var as a prefix and /tmp as an additional path results in /var/tmp.

          Note

          Depending on the Mount point type you choose, the file system type changes to xfs.

      2. For the Minimum size partition field of the file system, enter the needed minimum partition size. In the Minimum size dropdown menu, you can use common size units such as GiB, MiB, or KiB. The default unit is GiB.

        Note

        Minimum size means that RHEL image builder can still increase the partition sizes, in case they are too small to create a working image.

    3. To add more partitions, click the Add partition button. If you see the following error message: Duplicate partitions: Only one partition at each mount point can be created., you can:

      1. Click the Remove button to remove the duplicated partition.
      2. Choose a new mount point for the partition you want to create.
    4. After you finish the partitioning configuration, click Next.
  6. On the Services page, you can enable or disable services:

    1. Enter the service names you want to enable or disable, separating them by a comma, by space, or by pressing the Enter key. Click Next.
  7. On the Firewall page, set up your firewall setting:

    1. Enter the Ports, and the firewall services you want to enable or disable.
    2. Click the Add zone button to manage your firewall rules for each zone independently. Click Next.
  8. On the Users page, add a users by following the steps:

    1. Click Add user.
    2. Enter a Username, a password, and a SSH key. You can also mark the user as a privileged user, by clicking the Server administrator checkbox. Click Next.
  9. On the Groups page, add groups by completing the following steps:

    1. Click the Add groups button:

      1. Enter a Group name and a Group ID. You can add more groups. Click Next.
  10. On the SSH keys page, add a key:

    1. Click the Add key button.

      1. Enter the SSH key.
      2. Enter a User. Click Next.
  11. On the Timezone page, set your time zone settings:

    1. On the Timezone field, enter the time zone you want to add to your system image. For example, add the following time zone format: "US/Eastern".

      If you do not set a time zone, the system uses Universal Time, Coordinated (UTC) as default.

    2. Enter the NTP servers. Click Next.
  12. On the Locale page, complete the following steps:

    1. On the Keyboard search field, enter the package name you want to add to your system image. For example: ["en_US.UTF-8"].
    2. On the Languages search field, enter the package name you want to add to your system image. For example: "us". Click Next.
  13. On the Others page, complete the following steps:

    1. On the Hostname field, enter the hostname you want to add to your system image. If you do not add a hostname, the operating system determines the hostname.
    2. Mandatory only for the Simplifier Installer image: On the Installation Devices field, enter a valid node for your system image. For example: dev/sda1. Click Next.
  14. Mandatory only when building FIDO images: On the FIDO device onboarding page, complete the following steps:

    1. On the Manufacturing server URL field, enter the following information:

      1. On the DIUN public key insecure field, enter the insecure public key.
      2. On the DIUN public key hash field, enter the public key hash.
      3. On the DIUN public key root certs field, enter the public key root certs. Click Next.
  15. On the OpenSCAP page, complete the following steps:

    1. On the Datastream field, enter the datastream remediation instructions you want to add to your system image.
    2. On the Profile ID field, enter the profile_id security profile you want to add to your system image. Click Next.
  16. Mandatory only when building Ignition images: On the Ignition page, complete the following steps:

    1. On the Firstboot URL field, enter the package name you want to add to your system image.
    2. On the Embedded Data field, drag or upload your file. Click Next.
  17. . On the Review page, review the details about the blueprint. Click Create.

The RHEL image builder view opens, listing existing blueprints.

5.3. Importing a blueprint in the RHEL image builder web console interface

You can import and use an already existing blueprint. The system automatically resolves all the dependencies.

Prerequisites

  • You have opened the RHEL image builder app from the web console in a browser.
  • You have a blueprint that you want to import to use in the RHEL image builder web console interface.

Procedure

  1. On the RHEL image builder dashboard, click Import blueprint. The Import blueprint wizard opens.
  2. From the Upload field, either drag or upload an existing blueprint. This blueprint can be in either TOML or JSON format.
  3. Click Import. The dashboard lists the blueprint you imported.

Verification

When you click the blueprint you imported, you have access to a dashboard with all the customizations for the blueprint that you imported.

  • To verify the packages that have been selected for the imported blueprint, navigate to the Packages tab.

    • To list all the package dependencies, click All. The list is searchable and can be ordered.

Next steps

  • Optional: To modify any customization:

    • From the Customizations dashboard, click the customization you want to make a change. Optionally, you can click Edit blueprint to navigate to all the available customization options.

5.4. Exporting a blueprint from the RHEL image builder web console interface

You can export a blueprint to use the customizations in another system. You can export the blueprint in the TOML or in the JSON format. Both formats work on the CLI and also in the API interface.

Prerequisites

  • You have opened the RHEL image builder app from the web console in a browser.
  • You have a blueprint that you want to export.

Procedure

  1. On the image builder dashboard, select the blueprint you want to export.
  2. Click Export blueprint. The Export blueprint wizard opens.
  3. Click the Export button to download the blueprint as a file or click the Copy button to copy the blueprint to the clipboard.

    1. Optionally, click the Copy button to copy the blueprint.

Verification

  • Open the exported blueprint in a text editor to inspect and review it.

5.5. Creating a system image by using RHEL image builder in the web console interface

You can create a customized RHEL system image from a blueprint by completing the following steps.

Prerequisites

  • You opened the RHEL image builder app from the web console in a browser.
  • You created a blueprint.

Procedure

  1. In the RHEL image builder dashboard, click the blueprint tab.
  2. On the blueprint table, find the blueprint you want to build an image.
  3. On the right side of the chosen blueprint, click Create Image. The Create image dialog wizard opens.
  4. On the Image output page, complete the following steps:

    1. From the Select a blueprint list, select the image type you want.
    2. From the Image output type list, select the image output type you want.

      Depending on the image type you select, you need to add further details.

  5. Click Next.
  6. On the Review page, review the details about the image creation and click Create image.

    The image build starts and takes up to 20 minutes to complete.

Verification

After the image finishes building, you can:

  • Download the image.

    • On the RHEL image builder dashboard, click the Node options (⫶) menu and select Download image.
  • Download the logs of the image to inspect the elements and verify if any issue is found.

    • On the RHEL image builder dashboard, click the Node options (⫶) menu and select Download logs.