3.2. Composing, Installing, and Managing RHEL For Edge Images
3.2. Composing, Installing, and Managing RHEL For Edge Images
Creating, deploying, and managing Edge systems with Red Hat Enterprise Linux Red
Hat Enterprise Linux 9
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.
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.
Abstract
Use the image builder tool to compose customized RHEL (rpm-ostree) images optimized for Edge.
Then, you can remotely install, and securely manage and scale deployments of the images on Edge
servers.
Table of Contents
Table of Contents
. . . . . . . . . .OPEN
MAKING . . . . . . SOURCE
. . . . . . . . . .MORE
. . . . . . .INCLUSIVE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . . . . .
. . . . . . . . . . . . . FEEDBACK
PROVIDING . . . . . . . . . . . . ON
. . . .RED
. . . . .HAT
. . . . .DOCUMENTATION
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5. . . . . . . . . . . . .
.CHAPTER
. . . . . . . . . . 1.. .INTRODUCING
. . . . . . . . . . . . . . . .RHEL
. . . . . .FOR
. . . . .EDGE
. . . . . . IMAGES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6. . . . . . . . . . . . .
1.1. RHEL FOR EDGE—SUPPORTED ARCHITECTURE 6
1.2. HOW TO COMPOSE AND DEPLOY A RHEL FOR EDGE IMAGE 6
1.3. NON-NETWORK-BASED DEPLOYMENTS 8
1.4. NETWORK-BASED DEPLOYMENTS 9
1.5. DIFFERENCE BETWEEN RHEL RPM IMAGES AND RHEL FOR EDGE IMAGES 10
.CHAPTER
. . . . . . . . . . 2.
. . SETTING
. . . . . . . . . . UP
. . . .IMAGE
. . . . . . . BUILDER
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
..............
2.1. IMAGE BUILDER SYSTEM REQUIREMENTS 12
2.2. INSTALLING IMAGE BUILDER 12
.CHAPTER
. . . . . . . . . . 3.
. . MANAGING
. . . . . . . . . . . . . IMAGE
. . . . . . . .BUILDER
. . . . . . . . . REPOSITORIES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
..............
3.1. IMAGE BUILDER DEFAULT SYSTEM REPOSITORIES 14
3.2. OVERRIDING A SYSTEM REPOSITORY 14
3.3. OVERRIDING A SYSTEM REPOSITORY WITH SUPPORT FOR SUBSCRIPTIONS 15
. . . . . . . . . . . 4.
CHAPTER . . .COMPOSING
. . . . . . . . . . . . . .A. .RHEL
. . . . . .FOR
. . . . .EDGE
. . . . . . IMAGE
. . . . . . . .USING
. . . . . . . IMAGE
. . . . . . . .BUILDER
. . . . . . . . . .IN
. . RHEL
. . . . . . WEB
. . . . . .CONSOLE
. . . . . . . . . . . . . . 17
..............
4.1. ACCESSING IMAGE BUILDER IN THE RHEL WEB CONSOLE 17
4.2. CREATING A BLUEPRINT FOR THE RHEL FOR EDGE COMMIT IMAGE USING IMAGE BUILDER IN RHEL
WEB CONSOLE 18
4.3. CREATING A RHEL FOR EDGE COMMIT IMAGE USING IMAGE BUILDER IN RHEL WEB CONSOLE 18
4.4. CREATING A RHEL FOR EDGE CONTAINER IMAGE USING IMAGE BUILDER IN RHEL WEB CONSOLE 19
4.5. CREATING A RHEL FOR EDGE INSTALLER IMAGE USING IMAGE BUILDER IN RHEL WEB CONSOLE 21
4.6. DOWNLOADING A RHEL FOR EDGE IMAGE 23
4.7. ADDITIONAL RESOURCES 23
. . . . . . . . . . . 5.
CHAPTER . . COMPOSING
. . . . . . . . . . . . . . .A. .RHEL
. . . . . .FOR
. . . . .EDGE
. . . . . . IMAGE
. . . . . . . .USING
. . . . . . .IMAGE
. . . . . . . .BUILDER
. . . . . . . . . COMMAND-LINE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
..............
5.1. NETWORK-BASED DEPLOYMENTS WORKFLOW 24
5.1.1. Creating a RHEL for Edge Commit image blueprint using image builder command-line interface 24
5.1.2. Creating a RHEL for Edge Commit image using image builder command-line interface 26
5.1.3. Creating a RHEL for Edge image update with a ref commit using image builder command-line interface
27
5.1.4. Downloading a RHEL for Edge image using the image builder command-line interface 29
5.2. NON-NETWORK-BASED DEPLOYMENTS WORKFLOW 29
5.2.1. Creating a RHEL for Edge Container blueprint using image builder CLI 30
5.2.2. Creating a RHEL for Edge Installer blueprint using image builder CLI 31
5.2.3. Creating a RHEL for Edge Container image using image builder CLI 32
5.2.4. Creating a RHEL for Edge Installer image using command-line interface for non-network-based
deployments 33
5.2.5. Downloading a RHEL for Edge Installer image using the image builder CLI 34
5.3. SUPPORTED IMAGE CUSTOMIZATIONS 35
5.4. ADDITIONAL RESOURCES 40
.CHAPTER
. . . . . . . . . . 6.
. . .BUILDING
. . . . . . . . . . SIMPLIFIED
. . . . . . . . . . . . .INSTALLER
. . . . . . . . . . . . IMAGES
. . . . . . . . . TO
. . . .PROVISION
. . . . . . . . . . . .A
. . RHEL
. . . . . . .FOR
. . . . .EDGE
. . . . . .IMAGE
. . . . . . . . . . . . . . 41
..............
6.1. SIMPLIFIED INSTALLER IMAGE BUILD AND DEPLOYMENT 41
6.2. CREATING A BLUEPRINT FOR A SIMPLIFIED IMAGE USING IMAGE BUILDER CLI 42
6.3. CREATING A RHEL FOR EDGE SIMPLIFIED INSTALLER IMAGE USING IMAGE BUILDER CLI 43
6.4. DOWNLOADING A SIMPLIFIED RHEL FOR EDGE IMAGE USING THE IMAGE BUILDER COMMAND-LINE
INTERFACE 44
6.5. SETTING UP AN UEFI HTTP BOOT SERVER 45
1
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
. . . . . . . . . . . 7.
CHAPTER . . AUTOMATICALLY
. . . . . . . . . . . . . . . . . . . .PROVISIONING
. . . . . . . . . . . . . . . .AND
. . . . . ONBOARDING
. . . . . . . . . . . . . . . .RHEL
. . . . . .FOR
. . . . .EDGE
. . . . . . DEVICES
. . . . . . . . . .WITH
. . . . . .FDO
...................
48
7.1. THE FIDO DEVICE ONBOARDING (FDO) PROCESS 48
7.2. AUTOMATICALLY PROVISIONING AND ONBOARDING RHEL FOR EDGE DEVICES 51
7.3. GENERATING KEY AND CERTIFICATES 52
7.4. INSTALLING THE MANUFACTURING SERVER PACKAGE 53
7.5. AUTOMATICALLY ONBOARDING AN RHEL FOR EDGE DEVICE BY USING FDO AUTHENTICATION 54
.CHAPTER
. . . . . . . . . . 8.
. . .DEPLOYING
. . . . . . . . . . . . .A. .RHEL
. . . . . .FOR
. . . . .EDGE
. . . . . . .IMAGE
. . . . . . .IN
. . .A. .NETWORK-BASE
. . . . . . . . . . . . . . . . . .ENVIRONMENT
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56
..............
8.1. EXTRACTING RHEL FOR EDGE IMAGE COMMIT 56
8.2. SETTING UP A WEB SERVER TO INSTALL RHEL FOR EDGE IMAGES 58
8.3. DOWNLOADING RHEL BOOT.ISO IMAGE 60
8.4. INSTALLING THE RHEL FOR EDGE IMAGE USING A KICKSTART FILE 60
.CHAPTER
. . . . . . . . . . 9.
. . .DEPLOYING
. . . . . . . . . . . . .A. .RHEL
. . . . . .FOR
. . . . .EDGE
. . . . . . .IMAGE
. . . . . . .IN
. . .A. .NON-NETWORK-BASE
. . . . . . . . . . . . . . . . . . . . . . . .ENVIRONMENT
. . . . . . . . . . . . . . . . . . . . . . . . .63
..............
9.1. CREATING A RHEL FOR EDGE CONTAINER IMAGE FOR NON-NETWORK-BASED DEPLOYMENTS 63
9.2. CREATING A RHEL FOR EDGE INSTALLER IMAGE FOR NON-NETWORK-BASED DEPLOYMENTS 64
9.3. INSTALLING THE RHEL FOR EDGE IMAGE FOR NON-NETWORK-BASED DEPLOYMENTS 65
.CHAPTER
. . . . . . . . . . 10.
. . . MANAGING
. . . . . . . . . . . . .RHEL
. . . . . . FOR
. . . . . EDGE
. . . . . . .IMAGES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68
..............
10.1. EDITING A RHEL FOR EDGE IMAGE BLUEPRINT USING IMAGE BUILDER IN RHEL WEB CONSOLE 68
10.1.1. Adding a component to RHEL for Edge image blueprint using image builder in RHEL web console 68
10.1.2. Changing the version of an existing component in a RHEL for Edge image blueprint using the RHEL web
console 69
10.1.3. Removing a component from RHEL for Edge image blueprint using image builder in RHEL web console
69
10.1.4. Editing a RHEL for Edge image blueprint using command-line interface 70
10.2. UPDATING RHEL FOR EDGE IMAGES 71
10.2.1. How are RHEL for Edge image updates deployed 71
10.2.2. Deploying RHEL for Edge image updates manually 73
10.2.3. Deploying RHEL for Edge image updates manually using the command-line 75
10.2.4. Deploying RHEL for Edge image updates manually for non-network-base deployments 77
10.3. UPGRADING RHEL FOR EDGE SYSTEMS 79
10.3.1. Upgrading your RHEL 8 system to RHEL 9 79
10.4. DEPLOYING RHEL FOR EDGE AUTOMATIC IMAGE UPDATES 82
10.4.1. Updating the RHEL for Edge image update policy 82
10.4.2. Enabling RHEL for Edge automatic download and staging of updates 83
10.5. ROLLING BACK RHEL FOR EDGE IMAGES 84
10.5.1. How are RHEL for Edge images rolled back 84
10.5.2. Rolling back RHEL for Edge images manually 85
10.5.3. Rolling back RHEL for Edge images using an automated process 85
. . . . . . . . . . . .A.
APPENDIX . . TERMINOLOGY
. . . . . . . . . . . . . . . . . AND
. . . . . COMMANDS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88
..............
A.1. OSTREE AND RPM-OSTREE TERMINOLOGY 88
A.2. OSTREE COMMANDS 88
A.3. RPM-OSTREE COMMANDS 89
A.4. FDO AUTOMATIC ONBOARDING TERMINOLOGY 90
A.5. FDO AUTOMATIC ONBOARDING TECHNOLOGIES 91
2
Table of Contents
3
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
4
PROVIDING FEEDBACK ON RED HAT DOCUMENTATION
1. View the documentation in the Multi-page HTML format and ensure that you see the
Feedback button in the upper right corner after the page fully loads.
2. Use your cursor to highlight the part of the text that you want to comment on.
3. Click the Add Feedback button that appears near the highlighted text.
4. Enter your suggestion for improvement in the Description field. Include links to the relevant
parts of the documentation.
5
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
Base OS package
Differently from RHEL images, RHEL for Edge is an immutable operating system, that is, it contains a
read-only root directory with the following characteristics:
Package installs create layers that make it easy to rollback to previous versions
You can deploy a RHEL for Edge image on Bare Metal, Appliance, and Edge servers.
You can compose customized RHEL for Edge images using the image builder tool. You can also create
RHEL for Edge images by accessing the edge management application in the Red Hat Hybrid Cloud
Console platform and configure automated management.
The edge management application simplifies the way you can provision and register your images. To
learn more about the edge management, see the Create RHEL for Edge images and configure
automated management documentation.
With a RHEL for Edge image, you can achieve the following:
NOTE
6
CHAPTER 1. INTRODUCING RHEL FOR EDGE IMAGES
Composing and deploying a RHEL for Edge image involves two phases:
1. Composing a RHEL rpm-ostree image using the image builder tool. You can access image
builder through a command-line interface in the composer-cli tool, or use a graphical user
interface in the RHEL web console.
While composing a RHEL for Edge image, you can select any of the following image types. Composing
the different RHEL for Edge images might or might not require network access. See the table:
7
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
The image types vary in terms of their contents, and are therefore suitable for different types of
deployment environments.
Additional resources
You can access image builder through a command-line interface in the composer-cli tool, or use a
graphical user interface in the RHEL web console.
Composing and deploying a RHEL for Edge image in non-network-based deployments involves the
following high-level steps:
3. Using image builder, create a blueprint with customizations for RHEL for Edge Container image
5. Create a RHEL for Edge image embed in an OCI container with a webserver ready to deploy the
commit as an OSTree repository
7. Deploy the container serving a repository with the RHEL for Edge Container commit
8. Using image builder, create another blueprint for RHEL for Edge Installer image
9. Create a RHEL for Edge Installer image configured to pull the commit from the running
container embedded with RHEL for Edge Container image
8
CHAPTER 1. INTRODUCING RHEL FOR EDGE IMAGES
The following diagram represents the RHEL for Edge image non-network deployment workflow:
You can access image builder through a command-line interface in the composer-cli tool, or use a
graphical user interface in the RHEL web console.
You can compose and deploy the RHEL for Edge image by performing the following high-level steps:
3. Using image builder, create a blueprint for RHEL for Edge image
9. Create the RHEL for Edge Installer (.iso) image, pointing at the OSTree content from the RHEL
for Edge Commit (.tar) artifact
9
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
10. Download the RHEL for Edge installer ISO image you created
11. Boot the edge device using the RHEL for Edge Installer ISO image
The following diagram represents the RHEL for Edge network image deployment workflow:
1.5. DIFFERENCE BETWEEN RHEL RPM IMAGES AND RHEL FOR EDGE
IMAGES
You can create RHEL system images in traditional package-based RPM format and also as RHEL for
Edge (rpm-ostree) images.
You can use the traditional package-based RPMs to deploy RHEL on traditional data centers. However,
with RHEL for Edge images you can deploy RHEL on servers other than traditional data centers. These
servers include systems where processing of large amounts of data is done closest to the source where
data is generated—Edge servers.
The RHEL for Edge (rpm-ostree) images are not a package manager. They only support complete
bootable file system trees, not individual files. These images do not have information regarding the
individual files such as how these files were generated or anything related to their origin.
The rpm-ostree images need a separate mechanism, the package manager, to install additional
applications in the /var directory. With that, the rpm-ostree image keeps the operating system
unchanged, while maintaining the state of the /var and /etc directories. The atomic updates enable
rollbacks and background staging of updates.
10
CHAPTER 1. INTRODUCING RHEL FOR EDGE IMAGES
Refer to the following table to know how RHEL for Edge images differ from the package-based RHEL
RPM images.
Table 1.2. Difference between RHEL RPM images and RHEL for Edge images
OS assembly You can assemble the packages The packages are assembled in an
locally to form an image. ostree which you can install on a
system.
OS updates You can use dnf update to apply You can use rpm-ostree
the available updates from the upgrade to stage an update if
enabled repositories. any new commit is available in the
ostree remote at
/etc/ostree/remotes.d/ . The
update takes effect on system
reboot.
Data persistence You can mount the image to any /etc & /var are read-write
non tmpfs mount point enabled and include persisting
data.
11
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
NOTE
In the environment where you want to install image builder, ensure that you first meet the system
requirements and then install it.
Processor 2 cores
Memory 4 GiB
NOTE
The 20 GiB disk space requirement is enough to install and run image builder in the host.
To build and deploy image builds, you must allocate additional dedicated disk space.
Prerequisites
You have installed RHEL and you have subscribed to RHSM or Red Hat Satellite.
Procedure
12
CHAPTER 2. SETTING UP IMAGE BUILDER
osbuild-composer
composer-cli
cockpit-composer
bash-completion
firewalld
5. Load the shell configuration script so that the autocomplete feature for the composer-cli
command starts working immediately without reboot:
$ source /etc/bash_completion.d/composer-cli
Additional resources
Managing repositories.
13
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
The configuration files are not in the usual DNF repository format known from the files in
/etc/yum.repos.d/. Instead, they are simple JSON files.
Prerequisites
You have a custom repository that is accessible from the host system
Procedure
3. Create a JSON file, using a name corresponding to your RHEL version. Alternatively, you can
copy the file for your distribution from /usr/share/osbuild-composer/ and modify its content.
For RHEL 9, use /etc/osbuild-composer/repositories/rhel-91.json.
{
"<ARCH>": [
{
"name": "baseos",
"baseurl": "http://mirror.example.com/composes/released/RHEL-
9/9.0/BaseOS/x86_64/os/",
"gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\n (…)",
"check_gpg": true,
"metadata_expire": ""
}
]
}
14
CHAPTER 3. MANAGING IMAGE BUILDER REPOSITORIES
metalink - string: a URL of a metalink file that contains a list of valid mirror repositories.
mirrorlist - string: a URL of a mirrorlist file that contains a list of valid mirror repositories
The remaining fields are optional.
a. Alternatively, you can copy the JSON file for your distribution.
i. Copy the repository file to the directory you created. In the following command,
replace rhel-version.json with your RHEL version, for example: rhel-9.json.
$ cp /usr/share/osbuild-composer/repositories/rhel-version.json /etc/osbuild-
composer/repositories/
5. Using a text editor, edit the baseurl paths in the rhel-9.json file and save it. For example:
$ vi /etc/osbuild-composer/repositories/rhel-version.json
Verification
$ cat /etc/yum.repos.d/redhat.repo
You can see that the repository points to the correct URLs which are copied from the
/etc/yum.repos.d/redhat.repo file.
Additional resources
Prerequisites
15
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
Procedure
# cat /etc/yum.repos.d/redhat.repo
[AppStream]
name = AppStream mirror example
baseurl = https://mirror.example.com/RHEL-9/9.0/AppStream/x86_64/os/
enabled = 1
gpgcheck = 0
sslverify = 1
sslcacert = /etc/pki/ca1/ca.crt
sslclientkey = /etc/pki/ca1/client.key
sslclientcert = /etc/pki/ca1/client.crt
metadata_expire = 86400
enabled_metadata = 0
2. Configure the repository override to use the same baseurl and set rhsm to true:
{
"x86_64": [
{
"name": "AppStream mirror example",
"baseurl": "https://mirror.example.com/RHEL-9/9.0/AppStream/x86_64/os/",
"gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\n (…)",
"check_gpg": true,
"rhsm": true
}
]
}
NOTE
As a result, image builder reads the /etc/yum.repos.d/redhat.repo file from the host system and uses it
as a source of subscriptions.
Additional resources
16
CHAPTER 4. COMPOSING A RHEL FOR EDGE IMAGE USING IMAGE BUILDER IN RHEL WEB CONSOLE
To access image builder and to create your custom RHEL for Edge image, you can either use the RHEL
web console interface or the command-line interface.
You can compose RHEL for Edge images using image builder in RHEL web console by performing the
following high-level steps:
3. Create a RHEL for Edge image. You can create the following images:
Prerequisites
You have subscribed the RHEL system to Red Hat Subscription Manager (RHSM) or to Red Hat
Satellite Server.
Procedure
2. For more information about how to remotely access image builder, see Managing systems using
the RHEL 9 web console document.
The image builder dashboard opens in the right pane. You can now proceed to create a
17
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
The image builder dashboard opens in the right pane. You can now proceed to create a
blueprint for the RHEL for Edge images.
Prerequisites
Procedure
2. Specify a name, and optionally, a description for the blueprint that you want to create.
3. Click Create.
The image builder dashboard lists the blueprints that you created.
To create a RHEL for Edge Commit image using image builder in RHEL web console, follow the steps:
Prerequisites
Procedure
1. On the image builder dashboard, for the blueprint that you have created for RHEL for Edge
Commit image, click Create Image.
To search for a specific blueprint, enter the blueprint name in the Filter By Name text box, and
then press Enter.
a. On the Image output page, from the Image output type dropdown list, select “RHEL for
Edge Commit (.tar)” for network-based deployment.
i. Repository URL: specify the URL to the OSTree repository of the commit to embed in
the image. For example, http://10.0.2.2:8080/repo/.
ii. Parent commit: specify a previous commit, or leave it empty if you do not have a
commit at this time.
iii. In the Ref textbox, specify a reference path for where your commit is going to be
18
CHAPTER 4. COMPOSING A RHEL FOR EDGE IMAGE USING IMAGE BUILDER IN RHEL WEB CONSOLE
iii. In the Ref textbox, specify a reference path for where your commit is going to be
created. By default, the web console specifies rhel/9/$ARCH/edge. The "$ARCH" value
is determined by the host machine. Click Next.
i. Enter a hostname. If you leave the field empty, the system determines the hostname.
Click Next.
ii. Optional: enter a SSH key, and check the Server administrator field. Click Next.
i. From the Available packages search field, enter the package you want to add.
B. Optional: click the >> button to select all the packages. Click Next.
4. Click Create.
Image builder starts to create a RHEL for Edge Commit image for the blueprint that you
created.
NOTE
Verification
After the image creation process is complete, you can download the resulting “RHEL for Edge Commit
(.tar)” image.
Additional resources
19
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
Follow the steps in this procedure to create a RHEL for Edge Container image using image builder in
RHEL web console.
Prerequisites
Procedure
1. On the image builder dashboard, for the blueprint that you have created for RHEL for Edge
Container image, click Create Image. To search for a specific blueprint, enter the blueprint
name in the Filter By Name text box, and then press Enter.
a. On the Image output page, from the Image output type dropdown list, select “RHEL for
Edge Container (.tar)” for network-based deployment.
i. Repository URL: specify the URL to the OSTree repository of the commit to embed in
the image. For example, http://10.0.2.2:8080/repo/. By default, the repository folder
for a RHEL for Edge Container image is "/repo".
To find the correct URL to use, access the running container and check the nginx.conf
file. To find which URL to use, access the running container and check the nginx.conf
file. Inside the nginx.conf file, find the root directory entry to search for the /repo/
folder information. Note that, if you do not specify a repository URL when creating a
RHEL for Edge Container image (.tar) using image builder, the default /repo/ entry is
created in the`nginx.conf` file.
ii. Parent commit: specify a previous commit, or leave it empty if you do not have a
commit at this time.
iii. In the Ref textbox, specify a reference path for where your commit is going to be
created. By default, the web console specifies rhel/9/$ARCH/edge. The "$ARCH" value
is determined by the host machine. Click Next.
i. Enter a hostname. If you leave the field empty, the system determines the hostname.
Click Next.
ii. Optional: enter a SSH key, and check the Server administrator field. Click Next.
i. From the Available packages search field, enter the package you want to add.
20
CHAPTER 4. COMPOSING A RHEL FOR EDGE IMAGE USING IMAGE BUILDER IN RHEL WEB CONSOLE
B. Optional: click the >> button to select all the packages. Click Next.
4. Click Create.
Image builder starts to create a RHEL for Edge Commit image for the blueprint that you
created.
NOTE
Verification
After the image creation process is complete, you can download the resulting “RHEL for Edge
Container (.tar)” image.
Additional resources
Follow the steps in this procedure to create a RHEL for Edge image using image builder in RHEL web
console.
Prerequisites
You created a RHEL for Edge Container image and loaded it into a running container. See
Creating a RHEL for Edge Container image for non-network-based deployments .
Procedure
1. On the image builder dashboard, for the blueprint that you have created for RHEL for Edge
Installer image, click Create Image.
To search for a specific blueprint, enter the blueprint name in the Filter By Name text box, and
then press Enter.
21
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
3. On the Image output page, from the Image output type dropdown list, select RHEL for Edge
Installer (.iso) image .
i. Repository URL: specify the URL to the OSTree repository of the commit to embed in
the image. For example, http://10.0.2.2:8080/repo/.
ii. In the Ref textbox, specify a reference path for where your commit is going to be
created. By default, the web console specifies rhel/9/$ARCH/edge. The "$ARCH" value
is determined by the host machine. Click Next.
i. Enter a hostname. If you leave the field empty, the system determines the hostname.
Click Next.
ii. Optional: enter a SSH key, and check the Server administrator field. Click Next.
i. From the Available packages search field, enter the package you want to add.
B. Optional: click the >> button to select all the packages. Click Next.
5. Click Create.
Image builder starts to create a RHEL for Edge Commit image for the blueprint that you
created.
NOTE
Verification
After the image creation process is complete, you can download the resulting RHEL for Edge Installer
(.iso) image.
a. From the Type dropdown list, select RHEL for Edge Installer (.iso).
b. In the Repository URL textbox, specify the URL to the running container OSTree repository of
the commit to embed in the image. For example, http://10.0.2.2:8080/repo/.
22
CHAPTER 4. COMPOSING A RHEL FOR EDGE IMAGE USING IMAGE BUILDER IN RHEL WEB CONSOLE
c. The Parent commit textbox, you can specify a previous commit, or leave it empty; if you do not
have a commit at this time.
d. In the Ref textbox, the reference path must match the Ref from the RHEL for Edge Container
image compose.
1. Click Create.
Image builder starts to create a RHEL for Edge Installer image for the blueprint that you
created.
NOTE
After the image creation process is complete, you can download the resulting RHEL for Edge Installer
(.iso) image and boot the ISO image into a device.
Additional resources
Procedure
To download an image:
The downloaded file consists of a .tar file with an OSTree repository for RHEL for Edge Commit and
RHEL for Edge Container images, or a .iso file for RHEL for Edge Installer images, with an OSTree
repository. This repository contains the commit and a json file which contains information metadata
about the repository content.
23
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
To access image builder and to create your custom RHEL for Edge image, you can either use the RHEL
web console interface or the command-line interface.
For Network-based deployments, the workflow to compose RHEL for Edge images using the CLI,
involves the following high-level steps:
For Non-Network-based deployments, the workflow to compose RHEL for Edge images using the CLI,
involves the following high-level steps:
NOTE
To run the composer-cli commands as non-root, you must be part of the weldr group or
you must have administrator access to the system.
5.1.1. Creating a RHEL for Edge Commit image blueprint using image builder
command-line interface
Create a blueprint for RHEL for Edge Commit image using the CLI.
Prerequisite
You do not have an existing blueprint. To verify that, list the existing blueprints:
24
CHAPTER 5. COMPOSING A RHEL FOR EDGE IMAGE USING IMAGE BUILDER COMMAND-LINE
Procedure
1. Create a plain text file in the TOML format, with the following content:
name = "blueprint-name"
description = "blueprint-text-description"
version = "0.0.1"
modules = [ ]
groups = [ ]
Where,
Modules describe the package name and matching version glob to be installed into the
image, for example, the package name = "tmux" and the matching version glob is version =
"2.9a".
Notice that currently there are no differences between packages and modules.
Groups are packages groups to be installed into the image, for example the group package
anaconda-tools.
At this time, if you do not know the modules and groups, leave them empty.
2. Include the required packages and customize the other details in the blueprint to suit your
requirements.
For every package that you want to include in the blueprint, add the following lines to the file:
[[packages]]
name = "package-name"
version = "package-version"
Where,
package-version is the version number of the package that you want to use.
The package-version supports the following dnf version specifications:
For a specific version, use the exact version number such as 9.0.
4. List the existing blueprints to check whether the created blueprint is successfully pushed and
exists.
5. Check whether the components and versions listed in the blueprint and their dependencies are
25
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
5. Check whether the components and versions listed in the blueprint and their dependencies are
valid:
Additional resources
5.1.2. Creating a RHEL for Edge Commit image using image builder command-line
interface
To create a RHEL for Edge Commit image using image builder command-line interface, ensure that you
have met the following prerequisites and follow the procedure.
Prerequisites
You have created a blueprint for RHEL for Edge Commit image.
Procedure
Where,
NOTE
26
CHAPTER 5. COMPOSING A RHEL FOR EDGE IMAGE USING IMAGE BUILDER COMMAND-LINE
After the image is ready, you can download it and use the image on your network deployments.
Additional resources
5.1.3. Creating a RHEL for Edge image update with a ref commit using image builder
command-line interface
If you performed a change in an existing blueprint, for example, you added a new package, and you want
to update an existing RHEL for Edge image with this new package, you can use the --parent argument to
generate an updated RHEL for Edge Commit (.tar) image. The --parent argument must be a ref that
exists in the repository specified by the URL argument. The --ref argument enables you to specify an
existing ref that retrieves a parent for the new commit that you are building. You must specify the
parent commit as a ref value to be resolved and pulled, not as a commit ID, for example
rhel/9/x86_64/edge. When you specify the parent commit as a ref value, image builder can read
information from the parent commit that will affect parts of the new commit that you are building. As a
result, image builder reads the parent commit’s user database and preserves UIDs and GIDs for the
package-created system users and groups.
To create a RHEL for Edge image with a parent argument using image builder CLI, ensure that you have
met the following prerequisites and follow the procedure.
Prerequisites
You have updated an existing blueprint for RHEL for Edge image.
You have an existing RHEL for Edge image (OSTree commit). See Extracting RHEL for Edge
image commit.
The ref being built is available at the OSTree repository specified by the URL.
Procedure
For example:
To create a new RHEL for Edge commit based on a parent and with a new ref, run the
following command::
To create a new RHEL for Edge commit based on the same ref, run the following command:
27
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
Where:
The --ref argument specifies the same path value that you used to build an OSTree
repository.
The --parent argument specifies the parent commit as a ref to be resolved and pulled,
not as a commit ID, for example rhel/9/x86_64/edge.
The --url argument specifies the URL to the OSTree repository of the commit to
embed in the image, for example, http://10.0.2.2:8080/repo.
NOTE
The --parent argument can only be used for the RHEL for Edge
Commit (.tar) image type. Using the --url and --parent arguments
together results in errors with the RHEL for Edge Container (.tar)
image type.
If you omit the parent ref argument, the system falls back to the ref
specified by the --ref argument.
A confirmation that the composer process has been added to the queue appears. It also
shows a Universally Unique Identifier (UUID) number for the image created. Use the
UUID number to track your build. Also keep the UUID number handy for further tasks.
NOTE
After the image creation is complete, to upgrade an existing OSTree deployment, you need:
28
CHAPTER 5. COMPOSING A RHEL FOR EDGE IMAGE USING IMAGE BUILDER COMMAND-LINE
Add this repository as a remote, that is, the http or https endpoint that hosts the OSTree
content.
Pull the new OSTree commit onto their existing running instance. See Deploying RHEL for Edge
image updates manually .
Additional resources
Downloading a RHEL for Edge image using the image builder command-line interface .
5.1.4. Downloading a RHEL for Edge image using the image builder command-line
interface
To download a RHEL for Edge image using image builder command line interface, ensure that you have
met the following prerequisites and then follow the procedure.
Prerequisites
Procedure
Image builder downloads the image as a tar file to the current directory.
$ <UUID>-commit.tar: size MB
The image contains a commit and a json file with information metadata about the repository content.
Additional resources
29
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
5.2.1. Creating a RHEL for Edge Container blueprint using image builder CLI
To create a blueprint for RHEL for Edge Container image, perform the following steps:
Procedure
1. Create a plain text file in the TOML format, with the following content:
name = "blueprint-name"
description = "blueprint-text-description"
version = "0.0.1"
modules = [ ]
groups = [ ]
Where,
Modules describe the package name and matching version glob to be installed into the
image, for example, the package name = "tmux" and the matching version glob is version =
"2.9a".
Notice that currently there are no differences between packages and modules.
Groups are packages groups to be installed into the image, for example the group package
anaconda-tools.
At this time, if you do not know the modules and groups, leave them empty.
2. Include the required packages and customize the other details in the blueprint to suit your
requirements.
For every package that you want to include in the blueprint, add the following lines to the file:
[[packages]]
name = "package-name"
version = "package-version"
Where,
package-version is the version number of the package that you want to use.
The package-version supports the following dnf version specifications:
For a specific version, use the exact version number such as 9.0.
4. List the existing blueprints to check whether the created blueprint is successfully pushed and
30
CHAPTER 5. COMPOSING A RHEL FOR EDGE IMAGE USING IMAGE BUILDER COMMAND-LINE
4. List the existing blueprints to check whether the created blueprint is successfully pushed and
exists.
5. Check whether the components and versions listed in the blueprint and their dependencies are
valid:
Additional resources
5.2.2. Creating a RHEL for Edge Installer blueprint using image builder CLI
You can create a blueprint to build a RHEL for Edge Installer (.iso) image, and specify user accounts to
automatically create one or more users on the system at installation time. See Creating an
administrative user account for a RHEL for Edge image blueprint. It creates a user on the system at
installation time.
WARNING
To create a blueprint for RHEL for Edge Installer image, perform the following steps:
Procedure
1. Create a plain text file in the TOML format, with the following content:
name = "blueprint-installer"
description = "blueprint-for-installer-image"
version = "0.0.1"
[[customizations.user]]
name = "user"
description = "account"
password = "user-password"
key = "user-ssh-key "
home = "path"
groups = ["user-groups"]
31
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
Where,
3. List the existing blueprints to check whether the created blueprint is successfully pushed and
exists.
4. Check whether the components and versions listed in the blueprint and their dependencies are
valid:
Additional resources
5.2.3. Creating a RHEL for Edge Container image using image builder CLI
To create a RHEL for Edge Container image using image builder command-line interface, ensure that
you have met the following prerequisites and follow the procedure.
Prerequisites
You have created a blueprint for RHEL for Edge Container image.
Procedure
Where,
--ref is the same value that customer used to build ostree repository
--url is the URL to the OSTree repository of the commit to embed in the image. For
example, http://10.0.2.2:8080/repo/. By default, the repository folder for a RHEL for Edge
Container image is "/repo". See Setting up a web server to install RHEL for Edge image .
To find the correct URL to use, access the running container and check the nginx.conf file.
To find which URL to use, access the running container and check the nginx.conf file. Inside
the nginx.conf file, find the root directory entry to search for the /repo/ folder information.
Note that, if you do not specify a repository URL when creating a RHEL for Edge Container
image (.tar) using image builder, the default /repo/ entry is created in the`nginx.conf` file.
32
CHAPTER 5. COMPOSING A RHEL FOR EDGE IMAGE USING IMAGE BUILDER COMMAND-LINE
NOTE
After the image is ready, it can be used for non-network deployments. See Creating a RHEL
for Edge Container image for non-network-based deployments.
Additional resources
5.2.4. Creating a RHEL for Edge Installer image using command-line interface for
non-network-based deployments
To create a RHEL for Edge Installer image that embeds the OSTree commit, using image builder
command-line interface, ensure that you have met the following prerequisites and then follow the
procedure.
Prerequisites
You have created a blueprint for RHEL for Edge Installer image.
You have created a RHEL for Edge Edge Container image and deployed it using a web server.
Procedure
33
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
Where,
ref is the same value that customer used to build ostree repository
URL-OSTree-repository is the URL to the OSTree repository of the commit to embed in the
image. For example, http://10.0.2.2:8080/repo. See Creating a RHEL for Edge Container
image for non-network-based deployments.
image-type is edge-installer.
A confirmation that the composer process has been added to the queue appears. It also
shows a Universally Unique Identifier (UUID) number for the image created. Use the UUID
number to track your build. Also keep the UUID number handy for further tasks.
NOTE
After the image is ready, you can use it for non-network deployments. See Installing the RHEL
for Edge image for non-network-based deployments.
5.2.5. Downloading a RHEL for Edge Installer image using the image builder CLI
To download a RHEL for Edge Installer image using image builder command line interface, ensure that
you have met the following prerequisites and then follow the procedure.
Prerequisites
Procedure
34
CHAPTER 5. COMPOSING A RHEL FOR EDGE IMAGE USING IMAGE BUILDER COMMAND-LINE
Image builder downloads the image as an .iso file to the current directory.
$ <UUID>-boot.iso: size MB
Additional resources
NOTE
These customizations are not supported when using image builder in the web console.
[[packages]]
name = "package_group_name"
Replace "package_group_name" with the name of the group. For example, "@server with gui".
[customizations]
hostname = "baseimage"
[[customizations.user]]
name = "USER-NAME"
description = "USER-DESCRIPTION"
password = "PASSWORD-HASH"
35
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
key = "PUBLIC-SSH-KEY"
home = "/home/USER-NAME/"
shell = "/usr/bin/bash"
groups = ["users", "wheel"]
uid = NUMBER
gid = NUMBER
The GID is optional and must already exist in the image. Optionally, a package creates it, or the
blueprint creates the GID by using the [[customizations.group]] entry.
IMPORTANT
To generate the password hash, you must install python3 on your system.
Replace PASSWORD-HASH with the actual password hash. To generate the password hash, use a
command such as:
You must enter the name. You can omit any of the lines that you do not need.
[[customizations.group]]
name = "GROUP-NAME"
gid = NUMBER
[[customizations.sshkey]]
user = "root"
key = "PUBLIC-SSH-KEY"
NOTE
The "Set an existing users SSH key" customization is only applicable for existing users.
To create a user and set an SSH key, see the User specifications for the resulting
system image customization.
36
CHAPTER 5. COMPOSING A RHEL FOR EDGE IMAGE USING IMAGE BUILDER COMMAND-LINE
[customizations.kernel]
append = "KERNEL-OPTION"
By default, image builder builds a default kernel into the image. But, you can customize the kernel
with the following configuration in blueprint
[customizations.kernel]
name = "KERNEL-rt"
[customizations.kernel.name]
name = "KERNEL-NAME"
Set the timezone and theNetwork Time Protocol (NTP) servers for the resulting system image
[customizations.timezone]
timezone = "TIMEZONE"
ntpservers = "NTP_SERVER"
If you do not set a timezone, the system uses Universal Time, Coordinated (UTC) as default. Setting
NTP servers is optional.
[customizations.locale]
languages = ["LANGUAGE"]
keyboard = "KEYBOARD"
Setting both the language and the keyboard options is mandatory. You can add many other
languages. The first language you add will be the primary language and the other languages will be
secondary.
[customizations.firewall]
port = ["PORTS"]
To enable lists, you can use numeric ports, or their names from the /etc/services file.
$ firewall-cmd --get-services
In the blueprint, under section customizations.firewall.service, specify the firewall services that you
want to customize.
[customizations.firewall.services]
enabled = ["SERVICES"]
disabled = ["SERVICES"]
37
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
The services listed in firewall.services are different from the service-names available in the
/etc/services file.
NOTE
[customizations.services]
enabled = ["SERVICES"]
disabled = ["SERVICES"]
You can control which services to enable during the boot time. Some image types already have
services enabled or disabled to ensure that the image works correctly and this setup cannot be
overridden. The [customizations.services] customization in the blueprint do not replace these
services, but add them to the list of services already present in the image templates.
NOTE
Each time a build starts, it clones the repository of the host system. If you refer to a
repository with a large amount of history, it might take some time to clone and it uses
a significant amount of disk space. Also, the clone is temporary and the build removes
it after it creates the RPM package.
improved performance
[[customizations.filesystem]]
mountpoint = "MOUNTPOINT"
size = MINIMUM-PARTITION-SIZE
/var
/home
38
CHAPTER 5. COMPOSING A RHEL FOR EDGE IMAGE USING IMAGE BUILDER COMMAND-LINE
/opt
/srv
/usr
/app
/data
NOTE
Customizing mount points is only supported from RHEL 8.5 and RHEL 9.0
distributions onward, by using the CLI. In earlier distributions, you can only
specify the root partition as a mount point and specify the size argument
as an alias for the image size.
If you have more than one partition in the customized image, you can create images with
a customized file system partition on LVM and resize those partitions at runtime. To do
this, you can specify a customized filesystem configuration in your blueprint and
therefore create images with the desired disk layout. The default filesystem layout
remains unchanged - if you use plain images without file system customization, and
cloud-init resizes the root partition.
NOTE
The blueprint automatically converts the file system customization to a LVM partition.
[[customizations.filesystem]]
mountpoint = "/var"
size = 1073741824
You can also define the mount point size by using units.
NOTE
You can only define the mount point size by using units for the package
version provided for RHEL 8.6 and RHEL 9.0 distributions onward.
For example:
[[customizations.filesystem]]
mountpoint = "/opt"
39
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
or
[[customizations.filesystem]]
mountpoint = "/boot"
size = "1 GiB"
Additional resources
40
CHAPTER 6. BUILDING SIMPLIFIED INSTALLER IMAGES TO PROVISION A RHEL FOR EDGE IMAGE
To build a RHEL for Edge Simplified Installer image, provide an existing OSTree commit. The resulting
simplified image contains a raw image that has the OSTree commit deployed. After you boot the
Simplified installer ISO image, it provisions a RHEL for Edge system that you can use on a hard disk or as
a boot image in a virtual machine.
The RHEL for Edge Simplified Installer image is optimized for unattended installation to a device and
supports both network-base deployment and non-network-based deployments. However, for network-
based deployment, it supports only UEFI HTTP boot.
Composing and deploying a simplified RHEL for Edge image involves the following high-level steps:
3. Using image builder, create a blueprint with customizations for RHEL for Edge Container image
5. Create a RHEL for Edge image embed in an OCI container with a webserver ready to deploy the
commit as an OSTree repository
The following diagram represents the RHEL for Edge Simplified building and provisioning workflow:
Figure 6.1. Building and provisioning RHEL for Edge in network-base environment
41
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
Figure 6.1. Building and provisioning RHEL for Edge in network-base environment
Procedure
1. Create a plain text file in the Tom’s Obvious, Minimal Language (TOML) format, with the
following content:
name = "simplified-installer-blueprint"
description = "blueprint for the simplified installer image"
version = "0.0.1"
packages = []
modules = []
groups = []
distro = ""
[customizations]
installation_device = "/dev/vda"
[customizations.fdo]
manufacturing_server_url = "http://10.0.0.2:8080"
diun_pub_key_insecure = "true"
Where,
name is the name and description is the description for your blueprint.
Modules describe the package name and matching version glob to be installed into the
42
CHAPTER 6. BUILDING SIMPLIFIED INSTALLER IMAGES TO PROVISION A RHEL FOR EDGE IMAGE
Modules describe the package name and matching version glob to be installed into the
image, for example, the package name = "tmux" and the matching version glob is version =
"2.9a". Notice that currently there are no differences between packages and modules.
Groups are packages groups to be installed into the image, for example the anaconda-
tools group package. If you do not know the modules and groups, leave them empty.
3. List the existing blueprints to check whether the created blueprint is successfully pushed and
exists.
4. Check whether the components and versions listed in the blueprint and their dependencies are
valid:
Additional resources
Prerequisites
You created a blueprint for the RHEL for Edge Simplified image.
You served an OSTree repository of the commit to embed in the image. For example,
http://10.0.2.2:8080/repo. See Setting up a web server to install RHEL for Edge image .
Procedure
Where,
43
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
--url is the URL to the OSTree repository of the commit to embed in the image. For
example, http://10.0.2.2:8080/repo/. You can either start a RHEL for Edge Container or set
up a web server. See Creating a RHEL for Edge Container image for non-network-based
deployments and Setting up a web server to install RHEL for Edge image .
A confirmation that the composer process has been added to the queue appears. It also
shows a Universally Unique Identifier (UUID) number for the image created. Use the UUID
number to track your build. Also keep the UUID number handy for further tasks.
NOTE
Additional resources
Prerequisites
Procedure
44
CHAPTER 6. BUILDING SIMPLIFIED INSTALLER IMAGES TO PROVISION A RHEL FOR EDGE IMAGE
Image builder downloads the image as an .iso file at the current directory path where you run
the command.
$ <UUID>-simplified-installer.iso: size MB
As a result, you downloaded a RHEL for Edge Simplified Installer ISO image. You can use it directly as a
boot ISO to install a RHEL for Edge system.
Prerequisites
Procedure
# mkdir /mnt/rhel9-install/
# mount -o loop,ro -t iso9660 /path_directory/installer.iso /mnt/rhel9-install/
Replace /path_directory/installer.iso with the path to the RHEL for Edge bootable ISO image.
2. Copy the files from the mounted image to the HTTP server root. This command creates the
/var/www/html/rhel9-install/ directory with the contents of the image.
# mkdir /var/www/html/httpboot/
# cp -R /mnt/rhel9-install/* /var/www/html/httpboot/
# chmod -R +r /var/www/html/httpboot/*
NOTE
Some copying methods can skip the .treeinfo file which is required for a valid
installation source. Running the cp command for whole directories as shown in
this procedure will copy .treeinfo correctly.
45
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
d. coreos.inst.image_file=/run/media/iso/disk.img.xz with
coreos.inst.image_url=http://{IP-ADDRESS}/disk.img.xz
The IP-ADDRESS is the ip address of this machine, which will serve as a http boot server.
As a result, after you set up an UEFI HTTP Boot server, you can install your RHEL for Edge
devices by using UEFI HTTP boot.
virt-install
This example shows how to create a virt-install installation source from your ISO image for a network-
based installation .
Prerequisites
Procedure
1. Set up a network configuration to support UEFI HTTP boot. See Setting up UEFI HTTP boot
with libvirt.
2. Use the virt-install command to create a RHEL for Edge Virtual Machine from the UEFI HTTP
Boot.
# virt-install \
--name edge-install-image \
--disk path=” “, ,format=qcow2
--ram 3072 \
--memory 4096 \
--vcpus 2 \
--network network=integration,mac=mac_address \
--os-type linux
--os-variant rhel9 \
--cdrom "/var/lib/libvirt/images/”ISO_FILENAME"
46
CHAPTER 6. BUILDING SIMPLIFIED INSTALLER IMAGES TO PROVISION A RHEL FOR EDGE IMAGE
--boot
uefi,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/edk2/ovmf/OVMF_VARS.fd,
loader_secure=no
--virt-type kvm \
--graphics none \
--wait=-1
--noreboot
After you run the command, the Virtual Machine installation starts.
Verification
This example shows how to create a USB installation source from your ISO image.
Prerequisites
Procedure
2. Connect the USB flash drive to the port of the computer you want to boot.
3. Boot the ISO image from the USB flash drive.The boot menu shows you the following options:
4. Choose Install Red Hat Enterprise Linux 9. This starts the system installation.
Additional resources
47
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
IMPORTANT
Red Hat provides the FDO process as a Technology Preview feature and should run on
secure networks. Technology Preview features are not supported with Red Hat
production service level agreements (SLAs) and might not be functionally complete.
These features provide early access to upcoming product features, enabling customers
to test functionality and provide feedback during the development process. See
Technology Preview Features Support Scope on the Red Hat Customer Portal for
information about the support scope for Technology Preview features.
With FIDO device onboarding (FDO), you can perform a secure device onboarding by adding new
devices into your IOT architecture. This includes the specified device configuration that needs to be
trusted and integrated with the rest of the running systems and to deploy new systems that are ready to
be used. The FDO authentication is an automatic onboarding process that is triggered by the
installation of a new device to securely onboard a device. The FDO protocol solves the trust and chain of
ownership along with the automation needed to securely onboard a device at scale. It performs device
initialization at the manufacturing stage and late device binding for its actual use. This means that actual
binding of the device to a management system happens on the first boot of the device without requiring
manual configuration on the device. By using the FDO protocol, you have support for automated secure
devices onboarding, that is, zero touch installation and onboarding that does not need any specialized
person at the edge location. After the device is onboarded, you can connect to it and apply patches,
updates, and rollbacks.
FDO is a secure and simple way to enroll a device to a management platform. Instead of
embedding a Kickstart configuration to the image, FDO applies the customization, such as
inclusion of sensitive data as credentials, keys or certificates directly to the ISO image.
FDO solves the issue of late binding to a device, enabling any sensitive data to be shared over a
secure FDO channel.
FDO cryptographically identifies the system identity and ownership before enrolling and
passing the configuration and other secrets to the system. That enables non-technical users to
power-on the system.
To build a RHEL for Edge Simplified Installer image and automatically onboard it, provide an existing
OSTree commit. The resulting simplified image contains a raw image that has the OSTree commit
48
CHAPTER 7. AUTOMATICALLY PROVISIONING AND ONBOARDING RHEL FOR EDGE DEVICES WITH FDO
deployed. After you boot the Simplified installer ISO image, it provisions a RHEL for Edge system that
you can use on a hard disk or as a boot image in a virtual machine.
The RHEL for Edge Simplified Installer image is optimized for unattended installation to a device and
supports both network-base deployment and non-network-based deployments. However, for network-
based deployment, it supports only UEFI HTTP boot.
Manufacturing server
This server is at the manufacturer server location. The manufacturing server:
2. Creates a voucher that is used to set the ownership of the device, later in the process.
Rendezvous server
This server is at the owner server location or at the platform where the Device management
system will be located, for example a cloud. The Rendezvous server:
1. Gets the voucher generated by the manufacturing server during the first device boot.
2. Matches the device UUID with a target platform and provides information to the device
about which Owner server endpoint this device must use.
1. Creates a secure channel between the device and the Owner server after the device
authentication.
2. Uses the secure channel to send the required information, such as files and scripts for the
onboarding automation to the device.
Device client
This is the server installed on the device. The Device client
1. Starts the queries to the multiple servers where the onboarding automation will be
executed.
At the Manufacturer server, the device gets the FDO credentials, a set of certificates and keys to be
installed on the operating system, and the Rendezvous server endpoint (URL). It also gets the
Ownership Voucher, that is maintained separately in case you need to change the owner assignment.
3. At an early point, the Owner management system informs the Manufacturer Rendezvous server
about the location of the Owner management system
4. After connecting to the network, the Device client contacts the Rendezvous Server
5. The Rendezvous Server sends the owner endpoint URL to the Device Client, and registers the
device. This action connects and boots the device.
6. The Device client connects to the Owner management system shared by the Rendezvous
Server, proves that it is the correct device by signing a statement with a device key
7. The Owner management system prove itself by signing a statement with the last key of the
Owner Voucher
50
CHAPTER 7. AUTOMATICALLY PROVISIONING AND ONBOARDING RHEL FOR EDGE DEVICES WITH FDO
8. The Owner management system provides the configuration for the device, which the Device
client stores for example, in an SSH key
11. After that, the Owner management system reports the Device client as onboarded
The entire FDO process is done and no longer in use in this device.
3. Using image builder, create a blueprint with customizations for RHEL for Edge Container image
5. Create a RHEL for Edge image embed in an OCI container with a webserver ready to deploy the
commit as an OSTree repository
6. Create a blueprint for edge-simplified-installer with customizations for storage device path
and FDO customizations
name = "fdo"
description = "FDO blueprint"
version = "0.0.1"
packages = []
modules = []
groups = []
distro = ""
[customizations]
installation_device = "/dev/vda"
[customizations.fdo]
manufacturing_server_url = "http://10.0.0.2:8080"
diun_pub_key_insecure = "true"
9. Install the simplified installer ISO image to a device. The FIDO FDO client runs on the Simplified
Installer ISO and the UEFI directory structure makes the image bootable.
10. The network configuration enables the device to reach out to the manufacturing server to
perform the initial device credential exchange.
11. After the system reaches the endpoint, the device credentials are created for the device.
51
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
12. The onboard server uses the device credential to authenticate against the onboarding server.
.The onboarding server passes the configuration to the device/system: After it connects to the
system, it connects to their onboarding server, receives the configuration.
13. The onboarding server provides the device with an SSH key and installs the system.
14. Then, it reboots the system and encrypts it with a strong key stored at TPM.
15. You can login to the system with the credentials from the blueprint you created and check the
configuration that was created into the Simplified Installer ISO image.
Additional resources
IMPORTANT
Prerequisites
Procedure
$ mkdir /etc/fdo/keys
NOTE
52
CHAPTER 7. AUTOMATICALLY PROVISIONING AND ONBOARDING RHEL FOR EDGE DEVICES WITH FDO
NOTE
If you used the source code and compiled it, the correct path is
./target/debug/fdo-admin-tool or ./target/debug/fdo-admin-tool, depending on
your build options.
$ tree keys
– device_ca_cert.pem
– device_ca_key.der
– diun_cert.pem
– diun_key.dre
– manufacturer_cert.pem
– manufacturer_key.der
– owner_cert.pem
– owner_key.pem
Additional resources
IMPORTANT
To install the manufacturing server RPM package, complete the following steps:
Procedure
53
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
$ ls /usr/share/doc/fdo
Output:
manufacturing server.yml
Owner-onboarding-server.yml
rendezvous-server.yml
$ cat /usr/share/doc/fdo/manufacturing-server.yml
The path to the keys and certificates you generated. See Generating key and certificates
section.
6. After you install the RHEL for Edge network simplified image to your device, ensure that the
manufacturer server is running on a Podman container. The manufacturing server takes care of
the creating and enabling device credentials on the new device.
$ cat /usr/share/doc/fdo/manufacturing-server.yml
Additional resources
Prerequisites
Device assembled and provisioned. This example uses a VM machine, but you can use it in a real
device.
54
CHAPTER 7. AUTOMATICALLY PROVISIONING AND ONBOARDING RHEL FOR EDGE DEVICES WITH FDO
Procedure
1. Run the installation using the ISO Simplified image. You can install it from a CD-ROM or from a
USB flash drive, for example.
The installation runs the ISO Simplified Installer image, where the FDO client runs and the UEFI
directory structure makes the image bootable, to burn the raw image in the ISO.
2. Verify through the terminal that the device has reached the manufacturing service to perform
the initial device credential exchange and produced an ownership voucher:
$ ls directory-path/ownership_voucher/
The output should show the ownership_voucher ID to indicate that the correct device
credentials were added to the device.
The onboarding server uses the device credential to authenticate against the onboarding
server. It then passes the configuration to the device. After the device receives the
configuration from the onboarding server, it receives an SSH key and installs the operating
system on the device. Finally, the system automatically reboots, encrypts it with a strong key
stored at TPM.
After the device automatically reboots, the device contacts the onboarding server to be
onboarded and the user credentials are automatically provisioned by FDO.
Verification
After the device automatically reboots, you can log in to the device with the credentials you created for
the blueprint.
1. Log in to the device by providing the username and password you created for the blueprint.
2. Optional: verify that the configuration that was created into the raw image.
Additional resources
55
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
NOTE
Network-based deployments
Deploying a RHEL for Edge image in a network-based environment involves the following high-level
steps:
The downloaded commit file consists of a .tar file with an OSTree repository. The OSTree repository
has a commit and a compose.json file.
The compose.json file has information metadata about the commit with information such as the "Ref",
the reference ID and the commit ID. The commit ID has the RPM packages.
Prerequisites
Procedure
3. Open the compose.json file and note the commit ID number. You need this number handy
when you proceed to set up a web server.
If you have the jq JSON processor installed, you can also retrieve the commit ID by using the jq
tool:
56
CHAPTER 8. DEPLOYING A RHEL FOR EDGE IMAGE IN A NETWORK-BASE ENVIRONMENT
5. Use a Kickstart file to run the RHEL installer. Optionally, you can use any existing file or can
create one by using the Kickstart Generator tool.
In the Kickstart file, ensure that you include the details about how to provision the file system,
create a user, and how to fetch and deploy the RHEL for Edge image. The RHEL installer uses
this information during the installation process.
lang en_US.UTF-8
keyboard us
timezone Etc/UTC --isUtc
text
zerombr
clearpart --all --initlabel
autopart
reboot
user --name=core --group=wheel
sshkey --username=core "ssh-rsa AAAA3Nza…."
rootpw --lock
network --bootproto=dhcp
The OStree-based installation uses the ostreesetup command to set up the configuration. It
fetches the OSTree commit, by using the following flags:
--ref - Name of the branch from the repository that the installation uses.
NOTE
Use the http protocol to start a service to serve the commit, because https is
not enabled on the Apache HTTP Server.
57
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
Additional resources
The following example provides the steps to set up a web server by using a container.
Prerequisites
You have installed Podman on your system. See How do I install Podman in RHEL
Procedure
events {
http {
server{
listen 8080;
root /usr/share/nginx/html;
}
}
pid /run/nginx.pid;
daemon off;
FROM registry.access.redhat.com/ubi8/ubi
RUN dnf -y install nginx && dnf clean all
COPY kickstart.ks /usr/share/nginx/html/
COPY repo /usr/share/nginx/html/
COPY nginx /etc/nginx.conf
EXPOSE 8080
CMD ["/usr/sbin/nginx", "-c", "/etc/nginx.conf"]
ARG commit
ADD ${commit} /usr/share/nginx/html/
Where,
kickstart.ks is the name of the Kickstart file from the RHEL for Edge image. The Kickstart
file includes directive information. To help you manage the images later, it is advisable to
include the checks and settings for Greenboot checks. For that, you can update the
Kickstart file to include the following settings:
58
CHAPTER 8. DEPLOYING A RHEL FOR EDGE IMAGE IN A NETWORK-BASE ENVIRONMENT
lang en_US.UTF-8
keyboard us
timezone Etc/UTC --isUtc
text
zerombr
clearpart --all --initlabel
autopart
reboot
user --name=core --group=wheel
sshkey --username=core "ssh-rsa AAAA3Nza…."
%post
cat << EOF > /etc/greenboot/check/required.d/check-dns.sh
#!/bin/bash
COUNT++
echo "Checking for DNS: Attempt $COUNT ."
sleep 10
ping -c 1 $DNS_SERVER
done
EOF
%end
Any HTTP service can host the OSTree repository, and the example, which uses a container,
is just an option for how to do this. The Dockerfile performs the following tasks:
59
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
As a result, the server is set up and ready to start the RHEL Installer by using the commit.tar
repository and the Kickstart file.
Prerequisites
You are logged in to the Product Downloads section of the Red Hat Customer Portal at
https://access.redhat.com/downloads.
Procedure
2. Under Infrastructure Management, click the ` Red Hat Enterprise Linux 9` Product.
3. Click the Download Now button for the option " Red Hat Enterprise Linux 9 Boot ISO"
Additional resources
Prerequisites
The server to fetch the commit in the RHEL Installer is available and running.
A .qcow2 disk image to install the commit you created. See Creating a system image with
image builder in the CLI.
Procedure
virt-install \
--name rhel-edge-test-1 \
--memory 2048 \
--vcpus 2 \
--disk path=prepared_disk_image.qcow2,format=qcow2,size=8 \
--os-variant rhel9 \
--cdrom /home/username/Downloads/rhel-9-x86_64-boot.iso
60
CHAPTER 8. DEPLOYING A RHEL FOR EDGE IMAGE IN A NETWORK-BASE ENVIRONMENT
inst.ks=http://edge_device_ip:port/kickstart.ks
The kernel parameter specifies that you want to install RHEL by using the Kickstart file and
not the RHEL image contained in the RHEL Installer.
b. After adding the kernel parameters, press Ctrl+X to boot the RHEL installation by using the
Kickstart file.
The RHEL Installer starts, fetches the Kickstart file from the server (HTTP) endpoint and
executes the commands, including the command to install the RHEL for Edge image
commit from the HTTP endpoint. After the installation completes, the RHEL Installer
prompts you for login details.
Verification
1. On the Login screen, enter your user account credentials and click Enter.
$ rpm-ostree status
The command output provides the image commit ID and shows that the installation is
successful.
61
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
State: idle
Deployments:
* ostree://edge:rhel/9/x86_64/edge
Timestamp: 2020-09-18T20:06:54Z
Commit: 836e637095554e0b634a0a48ea05c75280519dd6576a392635e6fa7d4d5e96
Additional resources
62
CHAPTER 9. DEPLOYING A RHEL FOR EDGE IMAGE IN A NON-NETWORK-BASE ENVIRONMENT
Deploying a RHEL for Edge image in a non-network-based environment involves the following high-
level steps:
1. Download the RHEL for Edge Container. See Downloading a RHEL for Edge image for
information about how to download the RHEL for Edge image.
Prerequisites
You created and downloaded a RHEL for Edge Container OSTree commit.
You have installed Podman on your system. See How do I install Podman in RHEL .
Procedure
1. Navigate to the directory where you have downloaded the RHEL for Edge Container OSTree
commit.
2. Load the RHEL for Edge Container OSTree commit into Podman.
3. Tag the new RHEL for Edge Container image, using the image ID generated by the previous
step.
63
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
The podman tag command assigns an additional name to the local image.
5. List containers:
$ sudo podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS
PORTS NAMES
2988198c4c4b …./localhost/edge-container /bin/bash 3 seconds ago Up 2 seconds ago
edge-container
As a result, Podman runs a container that serves an OSTree repository with the RHEL for Edge
Container commit.
To create the RHEL for Edge Installer image in the CLI, follow the steps:
Prerequisites
You created a RHEL for Edge Edge Container image and deployed it using a web server.
Procedure
Where,
ref is the same value that customer used to build ostree repository
URL-OSTree-repository is the URL to the OSTree repository of the commit to embed in the
image. For example, http://10.0.2.2:8080/repo/. See Creating a RHEL for Edge Container
image for non-network-based deployments.
64
CHAPTER 9. DEPLOYING A RHEL FOR EDGE IMAGE IN A NON-NETWORK-BASE ENVIRONMENT
image-type is edge-installer.
A confirmation that the composer process has been added to the queue appears. It also
shows a Universally Unique Identifier (UUID) number for the image created. Use the UUID
number to track your build. Also keep the UUID number handy for further tasks.
NOTE
Image builder pulls the commit that is being served by the running container during the image
build.
After the image build is complete, you can download the resulting ISO image.
Additional resources
Creating a RHEL for Edge Installer image using command-line interface for non-network-based
deployments.
Prerequisites
65
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
You customized your blueprint with a user account. See Creating an administrative user
account for a RHEL for Edge image blueprint.
WARNING
If you do not define a user account customization in your blueprint, you will
not be able to login to the ISO image.
Procedure
1. Create a qcow VM disk file to install the (.iso) image. That is an image of a hard drive for the
virtual machine (VM). For example:
2. Use the virt-install command to boot the VM using the disk as a drive and the installer ISO as a
CD-ROM. For example:
$ virt-install \
--boot uefi \
--name VM_NAME
--memory 2048 \
--vcpus 2 \
--disk path=diskfile.qcow2
--cdrom /var/lib/libvirt/images/UUID-installer.iso \
--os-variant rhel9.0
NOTE
66
CHAPTER 9. DEPLOYING A RHEL FOR EDGE IMAGE IN A NON-NETWORK-BASE ENVIRONMENT
5. On the login screen, specify your user account credentials and click Enter.
Verification steps
$ rpm-ostree status
The command output provides the image commit ID and shows that the installation is successful.
67
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
Edit the RHEL for Edge image blueprint using image builder in RHEL web console
Edit the RHEL for Edge image blueprint using image builder command-line
10.1.1. Adding a component to RHEL for Edge image blueprint using image builder in
RHEL web console
To add a component to a RHEL for Edge image blueprint, ensure that you have met the following
prerequisites and then follow the procedure to edit the corresponding blueprint.
Prerequisites
Procedure
1. On the image builder dashboard, click the RHEL for Edge image blueprint that you want to edit.
To search for a specific blueprint, enter the blueprint name in the Filter By Name text box, and
then press Enter.
3. Enter the component name that you want to add in the Filter By Name text box, and then press
Enter.
A list with the component name appears.
5. Click Commit.
68
CHAPTER 10. MANAGING RHEL FOR EDGE IMAGES
The blueprint updates are saved, and a message with the pending commit appears.
6. On the summary dialogue box, review the changes and then click Commit.
A message confirming the successful commit appears.
As a result, a new version of the blueprint is created and the right pane lists the latest
components.
10.1.2. Changing the version of an existing component in a RHEL for Edge image
blueprint using the RHEL web console
You had selected a default (latest) version or had chosen a version for the components that you
included in the blueprint. If required, you can now change the version for any component that you might
want to.
To do so, ensure that you have met the following prerequisites and then follow the procedure to change
the version of the component in the corresponding blueprint.
Prerequisites
You have added at least one component to the RHEL for Edge blueprint.
Procedure
1. On the image builder dashboard, click the blueprint that you want to edit.
To search for a specific blueprint, enter the blueprint name in the Filter By Name text box, and
then press Enter.
4. Select the desired version from the Component Options Version dropdown list.
6. Click Commit.
The new version is saved in the blueprint. A message with pending commits appears.
7. On the summary dialogue box, review the changes and then click Commit.
A message confirming the successful commit appears.
As a result a new version of the blueprint is created and the right pane lists the latest
components.
10.1.3. Removing a component from RHEL for Edge image blueprint using image
builder in RHEL web console
69
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
To remove one or more unwanted components from a RHEL for Edge image blueprint that you created,
ensure that you have met the following prerequisites and then follow the procedure.
Prerequisites
You have added at least one component to the RHEL for Edge blueprint.
Procedure
1. On the image builder dashboard, click the blueprint that you want to edit.
To search for a specific blueprint, enter the blueprint name in the Filter By Name text box, and
then press Enter.
4. Click Commit.
A message with pending commits appears.
As a result, a new version of the blueprint is created and the right pane lists the latest
components.
10.1.4. Editing a RHEL for Edge image blueprint using command-line interface
You can change the specifications for your RHEL for Edge image blueprint using image builder
command-line. To do so, ensure that you have met the following prerequisites and then follow the
procedure to edit the corresponding blueprint.
Prerequisites
Procedure
2. Edit the BLUEPRINT-NAME.toml file with a text editor of your choice and make your changes.
Before finishing with the edits, verify that the file is a valid blueprint:
70
CHAPTER 10. MANAGING RHEL FOR EDGE IMAGES
NOTE
if you do not change the version, the patch component of the version is
increased automatically.
4. Check if the contents are valid TOML specifications. See the TOML documentation for more
information.
NOTE
NOTE
When pushing the blueprint back into the image builder command-line, provide
the file name including the .toml extension.
7. Verify that the contents uploaded to image builder match your edits:
8. Check whether the components and versions listed in the blueprint and their dependencies are
valid:
During the image update, only the updated operating system content is transferred over the network.
This makes the deployment process more efficient compared to transferring the entire image. The
operating system binaries and libraries in /usr are read-only, and the read and write state is maintained
in /var and /etc directories.
When moving to a new deployment, the /etc and the /var directories are copied to the new deployment
71
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
When moving to a new deployment, the /etc and the /var directories are copied to the new deployment
with read and write permissions. The /usr directory is copied as a soft link to the new deployment
directory, with read-only permissions.
The following diagram illustrates the RHEL for Edge image update deployment process:
By default, the new system is booted using a procedure similar to a chroot operation. The new /sysroot
directory mainly has the following parts:
The /sysroot/ostree/boot directory, which links to deployments on the previous point. Note that
/ostree is a soft link to /sysroot/ostree. The files from the /sysroot/ostree/boot directory are
not duplicated. The same file is used if it is not changed during the deployment. The files are
hard-links to another file stored in the /sysroot/ostree/repo/objects directory.
1. The dracut tool parses the ostree kernel argument in the initramfs root file system and sets up
the /usr directory as a read-only bind mount.
3. Re-mount the operating system already mounted dirs using the MS_MOVE mount flag
If anything goes wrong, you can perform a deployment rollback by removing the old deployments with
the rpm-ostree cleanup command. Each client machine contains an OSTree repository stored in
/ostree/repo, and a set of deployments stored in /ostree/deploy/$STATEROOT/$CHECKSUM.
With the deployment updates in RHEL for Edge image, you can benefit from a better system
72
CHAPTER 10. MANAGING RHEL FOR EDGE IMAGES
With the deployment updates in RHEL for Edge image, you can benefit from a better system
consistency across multiple devices, easier reproducibility, and better isolation between the pre and post
system states change.
To deploy RHEL for Edge images updates, ensure that you meet the prerequisites and then follow the
procedure.
Prerequisites
You have edited the RHEL for Edge image blueprint. See Editing a RHEL for Edge image
blueprint using image builder in RHEL web console.
Procedure
1. On the image builder dashboard, for the blueprint that you have edited, click Create Image.
a. From the Image output type dropdown list, select RHEL for Edge Commit (.tar). Click
Next.
i. In the Repository URL, enter the URL to the OSTree repository of the commit to
embed in the image. For example, http://10.0.2.2:8080/repo/. See Setting up a web
server to install RHEL for Edge image.
ii. In the Parent commit textbox, specify the parent commit ID that was previously
generated. See Extracting RHEL for Edge image commit .
iii. In the Ref textbox, you can either specify a name for your commit or leave it empty. By
default, the web console specifies the Ref as rhel/9/arch_name/edge. Click Next.
i. Optional: In the System, enter a Hostname. If you do not add it, the operating system
determines the hostname. Click Next.
ii. Optional: Click Add User. Enter a Username, password and an SSH key. You can mark
the user as the Server administrator.
i. In the Available packages, enter the package name to customize your image. Click Next.
e. In the Review page, check the customizations. Click Save blueprint. It activates the Create
image button.
f. Click Create image. Image builder creates a RHEL for Edge image for the updated
73
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
f. Click Create image. Image builder creates a RHEL for Edge image for the updated
blueprint.
To view the RHEL for Edge image creation progress, click the blueprint name from the
breadcrumbs, and then click the Images tab.
NOTE
The resulting image includes the latest packages that you have added, if any, and have the
original commit ID as a parent.
3. Download the resulting RHEL for Edge image. For more information about downloading a RHEL
for Edge image, see Downloading a RHEL for Edge image .
4. Extract the OSTree commit. For more information about extracting an OSTree commit, see
Extracting RHEL for Edge image commit .
7. On the RHEL system provisioned, from the original edge image, verify the current status.
$ rpm-ostree status
If there is no new commit ID, run the following command to verify if there is any upgrade
available:
The command output provides the current active OSTree commit ID.
$ rpm-ostree upgrade
OSTree verifies if there is an update on the repository. If yes, it fetches the update and requests
you to reboot your system so that you can activate the deployment of this new commit update.
$ rpm-ostree status
74
CHAPTER 10. MANAGING RHEL FOR EDGE IMAGES
10. To activate the new deployment and to make the new commit active, reboot your system.
# systemctl reboot
The Anaconda Installer reboots into the new deployment. On the login screen, you can see a
new deployment available for you to boot.
11. If you want to boot into the newest deployment (commit), the rpm-ostree upgrade command
automatically orders the boot entries so that the new deployment is first in the list. Optionally,
you can use the arrow key on your keyboard to select the GRUB menu entry and press Enter.
$ rpm-ostree status
14. To view the changed packages, if any, run a diff between the parent commit and the new
commit:
The update shows that the package you have installed is available and ready for use.
10.2.3. Deploying RHEL for Edge image updates manually using the command-line
After you have edited a RHEL for Edge blueprint, you can update the image commit. Image builder
generates a new commit for the updated RHEL for Edge image. Use the new commit to deploy the
image with latest package versions or with additional packages using the CLI.
To deploy RHEL for Edge image updates using the CLI, ensure that you meet the prerequisites, and
then follow the procedure.
Prerequisites
You edited the RHEL for Edge image blueprint. See Editing a RHEL for Edge image blueprint
using command-line interface.
Procedure
1. Create the RHEL for Edge Commit (.tar) image with the following arguments:
where
ref is the reference you provided during the creation of the RHEL for Edge Container
commit. For example, rhel/9/x86_64/edge.
75
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
image-type is edge-commit.
Image builder creates a RHEL for Edge image for the updated blueprint.
NOTE
The image creation processes can take up to ten to thirty minutes to complete.
The resulting image includes the latest packages that you have added, if any, and has the
original commit ID as a parent.
3. Download the resulting RHEL for Edge image. For more information, see Downloading a RHEL
for Edge image using the image builder command-line interface.
4. Extract the OSTree commit. For more information, see Extracting RHEL for Edge image
commit.
5. Serve the OSTree commit by using httpd. See Setting up a web server to install RHEL for Edge
image.
6. On the RHEL system provisioned from the original edge image, verify the current status:
$ rpm-ostree status
If there is no new commit ID, run the following command to verify if there is any upgrade
available:
The command output provides the current active OSTree commit ID.
$ rpm-ostree upgrade
OSTree verifies if there is an update on the repository. If yes, it fetches the update and requests
you to reboot your system so that you can activate the deployment of the new commit update.
$ rpm-ostree status
76
CHAPTER 10. MANAGING RHEL FOR EDGE IMAGES
9. To activate the new deployment and make the new commit active, reboot your system:
# systemctl reboot
The Anaconda Installer reboots into the new deployment. On the login screen, you can see a
new deployment available for you to boot.
10. If you want to boot into the newest deployment, the rpm-ostree upgrade command
automatically orders the boot entries so that the new deployment is first in the list. Optionally,
you can use the arrow key on your keyboard to select the GRUB menu entry and press Enter.
$ rpm-ostree status
13. To view the changed packages, if any, run a diff between the parent commit and the new
commit:
The update shows that the package you have installed is available and ready for use.
10.2.4. Deploying RHEL for Edge image updates manually for non-network-base
deployments
After you have edited a RHEL for Edge blueprint, you can update the image commit. Image builder
generates a new commit for the updated RHEL for Edge image. Use this new commit to deploy the
image with the latest package versions or with additional packages.
To deploy RHEL for Edge images updates, ensure that you meet the prerequisites and then follow the
procedure.
Prerequisites
You have edited the RHEL for Edge image blueprint. See Editing a RHEL for Edge image
blueprint using image builder in RHEL web console.
Procedure
1. On the image builder dashboard, for the blueprint that you have edited, click Create Image.
a. From the Type dropdown list, select RHEL for Edge Container (.tar).
b. In the Parent commit textbox, specify the previously generated parent commit ID. See
77
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
b. In the Parent commit textbox, specify the previously generated parent commit ID. See
Extracting RHEL for Edge image commit .
c. In the Repository textbox, specify the URL to the OSTree repository of the commit to
embed in the image. For example, http://10.0.2.2:8080/repo/.
d. In the Ref textbox, specify the same reference as you provided during the creation of the
RHEL for Edge Container commit to embed in the image. For example, rhel/edge/test.
e. Click Create. Image builder creates a RHEL for Edge image for the updated blueprint.
To view the progress of RHEL for Edge image creation, click the blueprint name from the
breadcrumbs, and then click the Images tab.
NOTE
The resulting image includes the latest packages that you have added, if any, and has the
original commit ID as a parent.
3. Download the resulting RHEL for Edge image. For more information about downloading a RHEL
for Edge image, see Downloading a RHEL for Edge image .
4. Load the RHEL for Edge Container image into Podman, serving the child commit ID this time.
5. Run Podman.
6. On the RHEL system provisioned, from the original edge image, verify the current status.
$ rpm-ostree status
If there is no new commit ID, run the following command to verify if there is any upgrade
available:
If there are updates available, the command output provides information about the available
updates in the OSTree repository, such as the current active OSTree commit ID. Else, it prompts
a message informing that there are no updates available.
$ rpm-ostree upgrade
OSTree verifies if there is an update on the repository. If yes, it fetches the update and requests
you to reboot your system so that you can activate the deployment of this new commit update.
$ rpm-ostree status
78
CHAPTER 10. MANAGING RHEL FOR EDGE IMAGES
9. To activate the new deployment and to make the new commit active, reboot your system.
# systemctl reboot
The Anaconda Installer reboots into the new deployment. On the login screen, you can see a
new deployment available for you to boot.
10. If you want to boot into the newest commit/deployment, the rpm-ostree upgrade command
automatically orders the boot entries so that the new deployment is first in the list. Optionally,
you can use the arrow key on your keyboard to select the GRUB menu entry and press Enter.
$ rpm-ostree status
13. To view the changed packages, if any, run a diff between the parent commit and the new
commit:
The update shows that the package you have installed is available and ready for use.
NOTE
The upgrade does not support every possible rpm package version and inclusions. You
must test your package additions to ensure that it works as expected.
Prerequisites
You created a blueprint for RHEL for Edge 9 image that you will upgrade
79
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
Procedure
1. On the system where image builder runs, create a RHEL for Edge 9 image:
2. On the RHEL for Edge device, check the current remote repository configuration:
NOTE
b. Configure the URL key to point to the RHEL 9 commit for the upgrade. For example:
80
CHAPTER 10. MANAGING RHEL FOR EDGE IMAGES
c. Confirm if the URL has been set to the new remote repository:
output:
edge
rhel9
6. Rebase your system to the RHEL version, providing the reference path for the RHEL 9 version:
$ systemctl reboot
$ rpm-ostree status
Verification
$ rpm-ostree status
2. Optional: List the processor and tasks managed by the kernel in real-time.
$ top
3. If the upgrade does not support your requirements, you have the option to manually rollback to
the previous stable deployment RHEL 8 version:
$ systemctl reboot
NOTE
If your upgrade succeeds and you do not want to use the previous deployment
RHEL 8 version, you can delete the old repository:
The AutomaticUpdatePolicy settings controls the automatic update policy and has the following
update checks options:
check: Downloads enough metadata to display available updates with rpm-ostree status.
stage: Downloads and unpacks the updates that are applied on a reboot.
The IdleExitTimeout setting controls the time in seconds of inactivity before the daemon exit and has
the following options:
0: Disables auto-exit.
Procedure
82
CHAPTER 10. MANAGING RHEL FOR EDGE IMAGES
3. Verify the rpm-ostree status to ensure the automatic update policy is configured and time is
active.
# rpm-ostree status
State: idle; auto updates enabled (check; last run <minutes> ago)
Additionally, the output also displays information about the available updates.
10.4.2. Enabling RHEL for Edge automatic download and staging of updates
After you update the image update policy to check for image updates, the updates if any are displayed
along with the update details. If you decide to apply the updates, enable the policy to automatically
download and stage the updates. The available image updates are then downloaded and staged for
deployment. The updates are applied and take effect when you reboot the Edge device.
To enable the policy for automatic download and staging of updates, perform the following updates:
Procedure
# rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run <time> ago
4. To initiate the updates, you can either wait for the timer to initiate the updates, or can manually
start the service.
After the updates are initiated, the rpm-ostree status shows the following:
# rpm-ostree status
State: busy
AutomaticUpdates: stage; rpm-ostreed-automatic.service: running
Transaction: automatic (stage)
When the update is complete, a new deployment is staged in the list of deployments, and the
83
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
When the update is complete, a new deployment is staged in the list of deployments, and the
original booted deployment is left untouched. You can decide if you want to boot the system
using the new deployment or can wait for the next update.
# rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run <time> ago
Deployments:
To view the list of deployments with the updated package details, run the rpm-ostree status -v
command.
You can use intelligent rollbacks with Greenboot to eliminate the issues of choosing between application
stability and application of security updates.
Greenboot leverages rpm-ostree and runs custom health checks that run on system startup. In case of
an issue, the system rolls back the changes and preserves the last working state. When you deploy an
rpm-ostree update, it runs scripts to check that critical services can still work after the update. If the
system does not work, the update rolls back to the last known working version of the system. This
process ensures that your RHEL for Edge device is in an operational state.
etc
└─ greenboot
├─ check
| └─ required.d
| └─ init.py
└─ green.d
└─ red.d
/etc/greenboot/check/required.d
Contains the health checks that must not fail.
/etc/greenboot/check/wanted.d
84
CHAPTER 10. MANAGING RHEL FOR EDGE IMAGES
The following diagram illustrates the RHEL for Edge image roll back process.
Procedure
# rpm-ostree rollback
The command output provides details about the commit ID that is being moved and indicates a
completed transaction with the details of the package being removed.
# systemctl reboot
The command activates the previous commit with the stable content. The changes are applied
and the previous version is restored.
10.5.3. Rolling back RHEL for Edge images using an automated process
Greenboot checks provides a framework that is integrated into the boot process and can trigger rpm-
ostree rollbacks when a health check fails. For the health checks, you can create a custom script that
indicates whether a health check passed or failed. Based on the result, you can decide when a rollback
should be triggered.
Procedure
#!/bin/bash
chmod +x check-dns.sh
During the next reboot, the script is executed as part of the boot process, before the system
enters the boot-complete.target. If the health checks are successful, no action is taken. If the
health checks fail, the system is rebooted several times, before marking the update as failed and
rolling back to the previous update.
Verification steps
To check if the default gateway is reachable, run the following health check script:
#!/bin/bash
count=10
connected=0
ping_timeout=5
interval=5
86
CHAPTER 10. MANAGING RHEL FOR EDGE IMAGES
chmod +x check-gw.sh
87
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
Term Definition
88
APPENDIX A. TERMINOLOGY AND COMMANDS
Sign an existing ostree commit with a GPG key ostree gpg-sign --repo=<repo-path> --gpg-
homedir <gpg_home> COMMIT KEY-ID…
Commands Description
rpm-ostree -- This command lists the packages existing in the <REV> commit into
repo=/home/gicmo/Code/src/o the repository.
sbuild-iot/build/repo/ db list
<REV>
89
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
Commands Description
rpm-ostree rollback OSTree manages an ordered list of boot loader entries, called
deployments. The entry at index 0 is the default boot loader entry.
Each entry has a separate /etc directory, but all the entries share a
single /var directory. You can use the boot loader to choose between
entries by pressing Tab to interrupt startup. This rolls back to the
previous state, that is, the default deployment changes places with the
non-default one.
rpm-ostree status This command gives information about the current deployment in use.
Lists the names and refspecs of all possible deployments in order,
such that the first deployment in the list is the default upon boot. The
deployment marked with * is the current booted deployment, and
marking with 'r' indicates the most recent upgrade.
rpm-ostree db list Use this command to see which packages are within the commit or
commits. You must specify at least one commit, but more than one or
a range of commits also work.
rpm-ostree db diff Use this command to show how the packages are different between
the trees in two revs (revisions). If no revs are provided, the booted
commit is compared to the pending commit. If only a single rev is
provided, the booted commit is compared to that rev.
rpm-ostree upgrade This command downloads the latest version of the current tree, and
deploys it, setting up the current tree as the default for the next boot.
This has no effect on your running filesystem tree. You must reboot
for any changes to take effect.
Additional resources
Commands Description
90
APPENDIX A. TERMINOLOGY AND COMMANDS
Commands Description
* Owner (fdo-owner-onboarding-service )
Device Credential (DC) Key credential and rendezvous stored in the device
at manufacture.
* key_path
* cert_path
* key_type
Rendezvous server Link to a server used by the device and later on, used
on the process to find out who is the owner of the
device
Additional resources
91
Red Hat Enterprise Linux 9 Composing, installing, and managing RHEL for Edge images
Technology Definition
92