Chapter 3. Installing the Red Hat Edge Manager on Ansible Automation Platform
Install the Red Hat Edge Manager to manage edge devices and applications at scale. This guide focuses on a standalone deployment of the Red Hat Edge Manager on Red Hat Enterprise Linux alongside Ansible Automation Platform.
3.1. Installing the Red Hat Edge Manager RPM package Copy linkLink copied to clipboard!
Prepare your Red Hat Enterprise Linux host for the installation of the Red Hat Edge Manager by enabling the necessary repositories, installing the flightctl-services package, configuring the baseDomain, and then starting and verifying the running services.
Prerequisites
- An active Ansible Automation Platform subscription with a running instance and the necessary API URLs and OAuth credentials.
- A separate machine from Ansible Automation Platform to install the Red Hat Edge Manager on.
- Podman installed for managing containers.
A Red Hat Enterprise Linux host with:
- Minimal installation
- 4 cores and 16GB RAM (recommended)
- Administrative access (root or sudo-capable user)
- SSH access
Procedure
- SSH into your Red Hat Enterprise Linux host.
Authenticate and log in to the Red Hat Container Registry:
sudo podman login registry.redhat.io
sudo podman login registry.redhat.ioCopy to Clipboard Copied! Toggle word wrap Toggle overflow Install the necessary repositories and packages:
Ensure that the Ansible Automation Platform repositories are enabled by running the following example command based on the version of Red Hat Enterprise Linux and architecture of your host:
sudo subscription-manager repos --enable ansible-automation-platform-2.5-for-rhel-9-x86_64-rpms
sudo subscription-manager repos --enable ansible-automation-platform-2.5-for-rhel-9-x86_64-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Install the Red Hat Edge Manager service by running:
sudo dnf install -y flightctl-services
sudo dnf install -y flightctl-servicesCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Update the installed
/etc/flightctl/service-config.yamlto set thebaseDomain:sudo vi /etc/flightctl/service-config.yaml
sudo vi /etc/flightctl/service-config.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantEnsure that you set the
baseDomainin the service configuration correctly. By default, the installation process attempts to automatically set this value based on the IP address of your Red Hat Enterprise Linux host.However, if your environment uses a specific domain name to access this host, for example
rhem-example.com, it is recommended that you manually update thebaseDomainin/etc/flightctl/service-config.yamlto this hostname.Setting the
baseDomaincorrectly ensures that all generated URLs, certificates, and internal configurations within the Red Hat Edge Manager are accurate for your network setup. This is especially important for integration with Ansible Automation Platform and for ensuring that the UI is accessible through the intended domain name.You can check the currently configured
baseDomainusing:grep baseDomain: /etc/flightctl/service-config.yaml
grep baseDomain: /etc/flightctl/service-config.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Enable and start the services:
sudo systemctl enable flightctl.target sudo systemctl start flightctl.target
sudo systemctl enable flightctl.target sudo systemctl start flightctl.targetCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that services are running:
sudo systemctl list-units flightctl-*.service
sudo systemctl list-units flightctl-*.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow You should see these 7 services running:
- flightctl-db
- flightctl-kv
- flightctl-api
- flightctl-periodic
- flightctl-worker
- flightctl-ui
- flightctl-cli-artifacts
Go to the UI at the
baseDomainstored in the service configuration file:grep baseDomain: /etc/flightctl/service-config.yaml
grep baseDomain: /etc/flightctl/service-config.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Visit the displayed
baseDomainin your web browser to access the UI.
Troubleshooting
If your services do not run correctly, use the following log command to troubleshoot further and remediate:
journalctl -u flightctl-<impacted service> -b --no-pager
journalctl -u flightctl-<impacted service> -b --no-pager
3.2. Set up the OAuth application for Ansible Automation Platform Copy linkLink copied to clipboard!
You have two options for setting up the OAuth application in Ansible Automation Platform, either manually or automatically in the Ansible Automation Platform UI.
3.2.1. Setting up the OAuth application automatically Copy linkLink copied to clipboard!
Automatic setup of an OAuth application by generating an OAuth token within Ansible Automation Platform and adding it to your configuration file. Upon service startup, the application is automatically created, and the client ID updated.
Procedure
Generate an OAuth token in Ansible Automation Platform:
-
From the navigation panel, select
. - Select a user with write permissions to the Default organization (admin user recommended).
- Click the Tokens tab for that user.
Click and enter the relevant details.
- Scope: Select Write.
-
From the navigation panel, select
-
Go to the Integrating with Ansible Automation Platform section for the steps to edit your
service-config.yamlfile and complete setting up the OAuth application automatically.
3.2.2. Setting up the OAuth application manually Copy linkLink copied to clipboard!
Manually set up an OAuth application within your Ansible Automation Platform instance. This is important for enabling token-based authentication and integrating external applications such as the Red Hat Edge Manager.
Procedure
-
From the navigation panel on your Ansible Automation Platform instance, go to
. - Click .
Enter the following details:
- Name: Enter a name such as "Red Hat Edge Manager". This is the name visible in the Ansible Automation Platform UI.
-
URL: The
baseDomainof your Red Hat Edge Manager UI withhttps://. - Organization: Select Default.
- Authorization grant type: Select Authorization code.
- Client: Select Public.
Redirect URIs:
-
The redirect configured for your UI is your
baseDomainwith a /callback route appended, such ashttps://your-edge-manager-ip-or-domain:443/callback. If you have more than one URI, enter them in this field separated by a space, not commas or other delimiters. -
To provide a redirect for CLI usage (
flightctl login), configure a redirect URI, such ashttp://127.0.0.1/callback.
-
The redirect configured for your UI is your
- Click . An Application Links section is now visible in the navigation panel.
-
Copy the Client ID as you need it to update the oAuthApplicationClientId in your
service-config.yamlfile with this value. -
Go to the Integrating with Ansible Automation Platform section for the steps to edit your
service-config.yamlfile and complete setting up the OAuth application manually.
Additional resources
3.2.3. Integrating with Ansible Automation Platform Copy linkLink copied to clipboard!
Integrate the Red Hat Edge Manager with your Ansible Automation Platform instance by modifying the service-config.yaml file to include authentication type, API URLs, OAuth client ID, and an optional OAuth token, followed by restarting the services.
Procedure
Stop the flightctl services before editing your
service-config.yamlfile:sudo systemctl stop flightctl.target
sudo systemctl stop flightctl.targetCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the integration settings by editing the configuration file:
sudo vi /etc/flightctl/service-config.yaml
sudo vi /etc/flightctl/service-config.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Update the configuration file to integrate with Ansible Automation Platform:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The domain name or IP for the host, this is automatically set when the RPM is installed but you can override this. It is the only field that is mandatory.
- 2
- Set this to
aapto enable Ansible Automation Platform authentication. - 3
- Set to
false. Only set this totrueto skip TLS certificate verification for the Ansible Automation Platform URLs. For production environments, consider configuring a CA certificate (see the Self-signed certificates section). - 4
- The internal facing API URL for the running Ansible Automation Platform instance that makes requests against. You can configure this URL to be an internally accessible URL for the running Ansible Automation Platform instance. For example, if there are separate internal or external ingresses.
- 5
- The externally accessible URL of your running Ansible Automation Platform instance.
- 6
- If you are using the automatic method, this field is not necessary. This is the Client ID of the OAuth application configured in Ansible Automation Platform for the Red Hat Edge Manager. If you do not have one yet, you can leave this empty and give an
oAuthTokento allow the setup to create it. - 7
- If you are using the manual method, this field is not necessary. This is an OAuth token with write permissions for the "Default" organization in your Ansible Automation Platform instance. This is only needed if you want the setup process to automatically create the OAuth application. Once created, this token is no longer necessary.
Start the services:
sudo systemctl start flightctl.target
sudo systemctl start flightctl.targetCopy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3. Self-signed certificates Copy linkLink copied to clipboard!
The Red Hat Edge Manager services automatically generate and store self-signed certificates in the /etc/flightctl/pki directory. These include:
-
/etc/flightctl/pki/ca.crt -
/etc/flightctl/pki/ca.key -
/etc/flightctl/pki/client-enrollment.crt -
/etc/flightctl/pki/client-enrollment.key -
/etc/flightctl/pki/server.crt -
/etc/flightctl/pki/server.key
You can use your own custom certificates by placing them in the following locations:
Custom Server Certificate/Key Pair:
-
/etc/flightctl/pki/server.crt -
/etc/flightctl/pki/server.key
-
Custom CA Certificate for Ansible Automation Platform authentication:
-
/etc/flightctl/pki/auth/ca.crt
-
Ensure that you adjust the insecureSkipTlsVerify setting in the service-config.yaml if you use a custom CA certificate for your Ansible Automation Platform instance.