Menu Close
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:
- Download the RHEL for Edge Container. See Downloading a RHEL for Edge image for information on 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 Installer blueprint
- Build the RHEL for Edge Installer image
- Prepare a qcow disk
- 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:
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
- 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
.$ cat ./commit_ID-container.tar | sudo podman load
The command output provides the image ID, for example: @8e0d51f061ff1a51d157804362bc875b649b27f2ae1e66566a15e7e6530cec63
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
The
podman tag
command assigns an additional name to the local image.Run the container named
edge-container
.$ sudo podman run --name=edge-container -p 8080:8080 localhost/edge-container
The
podman run --name=edge-container
command assigns a name to your container based on thelocalhost/edge-container
image.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.
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 Installer (.iso) pulls the commit served by RHEL for Edge Container (.tar). After the RHEL for Edge container is loaded in Podman, it exposes the OSTree in the URL format.
To create the RHEL for Edge Installer image in web console, follow the steps:
Prerequisites
- You created a blueprint for RHEL for Edge image. See Creating a blueprint for the RHEL for Edge Installer image using Image Builder in RHEL web console
- On a RHEL system, you have accessed the Image Builder dashboard.
Procedure
- On the Image Builder dashboard, for the RHEL for Edge Installer blueprint that you have created for RHEL for Edge image, click Create Image.
On the Create Image window, perform the following steps:
- In the Repository textbox, specify the RHEL for Edge container OSTree URL to embed in the image. For example, http://localhost:8080/repo
-
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
. Click Create.
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.
9.3. Installing the RHEL for Edge image for non-network-based deployments
To install the RHEL for Edge image, follow the steps:
Prerequisites
- You created a RHEL for Edge ISO image.
- You stopped the running container.
- A disk image to install the commit you created.
Procedure
Create an empty qcow image to install the (.iso). That is an image of a hard drive for the virtual machine (VM). For example:
$ qemu-img create -f qcow2 diskfile.qcow2 5G
Boot the VM using the disk as a drive and the installer ISO as a CD-ROM. For example:
$ qemu-system-x86_64 \ -enable-kvm \ -m 4G \ -cpu host \ -net nic,model=virtio \ -net user,hostfwd=tcp::2223-:22 \ -cdrom $HOME/Downloads/RHEL-Installer-x86_64-33-1.2.iso \ disk-image.img
This command instructs qemu, the hypervisor, to:
- Use KVM virtualization.
- Increase memory to 4000MB (some processes are consuming lots of memory, for example dnf).
- Use the same CPU type as the host uses.
- Connect the guest to a virtual network bridge on the host and forward TCP port 2223 from the host to the SSH port (22) on the guest.
- Mount the installation ISO.
Use the hard drive image created above.
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.
NoteAnaconda is preconfigured to use the container commit during the installation.
- On the Login screen, specify your user account credentials and click Enter.
Verification steps
Verify whether the RHEL for Edge image is successfully installed.
$ rpm-ostree status
As a result, the command output provides the image commit ID and shows that the installation is successful.