Chapter 6. Building simplified installer images to provision a RHEL for Edge image
You can build a RHEL for Edge Simplified Installer image, which is optimized for unattended installation to a device, and provision the image to a RHEL for Edge image.
6.1. Simplified installer image build and deployment
Build a RHEL for Edge Simplified Installer image by using the new image type,
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 drive 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:
- Install and register a RHEL system
- Install Image Builder
- Using Image Builder, create a blueprint with customizations for RHEL for Edge Container image
- Import the RHEL for Edge blueprint in Image Builder
- Create a RHEL for Edge image embed in an OCI container with a webserver ready to deploy the commit as an OSTree repository
Create a blueprint for
- Build a simplified RHEL for Edge image
- Download the RHEL for Edge simplified image image
- Install the raw image with virt-install
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
6.2. Creating a blueprint for a Simplified image using Image Builder CLI
To create a blueprint for a simplified RHEL for Edge image, perform the following steps:
Create a plain text file in the Tom’s Obvious, Minimal Language (TOML) format, with the following content:
name = "blueprint-name" description = "blueprint-text-description" version = "0.0.1" modules = [ ] groups = [ ]
- blueprint-name is the name and blueprint-text-description is the description for your blueprint.
- 0.0.1 is the version number according to the Semantic Versioning scheme.
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.
Push (import) the blueprint to the Image Builder server:
# composer-cli blueprints push blueprint-name.toml
List the existing blueprints to check whether the created blueprint is successfully pushed and exists.
# composer-cli blueprints show blueprint-name
Check whether the components and versions listed in the blueprint and their dependencies are valid:
# composer-cli blueprints depsolve blueprint-name
6.3. Creating a RHEL for Edge Simplified Installer image using Image Builder CLI
To create a RHEL for Edge Simplified image using Image Builder command-line interface, ensure that you have met the following prerequisites and then follow the procedure.
- 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.
Create the bootable ISO image.
# composer-cli compose start-ostree \ blueprint name \ edge-simplified-installer \ --ref rhel/8/x86_64/edge \ --url URL-OSTree-repository \
- blueprint-name is the RHEL for Edge blueprint name.
- edge-simplified-installer is the image-type .
- --ref is the reference for where your commit is going to be created.
--url is the URL to the OSTree repository of the commit to embed in the image. For example, http://10.0.2.2:8080/repository/. 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.
Check the image compose status.
# composer-cli compose status
The output displays the status in the following format:
<UUID> RUNNING date blueprint-name blueprint-version image-typeNote
The image creation processes can take up to ten minutes to complete.
To interrupt the image creation process, run:
# composer-cli compose cancel <UUID>
To delete an existing image, run:
# composer-cli compose delete <UUID>
6.4. Downloading a simplified 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.
- You have created a RHEL for Edge image.
Review the RHEL for Edge image status.
# composer-cli compose status
The output must display the following:
$ <UUID> FINISHED date blueprint-name blueprint-version image-type
Download the image.
# composer-cli compose image <UUID>
Image Builder downloads the image as an
.isofile at the current directory path where you run the command.
The UUID number and the image size is displayed alongside.
$ <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.
6.5. Setting up an UEFI HTTP Boot server
This section shows how to set up an UEFI HTTP Boot server, so that you can start to provision a RHEL for Edge Virtual Machine over network by connecting to this UEFI HTTP Boot server.
- You have created the ISO simplified installer image.
- An http server that serves the ISO content.
Mount the ISO image to the directory your your choice:
# mkdir /mnt/rhel8-install/ # mount -o loop,ro -t iso9660 /path_directory/installer.iso /mnt/rhel8-install/
/path_directory/installer.isowith the path to the RHEL for Edge bootable ISO image.
Copy the files from the mounted image to the HTTP server root. This command creates the
/var/www/html/rhel8-install/directory with the contents of the image.
# cp -R /mnt/rhel8-install/* /var/www/html/ # chmod -R +r /var/www/html/httpboot/*Note
Some copying methods can skip the
.treeinfofile which is required for a valid installation source. Running the
cpcommand for whole directories as shown in this procedure will copy
/var/www/html/EFI/BOOT/grub.cfgfile, by replacing:
The IP-ADDRESS is the ip address of this machine, which will serve as a http boot server.
Start the httpd service:
# systemctl start httpd.service
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.
6.6. Deploying the Simplified ISO image in a Virtual Machine
Deploy the RHEL for Edge ISO image you generated by creating a RHEL for Edge Simplified image by using any the following installation sources:
- UEFI HTTP Boot
This example shows how to create a virt-install installation source from your ISO image for a network-based installation .
- You have created an ISO image.
- You set up a network configuration to support UEFI HTTP boot.
- Set up a network configuration to support UEFI HTTP boot. See Setting up UEFI HTTP boot with libvirt.
virt-installcommand 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 rhel8.5 \ --cdrom "/var/lib/libvirt/images/”ISO_FILENAME" --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.
- Log in to the created Virtual Machine.
6.7. Deploying the Simplified ISO image from a USB flash drive
Deploy the RHEL for Edge ISO image you generated by creating a RHEL for Edge Simplified image by using an USB installation.
This example shows how to create a USB installation source from your ISO image.
- You have created a simplified installer image, which is an ISO image.
- You have a 8 GB USB flash drive.
- Copy the ISO image file to a USB flash drive.
- Connect the USB flash drive to the port of the computer you want to boot.
Boot the ISO image from the USB flash drive.The boot menu shows you the following options:
Install Red Hat Enterprise Linux 8 Test this media & install Red Hat Enterprise Linux 8
- Choose Install Red Hat Enterprise Linux 8. This starts the system installation.