Provisioning devices

Red Hat Edge Manager 1.3

Provisioning Red Hat Edge Manager devices

Red Hat Edge Manager Documentation Team

Abstract

This document provides information about Provisioning Red Hat Edge Manager devices

Chapter 1. Provisioning devices

You can provision devices with Red Hat Edge Manager in different environments. Use the operating system image or disk image that you built and, depending on your target environment, provision a physical or virtual device. You can also use images created with the simplified image building workflow to provision devices.

When you install a bootc image from the Software Catalog to a device that is not yet enrolled, the Flight Control web console provides scenario-specific provisioning guidance. The guidance includes links to download the required artifacts, for example, ISO or QCow2. Use that guidance together with the provisioning procedures.

Note

Provisioning requires cluster administrator access.

1.1. Provisioning physical devices

When you build an ISO disk image from an operating system image by using the bootc-image-builder tool, the image is similar to the Red Hat Enterprise Linux ISO images available for download. However, the ISO disk image embeds your operating system image content.

To install the ISO disk image to a bare metal system without having access to the network, see Deploying a custom ISO container image.

For information about installing the ISO through the network, see Deploying an ISO bootc image over PXE boot.

After you install a factory image to a physical device, you can use the optional first-boot onboarding wizard to provide onsite network and enrollment configuration before the device joins Red Hat Edge Manager. See Device onboarding at first boot in the Additional resources section.

1.2. Provision devices on OpenShift Virtualization

You can provision a virtual machine on OpenShift Virtualization by using a QCow2 container disk image 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 during provisioning.

Prerequisites

  • OpenShift Virtualization is installed on your OpenShift Container Platform cluster.
  • You have built a QCow2 container disk image and pushed it to an OCI container registry.
  • The flightctl CLI is installed, and you are logged in to your Red Hat Edge Manager service instance.
  • The oc CLI is installed, you are logged in to your OpenShift Container Platform cluster instance, and you have changed to the project in which you want to create your virtual machine.

Procedure

  1. Request a new Red Hat Edge Manager agent enrollment configuration and store it in a file called config.yaml. Run the following command:

    flightctl certificate request --signer=enrollment --expiration=365d --output=embedded > config.yaml
  2. Create a cloud configuration user data file called cloud-config.yaml that places the agent configuration in the correct location during the first boot. Run the following command:

    cat <<EOF > cloud-config.yaml
    #cloud-config
    write_files:
    - path: /etc/flightctl/config.yaml
      content: $(cat config.yaml | base64 -w0)
      encoding: b64
      permissions: '0600'
    EOF
  3. Create a Kubernetes Secret that contains the cloud configuration user data file:

    oc create secret generic enrollment-secret --from-file=userdata=cloud-config.yaml
  4. Create a file that contains the VirtualMachine resource manifest. Replace <your_registry>/<your_repo>:<your_tag> with the location of your QCow2 container disk image. Run the following command:

    cat <<'EOF' > my-bootc-vm.yaml
    apiVersion: kubevirt.io/v1
    kind: VirtualMachine
    metadata:
      name: my-bootc-vm
    spec:
      runStrategy: RerunOnFailure
      template:
        spec:
          domain:
            cpu:
              cores: 1
            memory:
              guest: 1024M
            devices:
              disks:
                - name: containerdisk
                  disk:
                    bus: virtio
                - name: cloudinitdisk
                  disk:
                    bus: virtio
          volumes:
            - name: containerdisk
              containerDisk:
                image: <your_registry>/<your_repo>:<your_tag>
            - name: cloudinitdisk
              cloudInitConfigDrive:
                secretRef:
                  name: enrollment-secret
    EOF
  5. Apply the resource manifest to your cluster by running the following command:

    oc apply -f my-bootc-vm.yaml

Verification

  • Verify that the virtual machine was created and is running:

    oc get vm my-bootc-vm

Chapter 2. Device onboarding at first boot

When a factory-imaged physical edge device boots for the first time, an optional onboarding wizard lets onsite personnel supply per-device settings before the device enrolls into Red Hat Edge Manager. The wizard runs as a Cockpit plugin and is delivered by the flightctl-onboarding RPM.

Image requirement

The flightctl-onboarding RPM is required in the device operating system image only when you use first-boot onboarding. Include this package when you build images for devices that need per-site configuration before they can enroll into Red Hat Edge Manager. You do not need this package when the image already provides working network connectivity, enrollment credentials, and agent configuration at deploy time. In that case, the device can enroll through the standard flow without the wizard. To include the package when you build an image, see the Additional resources section.

When to use first-boot onboarding

Use first-boot onboarding when the following apply:

  • The device is a physical system with a factory-installed operating system image that includes the flightctl-onboarding RPM.
  • The device requires per-site configuration before it can enroll. Examples include:

    • The device cannot obtain network settings through DHCP or platform metadata services such as cloud-init or Ignition.
    • The device needs a site-specific hostname, labels, or enrollment credentials that are not baked into the image.
    • Onsite personnel must configure a production network interface, proxy, or NTP server before the device can reach the Red Hat Edge Manager service.
  • Onsite personnel can access the device through at least one of the following:

    • A local console with a keyboard, mouse, and browser
    • Wired ethernet to a setup IP address on the device
    • A laptop or phone connected to the temporary WiFi access point the device advertises for wizard access

The onboarding wizard collects per-device configuration such as hostname, labels, production network settings, and enrollment credentials. These settings let the device reach the Red Hat Edge Manager service and complete enrollment.

Onboarding workflow

The end-to-end workflow inserts an optional onsite customization step between image deployment and normal device management:

  1. The device boots and the flightctl-onboarding service starts.
  2. Onsite personnel connect to the onboarding wizard and provide per-device configuration.
  3. The onboarding service applies hostname, labels, network, and other settings required at the deployment site. It provisions enrollment credentials through late binding or certificate generation when the image does not include them. It then runs validation checks.
  4. The onboarding service removes the temporary onboarding user, tears down the WiFi access point if active, disables itself, and does not run again on subsequent boots.
  5. The Red Hat Edge Manager agent enrolls the device automatically using the standard enrollment flow.
  6. An authorized user approves the enrollment request in the Red Hat Edge Manager web console or by using the Flight Control CLI. When an enrollment approval policy matches the device request — for example, based on labels or region — the service can auto-approve the request without manual intervention.
Note

When a device already has working network connectivity and agent configuration, the wizard step can be skipped and the agent enrolls through the standard enrollment flow.

For approval steps and CLI commands, see Enrolling devices in the Additional resources section.

Provisioning and production interfaces

The onboarding system distinguishes between two logical network interfaces:

  • Provisioning interface: The network path through which onsite personnel reach the Cockpit onboarding wizard. This interface can be a temporary WiFi access point, a setup IP on an ethernet port, or local console access at Content from localhost is not included.https://localhost:9090. The temporary WiFi access point exists only to reach the wizard; it is not the production network. For connection details, see the Additional resources section.
  • Production interface: The network interface that the device uses for internet connectivity and for the Red Hat Edge Manager agent to reach the service after onboarding completes. When the device uses WiFi for production connectivity, you configure connection to the site access point or router in a separate wizard step.

On some devices, both logical interfaces map to the same physical network port. On others, provisioning and production traffic use separate physical interfaces. When provisioning and production share one interface, the wizard warns you before it applies production settings. After you confirm, the wizard delegates cleanup to a background process so that it completes even when the browser connection is lost during the network change.

Before you begin onsite

When a device with the flightctl-onboarding RPM boots for the first time, confirm that you can reach the device. Use at least one supported access method before onsite personnel start the wizard. See Access the onboarding wizard in the Additional resources section.

You do not need to bake enrollment credentials into the image in advance. The wizard supports full late binding: onsite personnel enter the enrollment endpoint and operator credentials, and the wizard generates an enrollment certificate for the device agent. Operator credentials are separate from the temporary onboarding user on the device. The enrollment certificate secures the agent’s initial connection to the Red Hat Edge Manager service; you do not enter it manually. See Enrollment methods and Enrolling devices in the Additional resources section.

2.1. Access the onboarding wizard

Connect to the Cockpit-based onboarding wizard on a device that is running the first-boot onboarding service. You can use wired ethernet, a temporary WiFi access point with captive portal, or a local console with a keyboard, mouse, and browser.

Prerequisites

  • The device has booted and the flightctl-onboarding service is active.
  • The device has not completed onboarding.

Procedure

  1. Choose one of the following access methods and complete the associated steps:

    Note

    WiFi and wired access methods use http:// (plain HTTP), while local console access uses https://. Cockpit listens on port 9090 in all cases, but the setup interfaces use IP addresses that do not have browser-trusted TLS certificates. Using HTTP on these interfaces avoids certificate warnings in the browser. Local console access uses Content from localhost is not included.https://localhost:9090 because Cockpit generates a self-signed certificate that browsers accept for localhost.

    Accessing the wizard over WiFi

    When the device has a WiFi interface and the required access-point packages are installed, the onboarding service advertises a temporary WiFi network with a captive portal. This network exists only so you can reach the onboarding wizard. You configure production WiFi connectivity to your site router in a separate wizard step.

    1. On your phone or laptop, open the WiFi settings and connect to the temporary network whose name starts with flightctl- followed by a device-specific suffix. The default WiFi password is onboarding.
    2. When your operating system detects a captive portal, accept the network sign-in prompt. Your browser automatically redirects to the onboarding wizard.
    3. If your browser does not open automatically, open a browser manually and navigate to Content from 10.42.0.1 is not included.http://10.42.0.1:9090 while you are still connected to the temporary network.
    4. If you still cannot reach the wizard over WiFi, use a wired or local-console access method instead. See Troubleshoot device onboarding in the Additional resources section.
    5. Log in to Cockpit with the username onboarding.
    Note

    If hostapd or dnsmasq is not installed on the device, the WiFi access point is unavailable. Use a wired or local-console access method instead.

    Accessing the wizard over wired ethernet

    When the device exposes a setup IP address on an ethernet interface, connect a laptop directly or through a provisioning switch.

    1. Connect your laptop to the same ethernet segment as the device setup interface.
    2. Open a browser and navigate to Content from 192.168.100.1 is not included.http://192.168.100.1:9090. If the image uses a custom static IP for the setup interface, use that address instead.
    3. Log in to Cockpit with the username onboarding.

    Accessing the wizard from the local console

    When the device has a display, keyboard, mouse, and browser, or when you have out-of-band console access:

    1. On the device, open a browser and navigate to Content from localhost is not included.https://localhost:9090.
    2. Log in to Cockpit with the username onboarding.

2.2. Configure a device in the onboarding wizard

Use the Cockpit onboarding wizard to set the device hostname, labels, network settings, and operator credentials for late binding before the device enrolls into Red Hat Edge Manager. Review the configuration on a summary screen before the wizard applies changes.

Prerequisites

  • You completed the steps in Access the onboarding wizard.
  • You know the hostname, network settings, and labels that the device requires at your deployment site.
  • When the image does not include enrollment credentials, you have operator credentials that authorize certificate requests to the Red Hat Edge Manager service. Examples include a username and password on standalone Red Hat Enterprise Linux deployments or an Red Hat OpenShift Container Platform token.
Note

The wizard uses three different credential types:

  • Onboarding user: the temporary local Cockpit account on the device. See Access the onboarding wizard.
  • Operator credentials: your Red Hat Edge Manager service login, which authorizes the wizard to request enrollment certificates from the server.
  • Enrollment certificate: what the device agent uses to communicate securely with the Red Hat Edge Manager service during enrollment. The wizard generates this certificate automatically; you do not enter it manually.

Procedure

  1. Configure the production network interface:

    • Select the interface the device uses to reach the Red Hat Edge Manager service.
    • Configure IPv4 with DHCP or static addressing.
    • Configure IPv6 when your deployment site requires it.
    • Set DNS servers, gateway, and related settings when you use static addressing.
    • Select a VLAN when your deployment site requires VLAN tagging.
    • When the production interface uses WiFi, configure connection to the site access point or router. This step is separate from the temporary WiFi network you use to access the wizard.
  2. Optional: Configure NTP servers when your deployment site requires time synchronization before enrollment.
  3. Optional: Configure an HTTP proxy for system-wide use when your deployment site requires it.
  4. In the onboarding wizard, set the device hostname.
  5. Optional: Add device labels as key/value pairs.

    Labels that you enter in the wizard are written to /etc/flightctl/conf.d/50-cockpit-labels.yaml and included in the enrollment request. Use labels to identify the device during enrollment approval. For example, add site, rack, or alias labels. For more information about how the agent processes label drop-ins during enrollment, see Device alias and enrollment labels in the Additional resources section.

  6. When the image does not already include enrollment credentials, configure late binding in the wizard. Enter operator credentials so the wizard can request an enrollment certificate from the Red Hat Edge Manager service; you do not enter the enrollment certificate manually.

    • Enter the Red Hat Edge Manager enrollment endpoint URL.
    • Enter operator credentials to authenticate to the Red Hat Edge Manager service.
  7. Review all settings on the summary screen.
  8. Select Apply to commit the configuration.

    The onboarding service applies your settings, enables production network connectivity, and runs validation checks. When validation succeeds, the service cleans up temporary resources, disables itself, and the Red Hat Edge Manager agent enrolls the device automatically. Approve the enrollment request in the Red Hat Edge Manager web console or by using the Flight Control CLI, or configure an enrollment approval policy to auto-approve requests that match conditions such as labels or region. See Enrolling devices in the Additional resources section.

    When provisioning and production traffic share one physical interface, the wizard warns you before it applies production settings. After you select Apply, the wizard delegates cleanup to a background process so that it completes even when the browser connection is lost during the network change.

2.3. Onboarding services and lifecycle reference

The first-boot onboarding subsystem is implemented as a one-shot systemd service. It prepares a temporary Cockpit environment, gates the Red Hat Edge Manager agent until onboarding completes, and cleans up temporary resources after configuration is applied.

Systemd services

The flightctl-onboarding RPM installs the following systemd units:

  • flightctl-onboarding-setup.service — the main setup service. Starts at first boot when /var/lib/flightctl-onboarding/.onboarding-complete does not exist. Creates the temporary onboarding user, configures setup network interfaces, and enables Cockpit with the onboarding plugin.
  • flightctl-onboarding-mask-greenboot.service — masks greenboot-healthcheck.service early in boot so that health checks do not roll back the operating system during onboarding.
  • flightctl-onboarding-dnsmasq@.service — runs dnsmasq DHCP and DNS on a specific interface. Used by both WiFi AP and ethernet flows.
  • flightctl-onboarding-captive-portal@.service — captive portal redirect on the WiFi AP interface. Starts after dnsmasq.
  • onboarding-gate.conf — a drop-in installed into flightctl-agent.service.d/. Adds ConditionPathExists=.onboarding-complete to prevent the agent from starting until onboarding cleanup is done.

Agent startup gating

The Red Hat Edge Manager agent does not start until onboarding completes. After the wizard applies configuration and validation succeeds, the onboarding service cleans up temporary resources, disables itself, removes the gate, and starts the agent. The agent then enrolls automatically.

Failure handling

When network configuration, validation, or enrollment preparation fails, the onboarding service rolls back temporary NetworkManager profiles with the flightctl-onboarding- prefix and saves failure logs. Onboarding remains active so you can reconnect to the wizard and try again.

Onboarding completion marker

Table 2.1. Onboarding completion marker

PathDescription

/var/lib/flightctl-onboarding/.onboarding-complete

Marker file written when onboarding completes successfully. While this file exists, flightctl-onboarding-setup.service does not start on subsequent boots.

RPM package

The flightctl-onboarding RPM delivers the Cockpit plugin, systemd units, and default configuration. The package supports Red Hat Enterprise Linux 9, Red Hat Enterprise Linux 10, CentOS Stream, and Fedora. Include the RPM in the operating system image at build time; see Optional: Include first-boot onboarding (flightctl-onboarding) in the Additional resources section.

Configuration

The onboarding wizard reads configuration from two JSON files, in order of priority:

  1. /etc/cockpit/system-onboarding/config.json — operator override that survives package upgrades. Only include the keys you want to change; unset keys fall back to the package defaults.
  2. /usr/share/cockpit/system-onboarding/config.json — package default installed by the RPM.

Table 2.2. Onboarding configuration options

KeyDefaultDescription

network.wifiAp.enabled

true

Enable or disable the WiFi access point for wizard access.

network.wifiAp.ssidPrefix

"onboarding"

Prefix for the SSID broadcast by the temporary WiFi network. The full SSID is this prefix followed by a device-specific suffix.

network.wifiAp.password

"onboarding"

WPA2 password for the temporary WiFi network.

network.wifiAp.address

"10.42.0.1"

IP address assigned to the WiFi AP interface.

network.ethernet.enabled

true

Enable or disable the ethernet setup interface.

network.ethernet.staticIp

"192.168.100.1"

Static IP address assigned to the ethernet setup interface.

flightctl.defaultEndpoint

(empty)

Pre-populate the enrollment endpoint URL in the wizard so that the operator does not need to enter it manually.

runOnce

true

Disable onboarding after completion. When set to true, the onboarding service does not start on subsequent boots after the completion marker is written.

To customize settings, create an override file at /etc/cockpit/system-onboarding/config.json in the operating system image at build time. Include only the keys you want to change; unset keys fall back to the package defaults.

2.4. Troubleshoot device onboarding

Diagnose common first-boot onboarding failures, inspect service logs, and re-enter onboarding mode when you must repeat the wizard on a device.

Common symptoms

SymptomLikely cause

Temporary wizard WiFi network (name starts with flightctl-) is not visible

Wireless interface unavailable, provisioning WiFi is disabled in image configuration, or hostapd/dnsmasq packages are not installed.

Browser cannot reach Cockpit on port 9090

Setup network not configured, wrong interface selected, or firewall blocking access.

Network apply step fails

Invalid static IP, missing carrier on ethernet port, duplicate address on the network, or invalid VLAN settings. The onboarding service rolls back temporary flightctl-onboarding- NetworkManager profiles and saves failure logs for review.

Device does not appear in the device inventory after configuration

Production interface cannot reach the Red Hat Edge Manager endpoint, enrollment was not approved, or enrollment credentials are missing or invalid. See Enrolling devices in the Additional resources section.

Procedure

  1. Verify that onboarding is still active:

    systemctl status flightctl-onboarding-setup.service
    ls /var/lib/flightctl-onboarding/.onboarding-complete

    When the marker file exists, onboarding has already completed and the wizard is no longer available.

  2. Inspect onboarding service logs:

    journalctl -u flightctl-onboarding-setup.service
    journalctl -u flightctl-onboarding-dnsmasq@*.service
    journalctl -u flightctl-onboarding-captive-portal@*.service
    journalctl -u flightctl-onboarding-mask-greenboot.service
    journalctl -u flightctl-agent.service
  3. When WiFi access is unavailable, confirm that the required packages are installed or use a wired or local-console access method. See Access the onboarding wizard.
  4. When network configuration fails, inspect the saved failure logs and reconnect to the wizard by using a supported access method. Correct the interface, IP address, gateway, DNS, VLAN, or enrollment settings.

    Re-entering onboarding mode

    To run the wizard again on a device that already completed onboarding:

  5. Remove the completion marker:

    rm -f /var/lib/flightctl-onboarding/.onboarding-complete
  6. Re-enable and start the onboarding service:

    systemctl enable flightctl-onboarding-setup.service
    systemctl start flightctl-onboarding-setup.service
    Warning

    Re-entering onboarding mode is intended for lab recovery and field troubleshooting. Removing the marker on a managed production device can interrupt agent operation until onboarding completes again.

Legal Notice

Copyright © Red Hat.
Except as otherwise noted below, the text of and illustrations in this documentation are licensed by Red Hat under the Creative Commons Attribution–Share Alike 3.0 Unported license . If you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, the Red Hat logo, JBoss, Hibernate, and RHCE are trademarks or registered trademarks of Red Hat, LLC. or its subsidiaries in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
XFS is a trademark or registered trademark of Hewlett Packard Enterprise Development LP or its subsidiaries in the United States and other countries.
The OpenStack® Word Mark and OpenStack logo are trademarks or registered trademarks of the Linux Foundation, used under license.
All other trademarks are the property of their respective owners.