Configuration
Learn how to write Katsu manifests
Katsu images are defined using "Manifests".
A manifest is a modular YAML file that defines the content inside the image, and scripts to run when the image is built.
A manifest is made up of a number of sections, each of which is optional. However, though some sections should only be defined by a manifest that will be used as an entrypoint so the image can be functional.
Sections
builder
The builder section defines the image that will be used to build the image. This is currently limited to only DNF
based images.
distro
This section defines the product name of the image. It is used for ISO images to name the boot entry.
scripts
This section defines the scripts that will be run before and after the image is built.
They have two sub-sections, pre and post, which define the scripts to run before and after the image is built.
Both of these has the same format described below.
The contents in the subsections are defined as arrays.
scripts.*.[].inline
A string containing the script to run, can be replaced with file (optional)
scripts.*.[].file
A path to a file containing the script to run, can be replaced with inline (optional)
scripts.*.[].id
A unique identifier for the script, used for dependency trees, similar to how Ansible works (optional)
scripts.*.[].needs
A list of script IDs that must be run before this script (optional)
scripts.*.[].name
A name for the script, used for logging (optional)
Files should be placed in the same directory as the manifest file that loads it.
So if the manifest that loads hello-world-file is in modules/hello.yaml, the file should be in modules/hello-world.sh
The best practice is to create a separate folder for each module, and place the required files in that folder.
dnf
This section configures the DNF package manager.
dnf.releasever
The release version DNF should pull repos from, replaces DNF's $releasever variable.
dnf.repodir
The directory to load repositories from.
dnf.options
A list of additional arguments to pass to DNF.
dnf.exclude
A list of packages to exclude from the image.
dnf.packages
A list of packages to install in the image.
This can also be any DNF spec string that DNF understands, such as @core or foo.x86_64
dnf.arch_packages
A map of packages to install for each architecture. The key is the architecture, and the value is a list of packages to install.
dnf.arch_exclude
A map of packages to exclude from the image per each architecture. The key is the architecture, and the value is a list of packages to exclude from the image.
disk
This section configures the disk layout (GPT only)
disk.size
The total size of the disk image, defined by bytesize
disk.partitions
A list of partitions to create on the disk.
disk.partitions.[].label
The label of the partition
disk.partitions.[].size
The size of the partition, defined by bytesize
disk.partitions.[].filesystem
The filesystem to format the partition with mkfs
disk.partitions.[].mountpoint
The mountpoint to mount the partition at relative to the root of the image.
The order of the partitions is important, as they are created in the order they are defined, however, mountpoints will be sorted
by nesting level, so / will be mounted first, then /boot, then /boot/efi. This is done using a topological sort algorithm.
If the mountpoint depths are the same, they will be sorted alphabetically.
import.[]
File paths to other manifests to import and merge into the current manifest during runtime. Must be relative to the current manifest.
Not all attributes get merged when importing another manfiest. The following attributes are not merged:
bootloaderisodiskdnfwith the exception ofdnf.packagesdnf.arch_packagesdnf.arch_excludednf.optionsdnf.excludednf.repodir
users.[]
A list of users to create in the image.
users.[].name
The username of the user
users.[].password
The password of the user, must be hashed using crypt(3)
users.[].uid
The UID of the user
users.[].gid
The GID of the user
users.[].groups.[]
A list of groups to add the user to
users.[].shell
The shell of the user
users.[].ssh_keys.[]
A list of SSH keys to add to the user's authorized_keys file
users.[].create_home
Whether to create the user's home directory
Must be a boolean, defaults to true