Embedding containerized applications in the QM partition
Embedding containerized applications in the QM partition¶
The AutoSD architecture isolates non-critical (QM) applications from critical applications. This isolation mechanism is the QM software partition. In this architecture, the QM partition is an imageless container that uses a subsection of the host filesystem as its root filesystem. This means that you must place your applications in one of two locations:
- Configure OSBuild to copy critical applications to
/etc/containers/systemd - Configure OSBuild to copy non-critical applications to
/etc/containers/systemdinside the QM partition, which is mounted at/usr/lib/qm/. The resulting path for QM applications is/usr/lib/qm/etc/containers/systemd.
To configure the placement of applications in the QM partition, create a new qm stage in your manifest file, and configure
QM-specific operations in the QM partition.
All QM-level containerized applications belong in the QM partition inside the qm stage. Create a content section in the the qm stage
and define the source URL, tag, and name of the container image.
You can view a complete example manifest for QM container configuration in the demos/container_qm/container_qm.aib.yml file.
Prerequisites
-
One or more container images available from a local or remote registry.
Note
Installing container images from local storage is appropriate only for development and experimental purposes.
Procedure
-
Include the
qmstage in your manifest to initialize the QM partition. Addcontentandcontainer_imagessections to theqmstage so that you can define the container images that you want to install:YAML title="Automotive Image Builder manifest (container_images)" --8<-- "demos/container_qm/container_qm.aib.yml:19:31"Note
To install a container image from local storage, set the
containers-transport: containers-storageparameter. -
Optional. If you have container configuration files that you want to copy to the image, use the
add_filessection within thecontentsection. For example, copy the exampleradio.containerandengine.containerfiles to the image:YAML title="Automotive Image Builder manifest (add_files)" --8<-- "demos/quadlet_radio_engine/quadlet_radio_engine.aib.yml:6:6" --8<-- "demos/quadlet_radio_engine/quadlet_radio_engine.aib.yml:25:29"Note
The
source_path:option resolves a relative path. In this example, the container configuration files are in the../demosdirectory.
Next steps
Now that you have included your containerized application in your Automotive Image Builder manifest, you can build your AutoSD image. For more information, see Building an image from a custom manifest.