このコンテンツは選択した言語では利用できません。
Chapter 1. Managing applications on an edge device
You can deploy, update, or remove applications on a device by updating the list of applications in the device specification. When the Red Hat Edge Manager agent checks in and detects the change in the specification, the agent downloads any new or updated application packages and images from an Open Container Initiative (OCI)-compatible registry. Then, the agent deploys the packages to the appropriate application runtime or removes them from that runtime.
1.1. Prerequisites リンクのコピーリンクがクリップボードにコピーされました!
Before getting started, ensure your environment meets the following requirements:
Local Machine Requirements:
- Flight Control CLI: The flightctl CLI must be installed and authenticated with the Flight Control service.
- Helm CLI: Version 3.8+ is required (needed for OCI registry support and chart management).
- Kubernetes Tooling: Either kubectl or oc (OpenShift CLI) must be installed.
-
Container Tools:
crictlmust be available for container runtime interactions.
Device & Environment Requirements:
- Podman: Version 5.0 or above is required for quadlet and container applications.
- Podman Compose: The device’s operating system image must have the podman-compose tool pre-installed.
- Network Configuration: Ensure that your pull-timeout settings are configured to allow for full image downloads based on your network speed.
1.2. Building an application package image リンクのコピーリンクがクリップボードにコピーされました!
Red Hat Edge Manager uses a 1:1 mapping between OpenShift namespaces and Organizations. By leveraging this structure, you can package and deploy workloads using various native formats. Red Hat Edge Manager downloads these application packages from an Open Container Initiative (OCI) compatible registry.
To deploy an application, you must build an OCI "wrapper" image that includes your configuration files and a specific label identifying the application type.
Red Hat Edge Manager supports four application types:
-
compose -
quadlet -
container -
helm
Procedure
-
Prepare your application configuration. Create the configuration file required for your chosen format. For example, if using
quadlet, create a file namedapplication.containerwith your Podman systemd specifications. Create a
Containerfile. Use the following template, replacing theCOPYpath andappTypelabel based on your specific application:FROM scratch COPY application.container /application.container LABEL appType=<application_type>
FROM scratch1 COPY application.container /application.container LABEL appType=<application_type>2 Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define the image destination. Run the following commands to set your repository and versioning:
OCI_IMAGE_REPO=quay.io/<your_org>/<your_image_name> OCI_IMAGE_TAG=v1
OCI_IMAGE_REPO=quay.io/<your_org>/<your_image_name> OCI_IMAGE_TAG=v1Copy to Clipboard Copied! Toggle word wrap Toggle overflow Build the application container image. Run the build command from the directory containing your
Containerfile:podman build -t ${OCI_IMAGE_REPO}:${OCI_IMAGE_TAG} .podman build -t ${OCI_IMAGE_REPO}:${OCI_IMAGE_TAG} .Copy to Clipboard Copied! Toggle word wrap Toggle overflow Push the container image to your registry.
podman push ${OCI_IMAGE_REPO}:${OCI_IMAGE_TAG}podman push ${OCI_IMAGE_REPO}:${OCI_IMAGE_TAG}Copy to Clipboard Copied! Toggle word wrap Toggle overflow
1.3. Deploying applications to a device using the Flight Control CLI リンクのコピーリンクがクリップボードにコピーされました!
Once you have built and pushed your application package image, you can deploy it to a device. When deploying via the Flight Control CLI, you must ensure that any persistent data requirements are defined using volumes within your chosen application format.
1.3.1. Adding volumes to your configuration リンクのコピーリンクがクリップボードにコピーされました!
To ensure data persists across container restarts or updates, define volumes in your configuration file before building your image:
Complete the following steps:
Specify the application package that you want to deploy in the
spec.applicationsfield in theDeviceresource:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For each application in the
applicationssection of the device specification, you can find the corresponding device status information.Verify the status of an application deployment on a device by inspecting the device status information. Run the following command:
flightctl get device/<your_device_id> -o yaml
flightctl get device/<your_device_id> -o yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow See the following example output:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow