Debian Codegraph @

doc/source/concept_and_workflow/runtime_configuration.rst

raw
1 .. _runtime_config:
2
3 The Runtime Configuration File
4 ------------------------------
5
6 {kiwi} supports an additional configuration file for runtime-specific
7 settings that do not belong in the image description but which are
8 persistent and are unsuitable for command-line parameters.
9
10 The runtime configuration file must adhere to the `YAML <https://yaml.org/>`_
11 format. {kiwi} reads **every** one of the following locations that exists and
12 merges them, with later entries overriding earlier ones:
13
14 1. :file:`/usr/share/kiwi/kiwi.yml` (vendor)
15
16 2. every :file:`*.yml` in :file:`/usr/share/kiwi/kiwi.yml.d/`, alphabetically
17
18 3. :file:`/etc/kiwi.yml` (administrator)
19
20 4. every :file:`*.yml` in :file:`/etc/kiwi.yml.d/`, alphabetically
21
22 5. :file:`~/.config/kiwi/config.yml`
23
24 6. the file passed via the global `--config` option
25
26 `--config` does not replace the standard lookup, it is merged last and
27 has the highest precedence.
28
29 Both drop-in directories are always scanned, whether or not the corresponding
30 main file exists. A system with no :file:`/etc/kiwi.yml` still loads
31 :file:`/etc/kiwi.yml.d/*.yml`. This allows for modular configuration management,
32 where different aspects of the configuration can be separated into different
33 files.
34
35 .. note::
36
37 Sections are merged key by key. A later file only needs to contain the
38 keys it wants to change; all other keys of the same section from earlier
39 files are kept. Lists, such as the `disable` list in the `runtime_checks`
40 section, are combined from all files with duplicates removed.
41
42 For example, if :file:`/usr/share/kiwi/kiwi.yml` contains
43
44 .. code:: yaml
45
46 bundle:
47 compress: true
48 shasum_size: "512"
49
50 and :file:`/etc/kiwi.yml.d/10-local.yml` contains
51
52 .. code:: yaml
53
54 bundle:
55 shasum_size: "256"
56
57 then the effective `shasum_size` is ``"256"`` and `compress` stays
58 ``true``.
59
60 A default runtime config file in :file:`/usr/share/kiwi/kiwi.yml.example` is
61 provided with the `python3-kiwi` main package. The file contains the available
62 settings as comments, including a short description of each setting.