Chapter 9. Deploying a RHEL for Edge image in a non-network-base environment
The RHEL for Edge Container (
.tar) in combination with the RHEL for Edge Installer (
.iso) image type result in a ISO image. The ISO image can be used in disconnected environments during the image deployment to a device. However, network access might require network access to build the different artifacts.
Deploying a RHEL for Edge image in a non-network-based environment involves the following high-level steps:
- Download the RHEL for Edge Container. See Downloading a RHEL for Edge image for information about how to download the RHEL for Edge image.
- Load the RHEL for Edge Container image into Podman
- Run the RHEL for Edge Container image into Podman
- Load the RHEL for Edge Installer blueprint
- Build the RHEL for Edge Installer image
- Boot the Virtual Machine (VM)
- Install the image
9.1. Creating a RHEL for Edge Container image for non-network-based deployments
You can build a running container by loading the downloaded RHEL for Edge Container OSTree commit into Podman. For that, follow the steps:
- You created and downloaded a RHEL for Edge Container OSTree commit.
You have installed
Podmanon your system. See How do I install Podman in RHEL.
- Navigate to the directory where you have downloaded the RHEL for Edge Container OSTree commit.
Load the RHEL for Edge Container OSTree commit into
$ sudo podman load -i UUID-container.tar
The command output provides the image ID, for example:
Tag the new RHEL for Edge Container image, using the image ID generated by the previous step.
$ sudo podman tag image-ID localhost/edge-container
podman tagcommand assigns an additional name to the local image.
Run the container named
$ sudo podman run -d --name=edge-container -p 8080:8080 localhost/edge-container
podman run -d --name=edge-containercommand assigns a name to your container-based on the
$ 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.
9.2. Creating a RHEL for Edge Installer image for non-network-based deployments
After you have built a running container to serve a repository with the
RHEL for Edge Container commit, create an
RHEL for Edge Installer (.iso) image. The
RHEL for Edge Installer (.iso) pulls the commit served by
RHEL for Edge Container (.tar). After the
RHEL for Edge Container commit is loaded in Podman, it exposes the
OSTree in the URL format.
To create the RHEL for Edge Installer image in the CLI, follow the steps:
- You created a blueprint for RHEL for Edge image.
- You created a RHEL for Edge Edge Container image and deployed it using a web server.
Begin to create the RHEL for Edge Installer image.
# composer-cli compose start-ostree --ref rhel/8/x86_64/edge --url URL-OSTree-repository blueprint-name image-type
- 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/repository/. See Creating a RHEL for Edge Container image for non-network-based deployments.
- blueprint-name is the RHEL for Edge Installer blueprint name.
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 command output displays the status in the following format:
<UUID> RUNNING date blueprint-name blueprint-version image-typeNote
The image creation process takes a few 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>
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.
Download the image. See Downloading a RHEL for Edge image.
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.
9.3. Installing the RHEL for Edge image for non-network-based deployments
To install the RHEL for Edge image, follow the steps:
- You created a RHEL for Edge Installer ISO image.
- You stopped the running container.
- A disk image to install the commit you created.
You installed the
You installed the
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.
qcowVM disk file to install the (.iso) image. That is an image of a hard drive for the virtual machine (VM). For example:
$ qemu-img create -f qcow2 diskfile.qcow2 20G
virt-installcommand 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
This command instructs
- Instructs the VM to use UEFI to boot, instead of the BIOS.
- Mount the installation ISO.
Use the hard drive image created in the first step.
It gives you an Anaconda Installer. The RHEL Installer starts, loads the Kickstart file from the ISO and executes the commands, including the command to install the RHEL for Edge image commit. Once the installation is complete, the installer prompts for login details.Note
Anaconda is preconfigured to use the Container commit during the installation. However, you need to set up system configurations, such as disk partition, timezone, between others.
Connect to Anaconda GUI with
virt-viewerto setup the system configuration:
$ virt-viewer --connect qemu:///system --wait VM_NAME
- Reboot the system to finish the installation.
- On the login screen, specify your user account credentials and click Enter.
Verify whether the RHEL for Edge image is successfully installed.
$ rpm-ostree status
The command output provides the image commit ID and shows that the installation is successful.