Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write down the ordering of config read #270

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions content/en/docs/Announcements/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ description: "A single stop to learn about Known Issues, Deprecation Warnings an
Starting on v3.5.0, reading of `/etc/elemental/config.yaml` will be deprecated. Use `/etc/kairos/config.yaml` instead. [#2233](https://github.com/kairos-io/kairos/issues/2233)
{{% /alert %}}

{{% alert title="Config dirs read ordering" color="primary" %}}
Starting on v3.2.0, we have agreed on the order the config dirs are read upon. See the [cloud-config]({{< relref "../Architecture/cloud-init/#configuration-order" >}}) page for more info.
{{% /alert %}}

{{% alert title="Remarkable Changes" color="info" %}}
By default, Uki artifacts (identified by the `-uki` suffix) no longer include Linux modules and firmware in the image. Real-world testing has shown that many EFI firmwares are very particular about the size of the EFI image, often refusing to boot if the file exceeds 300-400MB. Given the wide variety of EFI firmware implementations, predicting whether a UKI EFI file will boot on different hardware is challenging.

Expand Down
15 changes: 15 additions & 0 deletions content/en/docs/Architecture/cloud-init.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ In Kairos the `/oem` directory keeps track of all the configuration of the syste

By using the standard cloud-config syntax, a subset of the functionalities are available and the settings will be executed in the boot stage.

### Configuration order

When an action is done (install, upgrade, reset) several default dirs in the system are read to obtain the configuration and are merged together.
The dirs and the order in which they are read and merged is as show below from first to last. Notice that any values found in different dirs will override existing ones in previous dirs.

- /run/initramfs/live (Only available on LiveCD/Netboot)
- /usr/local/cloud-config
- /etc/kairos
- /etc/elemental (deprecated)
- /oem

This means that you could ship an ISO with a bundled config (see [Automated install]({{< relref "../Installation/automated.md" >}}) or [Auroraboot]({{< relref "../Reference/auroraboot.md" >}}) to see how) that adds a generic configuration that you want everywhere, and using userdata you can then overwrite the default config if needed per node/datacenter/deployment, as the useradata is read and stored into `/oem` it will be read later in the process and overwrite whatever you shipped on the defaults bundled with the ISO.

In order to see the final config, you can run on a running system `kairos-agent config` and that should show the final configuration after scanning all sources.

## Boot stages

During boot the stages are emitted in an event-based pattern until a system completes its boot process
Expand Down