systemd-confext --version
systemd-confext --help
systemd-confext --version
systemd-confext --help
systemd-confext --version
systemd-confext --help
/etc/extension-release.d/extension-release.NAME
/etc/extension-release.d/extension-release.NAME
/etc/extension-release.d/extension-release.NAME
sudo mkdir -p /var/lib/confexts/ops-policy/etc/extension-release.d
sudo mkdir -p /var/lib/confexts/ops-policy/etc/systemd/journald.conf.d
sudo mkdir -p /var/lib/confexts/ops-policy/etc/systemd/system/nginx.service.d
sudo mkdir -p /var/lib/confexts/ops-policy/etc/extension-release.d
sudo mkdir -p /var/lib/confexts/ops-policy/etc/systemd/journald.conf.d
sudo mkdir -p /var/lib/confexts/ops-policy/etc/systemd/system/nginx.service.d
sudo mkdir -p /var/lib/confexts/ops-policy/etc/extension-release.d
sudo mkdir -p /var/lib/confexts/ops-policy/etc/systemd/journald.conf.d
sudo mkdir -p /var/lib/confexts/ops-policy/etc/systemd/system/nginx.service.d
. /etc/os-release
printf 'ID=%s\nVERSION_ID=%s\n' "$ID" "$VERSION_ID"
. /etc/os-release
printf 'ID=%s\nVERSION_ID=%s\n' "$ID" "$VERSION_ID"
. /etc/os-release
printf 'ID=%s\nVERSION_ID=%s\n' "$ID" "$VERSION_ID"
sudo tee /var/lib/confexts/ops-policy/etc/extension-release.d/extension-release.ops-policy >/dev/null <<'EOF'
ID=debian
VERSION_ID=12
EOF
sudo tee /var/lib/confexts/ops-policy/etc/extension-release.d/extension-release.ops-policy >/dev/null <<'EOF'
ID=debian
VERSION_ID=12
EOF
sudo tee /var/lib/confexts/ops-policy/etc/extension-release.d/extension-release.ops-policy >/dev/null <<'EOF'
ID=debian
VERSION_ID=12
EOF
sudo tee /var/lib/confexts/ops-policy/etc/systemd/journald.conf.d/10-retention.conf >/dev/null <<'EOF'
[Journal]
SystemMaxUse=1G
SystemKeepFree=500M
MaxRetentionSec=1month
EOF
sudo tee /var/lib/confexts/ops-policy/etc/systemd/journald.conf.d/10-retention.conf >/dev/null <<'EOF'
[Journal]
SystemMaxUse=1G
SystemKeepFree=500M
MaxRetentionSec=1month
EOF
sudo tee /var/lib/confexts/ops-policy/etc/systemd/journald.conf.d/10-retention.conf >/dev/null <<'EOF'
[Journal]
SystemMaxUse=1G
SystemKeepFree=500M
MaxRetentionSec=1month
EOF
sudo tee /var/lib/confexts/ops-policy/etc/systemd/system/nginx.service.d/10-restart-window.conf >/dev/null <<'EOF'
[Service]
Restart=on-failure
RestartSec=5s
EOF
sudo tee /var/lib/confexts/ops-policy/etc/systemd/system/nginx.service.d/10-restart-window.conf >/dev/null <<'EOF'
[Service]
Restart=on-failure
RestartSec=5s
EOF
sudo tee /var/lib/confexts/ops-policy/etc/systemd/system/nginx.service.d/10-restart-window.conf >/dev/null <<'EOF'
[Service]
Restart=on-failure
RestartSec=5s
EOF
sudo systemd-confext list
sudo systemd-confext status
sudo systemd-confext list
sudo systemd-confext status
sudo systemd-confext list
sudo systemd-confext status
sudo systemd-confext merge
sudo systemd-confext merge
sudo systemd-confext merge
sudo systemd-confext status
mount | grep ' on /etc '
sudo systemd-confext status
mount | grep ' on /etc '
sudo systemd-confext status
mount | grep ' on /etc '
sudo cat /etc/systemd/journald.conf.d/10-retention.conf
sudo systemctl cat nginx.service
sudo cat /etc/systemd/journald.conf.d/10-retention.conf
sudo systemctl cat nginx.service
sudo cat /etc/systemd/journald.conf.d/10-retention.conf
sudo systemctl cat nginx.service
sudo systemctl restart systemd-journald
sudo journalctl --disk-usage
sudo systemctl restart systemd-journald
sudo journalctl --disk-usage
sudo systemctl restart systemd-journald
sudo journalctl --disk-usage
sudo systemctl daemon-reload
sudo systemctl show nginx.service -p Restart -p RestartUSec
sudo systemctl daemon-reload
sudo systemctl show nginx.service -p Restart -p RestartUSec
sudo systemctl daemon-reload
sudo systemctl show nginx.service -p Restart -p RestartUSec
sudo systemd-confext unmerge
sudo systemd-confext status
sudo systemd-confext unmerge
sudo systemd-confext status
sudo systemd-confext unmerge
sudo systemd-confext status
sudo systemd-confext refresh
sudo systemd-confext refresh
sudo systemd-confext refresh
sudo mkdir -p /tmp/testroot/etc
sudo cp -a /etc/os-release /tmp/testroot/etc/
sudo cp -a /var/lib/confexts /tmp/testroot/var/lib/
sudo mkdir -p /tmp/testroot/etc
sudo cp -a /etc/os-release /tmp/testroot/etc/
sudo cp -a /var/lib/confexts /tmp/testroot/var/lib/
sudo mkdir -p /tmp/testroot/etc
sudo cp -a /etc/os-release /tmp/testroot/etc/
sudo cp -a /var/lib/confexts /tmp/testroot/var/lib/
sudo systemd-confext --root=/tmp/testroot status
sudo systemd-confext --root=/tmp/testroot merge
find /tmp/testroot/etc -maxdepth 4 | sort
sudo systemd-confext --root=/tmp/testroot unmerge
sudo systemd-confext --root=/tmp/testroot status
sudo systemd-confext --root=/tmp/testroot merge
find /tmp/testroot/etc -maxdepth 4 | sort
sudo systemd-confext --root=/tmp/testroot unmerge
sudo systemd-confext --root=/tmp/testroot status
sudo systemd-confext --root=/tmp/testroot merge
find /tmp/testroot/etc -maxdepth 4 | sort
sudo systemd-confext --root=/tmp/testroot unmerge - rebuild the whole image,
- mutate /etc in place and hope you can track it later,
- bolt on a one-off config management path just for a small policy change. - it is for configuration, not for shipping binaries,
- it is read-only by default,
- it can be merged, unmerged, refreshed, listed, and inspected,
- compatibility is checked against the base OS before merge. - ship a small set of /etc policy files separately from the base image,
- change service configuration without a full image rebuild,
- keep rollback simple by removing one extension layer,
- test configuration overlays against an offline root with --root=. - journald.conf.d/ retention policy
- tmpfiles.d/ cleanup rules
- sysctl.d/ tuning profiles
- systemd/system/*.service.d/ drop-ins
- modprobe.d/ policy files
- ssh/sshd_config.d/ overlays, if your distro uses drop-ins - dependency management,
- earliest-boot configuration before the relevant filesystems are available,
- service payloads or binaries, which belong in packages, portable services, or systemd-sysext. - VERSION_ID=
- CONFEXT_LEVEL= - /run/confexts/
- /var/lib/confexts/
- /usr/lib/confexts/
- /usr/local/lib/confexts/ - caps persistent journal size,
- adds a systemd drop-in for a service. - no (default)
- ephemeral-import - base OS image for the stable platform,
- systemd-sysext for optional /usr tools,
- systemd-confext for runtime /etc policy. - binaries live in one layer,
- configuration lives in another,
- rollback stays understandable. - systemd-sysext / systemd-confext man page (man7 mirror): https://man7.org/linux/man-pages/man8/systemd-sysext.8.html
- os-release / extension-release reference (local man page cross-check): man os-release
- systemd-repart documentation showing DDI generation support for confext: https://manpages.debian.org/testing/systemd/systemd-repart.8.en.html
- systemd upstream discussion for confext design context: https://github.com/systemd/systemd/issues/24864