Install the agent and CLI on air-gapped edge devices

Install flightctl-agent, flightctl-cli, and flightctl-selinux on an air-gapped Red Hat Enterprise Linux edge device from an offline RPM repository or from a portable agent bundle you build on a connected prep machine.

Before you begin

  • An air-gapped Red Hat Enterprise Linux 9 or 10 edge device
  • For Option A: the offline RPM repository on the device with repodata/ present. The baseurl in /etc/yum.repos.d/rhem-offline.repo must match the directory containing repodata/ (see Preparing offline RPMs with subscription repositories).
  • For Option B: a connected prep machine with createrepo_c installed (sudo dnf install -y createrepo_c) and mirror-images available (install flightctl-cli on the prep machine as described in Preparing an offline installation bundle)

Procedure

  1. Choose one of the following installation options.
  2. Option A: Install from a local RPM repository. Use this option when you staged agent RPMs and transferred them to the device.
    1. Copy the repository to the device if needed, then create /etc/yum.repos.d/rhem-offline.repo. For a flat RPM tree from Preparing offline RPMs with subscription repositories Option B, use:
      sudo tee /etc/yum.repos.d/rhem-offline.repo <<'EOF'
      [rhem-offline]
      name=RHEM offline packages
      baseurl=file:///var/rhem-offline-rpms
      enabled=1
      gpgcheck=0
      EOF

      For a full reposync mirror from the same procedure Option A, set baseurl to the repository subdirectory that contains repodata/. See Installing from a local RPM repository in the Additional resources section.

    2. Install the agent and CLI.

      On image-mode hosts, install with all dependencies:

      sudo dnf install -y --disablerepo='*' --enablerepo=rhem-offline \
        flightctl-agent flightctl-cli

      On package-mode hosts, exclude the flightctl-greenboot subpackage by disabling weak dependencies:

      sudo dnf install -y --setopt=install_weak_deps=False \
        --disablerepo='*' --enablerepo=rhem-offline \
        flightctl-agent flightctl-cli

    flightctl-selinux installs automatically as a dependency of flightctl-agent.

  3. Option B: Install from an agent bundle. Use this option for a portable archive with agent RPMs and an install-rpms.sh helper, without building a full offline repository tree.
    1. On a connected prep machine, create the agent bundle:
      ./mirror-images \
          --agent-only \
          --bundle ~/flightctl-agent-bundle.tar.gz \
          --rpm-createrepo \
          --tag-override <version>

      Replace <version> with your target release (for example v1.3.0). To list available flightctl-agent versions on the prep machine:

      dnf list --showduplicates flightctl-agent --disablerepo='*' \
          --enablerepo=flightctl 2>/dev/null | tail -10

      Use the repository name enabled on your prep host when flightctl is not the correct repo ID.

    2. Transfer the bundle to the edge device, or copy the archive with scp:
      scp ~/flightctl-agent-bundle.tar.gz <user>@<device>:~/
    3. On the edge device, extract the bundle and install RPMs:
      mkdir ~/flightctl-agent-bundle
      tar -xzf ~/flightctl-agent-bundle.tar.gz -C ~/flightctl-agent-bundle
      cd ~/flightctl-agent-bundle
      ./install-rpms.sh
      Note

      The install-rpms.sh helper installs all bundled RPMs, including flightctl-greenboot. On package-mode hosts, you can install manually with --setopt=install_weak_deps=False instead of using the helper script to exclude flightctl-greenboot. The flightctl-greenboot subpackage is not needed on package-mode hosts and can be safely excluded.

  4. Configure enrollment before you start the agent to create /etc/flightctl/config.yaml on the device. See Enrolling devices in disconnected environments in the Additional resources section.
  5. Enable and start the agent:
    sudo systemctl enable --now flightctl-agent

Results

  • Verify that the agent, CLI, and SELinux policy packages are installed:
    rpm -q flightctl-agent flightctl-cli flightctl-selinux

    The output lists the installed version of each package.

  • Verify the CLI version:
    flightctl version

    The output reports a version number.

  • Verify that the agent service is running:
    sudo systemctl status flightctl-agent

    The output shows active (running).

  • Verify that the SELinux module is loaded:
    semodule -l | grep flightctl

    The output includes flightctl_agent.

  • On package-mode hosts, verify that the flightctl-greenboot subpackage is not installed:
    rpm -q flightctl-greenboot

    The output returns package flightctl-greenboot is not installed, confirming that the subpackage was correctly excluded.

For errors, see Troubleshooting offline RPM installation in the Additional resources section.