An omnifest is the name for the YAML-based format that is used by otk
as its input. otk
transforms omnifests into inputs for other image build tools. To do so it works with directives.
As omnifests can include other omnifests it is important to note that otk
treats the entrypoint omnifest differently from included omnifests. The entrypoint omnifest is the file that is passed to otk compile [file]
. This entrypoint is required to have:
- An otk.version directive.
- An otk.target directive.
A minimal entrypoint would look like:
otk.version: "1"
otk.target.osbuild.example:
example: "data"
The otk.target.<consumer>.<name> directives in the omnifest provide the umbrella to put exports under. They are namespaced to a specific consumer (e.g. osbuild
) and tell otk
which external directives are available, how to format the export, and how to validate the export.
An omnifest that contains a single target will use that target by default:
€ otk compile example.yaml # example from above
# ...
When a file contains multiple targets an error will be shown; you'll have to select the target you want to export.
€ otk compile example.yaml # contains `osbuild.ami` and `osbuild.iso` targets
[05/05/24 09:42:20] CRITICAL CRITICAL:otk.command:omnifest contains multiple targets, please select one with `-t`: ['osbuild.foo', 'osbuild.bar']
€ otk compile example.yaml -t osbuild.iso
# ...
Only a single target can be selected for export.