Chapter 5. Provision devices
You can provision devices with the Red Hat Edge Manager in different environments. Use the operating system image or disk image that you built for use with the Red Hat Edge Manager. Depending on your target environment, provision a physical or virtual device.
See the following sections:
5.1. Provision physical devices Copy linkLink copied to clipboard!
When you build an International Organization for Standardization (ISO) disk image from an operating system image by using the bootc-image-builder tool, the image is similar to the RHEL ISOs available for download. However, your operating system image content is embedded in the ISO disk image.
To install the ISO disk image to a bare metal system without having access to the network, see Deploying a custom ISO container image in the Red Hat Enterprise Linux documentation.
To install the ISO disk image through the network, see Deploying an ISO bootc image over PXE boot in the Red Hat Enterprise Linux documentation.
5.2. Provision devices with OpenShift Virtualization Copy linkLink copied to clipboard!
You can provision a virtual machine on OpenShift Virtualization by using a QCoW2 container disk image that is hosted on an OCI container registry.
If your operating system image does not already contain the Red Hat Edge Manager agent enrollment configuration, you can inject the configuration through the cloud-init user data at provisioning.
5.2.1. Creating the cloud-init configuration Copy linkLink copied to clipboard!
The cloud-init configuration customizes a virtual machine instance on its first boot, allowing you to automatically enroll it as a new agent in your Red Hat Edge Manager service.
Prerequisites
-
You installed the
flightctlCLI and logged in to your Red Hat Edge Manager service instance. -
You installed the
ocCLI, used it to log in to your OpenShift cluster instance, and changed to the project in which you want to create your virtual machine.
Procedure
Request a new Red Hat Edge Manager agent enrollment configuration and store it in a file called
config.yamlby running the following command:flightctl certificate request --signer=enrollment --expiration=365d --output=embedded > config.yaml
flightctl certificate request --signer=enrollment --expiration=365d --output=embedded > config.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a cloud configuration user data file called
cloud-config.yamlthat places the agent configuration in the correct location on the first boot by running the following command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a Kubernetes
Secretthat contains the cloud configuration user data file:oc create secret generic enrollment-secret --from-file=userdata=cloud-config.yaml
oc create secret generic enrollment-secret --from-file=userdata=cloud-config.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2.2. Creating the virtual machine Copy linkLink copied to clipboard!
Create a virtual machine that has its primary disk populated from your QCoW2 container disk image and a cloud-init configuration drive that is populated from your enrollment secret.
Complete the following steps:
Procedure
Create a file that has the
VirtualMachineresource manifest by running the following command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the resource manifest to your cluster by running the following command:
oc apply -f my-bootc-vm.yaml
oc apply -f my-bootc-vm.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Additional resources