Skip to content

Feature: cloudInit ​

Description ​

A shared element feature that installs cloud-init and ships a hook that recreates the cloud-init default user after an /etc overlay reset (see USI in-place updates).

What it does ​

  • Installs cloud-init.
  • Ships /usr/lib/gardenlinux/etc-setup-hooks/00-cloud-init-useradd, a hook that runs after an /etc reset to recreate the default user (name, UID, GID, shell, supplementary groups, and sudo rule) derived from the surviving /home/<user> directory and the static cloud-init configuration.
  • Ships a systemd drop-in (gardenlinux-etc-setup-hooks.service.d/10-after-cloud-config.conf) that orders the etc-setup-hooks service after cloud-config.service, so the hook observes cloud-init's final state without racing it.

Files ​

FilePurpose
info.yaml (ref)Declares type: element.
pkg.include (ref)Installs cloud-init.
file.include/usr/lib/gardenlinux/etc-setup-hooks/00-cloud-init-useradd (file.include)Hook that recreates the cloud-init default user after an /etc reset.
file.include/etc/systemd/system/gardenlinux-etc-setup-hooks.service.d/10-after-cloud-config.conf (file.include)Systemd drop-in ordering the hook service after cloud-config.service.

Included by:

Works with:

  • _usi — provides the /etc overlay reset mechanism and the etc-setup-hooks runner that executes this feature's hook.