Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 7. Deploying a RHEL for Edge image in a non-network-based 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
-
Prepare a
.qcow2disk - Boot the Virtual Machine (VM)
- Install the image
7.1. Creating a RHEL for Edge Container image for non-network-based deployments Copier lienLien copié sur presse-papiers!
You can build a running container by loading the downloaded RHEL for Edge Container OSTree commit into Podman. For that, follow the steps:
Prerequisites
- You created and downloaded a RHEL for Edge Container OSTree commit.
-
You have installed
Podmanon your system. See the Red Hat Knowledgebase solution How do I install Podman in RHEL.
Procedure
- Navigate to the directory where you have downloaded the RHEL for Edge Container OSTree commit.
Load the RHEL for Edge Container OSTree commit into
Podman.sudo podman load -i UUID-container.tar
$ sudo podman load -i UUID-container.tarCopy to Clipboard Copied! Toggle word wrap Toggle overflow The command output provides the image ID, for example:
@8e0d51f061ff1a51d157804362bc875b649b27f2ae1e66566a15e7e6530cec63Tag the new RHEL for Edge Container image, using the image ID generated by the previous step.
sudo podman tag image-ID localhost/edge-container
$ sudo podman tag image-ID localhost/edge-containerCopy to Clipboard Copied! Toggle word wrap Toggle overflow The
podman tagcommand assigns an additional name to the local image.Run the container named
edge-container.sudo podman run -d --name=edge-container -p 8080:8080 localhost/edge-container
$ sudo podman run -d --name=edge-container -p 8080:8080 localhost/edge-containerCopy to Clipboard Copied! Toggle word wrap Toggle overflow The
podman run -d --name=edge-containercommand assigns a name to your container-based on thelocalhost/edge-containerimage.List containers:
sudo podman ps -a
$ 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-containerCopy to Clipboard Copied! Toggle word wrap Toggle overflow
As a result, Podman runs a container that serves an OSTree repository with the RHEL for Edge Container commit.
7.2. Creating a RHEL for Edge Installer image for non-network-based deployments Copier lienLien copié sur presse-papiers!
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:
Prerequisites
- You created a blueprint for RHEL for Edge image.
- You created a RHEL for Edge Container image and deployed it using a web server.
Procedure
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
# composer-cli compose start-ostree --ref rhel/8/x86_64/edge --url URL-OSTree-repository blueprint-name image-typeCopy to Clipboard Copied! Toggle word wrap Toggle overflow 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.
- blueprint-name is the RHEL for Edge Installer blueprint name.
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.
Check the image compose status.
composer-cli compose status
# composer-cli compose statusCopy to Clipboard Copied! Toggle word wrap Toggle overflow The command output displays the status in the following format:
<UUID> RUNNING date blueprint-name blueprint-version image-type
<UUID> RUNNING date blueprint-name blueprint-version image-typeCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe image creation process takes a few minutes to complete.
To interrupt the image creation process, run:
composer-cli compose cancel <UUID>
# composer-cli compose cancel <UUID>Copy to Clipboard Copied! Toggle word wrap Toggle overflow To delete an existing image, run:
composer-cli compose delete <UUID>
# composer-cli compose delete <UUID>Copy to Clipboard Copied! Toggle word wrap Toggle overflow RHEL 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.
7.3. Installing the RHEL for Edge image for non-network-based deployments Copier lienLien copié sur presse-papiers!
To install the RHEL for Edge image, follow the steps:
Prerequisites
- 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
edk2-ovmfpackage. -
You installed the
virt-viewerpackage. You customized your blueprint with a user account. See Creating a blueprint for a RHEL for Edge image using RHEL image builder in RHEL web console.
WarningIf you do not define a user account customization in your blueprint, you will not be able to login to the ISO image.
Procedure
Create a
qcowVM disk file to install the (.iso) image. That is an image of a hard disk drive for the virtual machine (VM). For example:qemu-img create -f qcow2 diskfile.qcow2 20G
$ qemu-img create -f qcow2 diskfile.qcow2 20GCopy to Clipboard Copied! Toggle word wrap Toggle overflow Use the
virt-installcommand to boot the VM using the disk as a drive and the installer ISO image as a CD-ROM. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command instructs
virt-installto:- Instructs the VM to use UEFI to boot, instead of the BIOS.
- Mount the installation ISO.
Use the hard disk 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 RHEL installer prompts for login details.
NoteAnaconda 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
$ virt-viewer --connect qemu:///system --wait VM_NAMECopy to Clipboard Copied! Toggle word wrap Toggle overflow - Reboot the system to finish the installation.
- On the login screen, specify your user account credentials and click .
Verification
Verify whether the RHEL for Edge image is successfully installed.
rpm-ostree status
$ rpm-ostree statusCopy to Clipboard Copied! Toggle word wrap Toggle overflow
The command output provides the image commit ID and shows that the installation is successful.