core: add activationScript to show closure diff #260

Merged
teutat3s merged 1 commit from closure-diffs into main 2024-11-13 19:47:17 +00:00
Owner

This is useful when updating a host, by doing a dry-run with deploy-rs
we get a list of changed package versions.

Example run:

❯  deploy --targets '.#trinkgenossin' --magic-rollback false --auto-rollback false --keep-result --result-path ./results --skip-checks --dry-activate
🚀 ℹ️ [deploy] [INFO] Evaluating flake in .
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
🚀 ℹ️ [deploy] [INFO] The following profiles are going to be deployed:
[trinkgenossin.system]
user = "root"
ssh_user = "barkeeper"
path = "/nix/store/3n394wwynffldhpwyyqcp600v2bx2y7w-activatable-nixos-system-trinkgenossin-24.05.20241110.9256f7c"
hostname = "trinkgenossin.wg.pub.solar"
ssh_opts = []

🚀 ℹ️ [deploy] [INFO] Building profile `system` for node `trinkgenossin`
🚀 ℹ️ [deploy] [INFO] Copying profile `system` to node `trinkgenossin`
...
would stop the following units: acme-fixperms.service, acme-lockfiles.service, alertmanager.service, audit.service, garage.service, grafana.service, kmod-static-nodes.service, logrotate-checkconf.service, loki.service, mount-pstore.service, network-local-commands.service, nscd.service, prometheus-node-exporter.service, prometheus.service, systemd-modules-load.service, systemd-oomd.service, systemd-oomd.socket, systemd-resolved.service, systemd-sysctl.service, systemd-timesyncd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd.service, systemd-vconsole-setup.service, wireguard-wg-ssh-peer-3UrVLQrwXnPAVXPiTAd7eM3fZYxnFSYgKAGpNMUwnUk\x3d.service, wireguard-wg-ssh-peer-I\x2bgN7v1VXkAGoSir6L8aebtLbguvy5nAx1QVDTzdckk\x3d.service, wireguard-wg-ssh-peer-NNb7T8Jmn\x2bV2dTZ8T6Fcq7hGomHGDckKoV3kK2oAhSE\x3d.service, wireguard-wg-ssh-peer-ZT2qGWgMPwHRUOZmTQHWCRX4m14YwOsiszjsA5bpc2k\x3d.service, wireguard-wg-ssh-peer-bcrIpWrKc1M\x2bHq4ds3aN1lTaKE26f2rvXhd\x2b93QrzR8\x3d.service, wireguard-wg-ssh-peer-fTvULvdsc92binFaBV\x2buWwFi33bi8InShcaPnoxUZEA\x3d.service, wireguard-wg-ssh-peer-iRTlY1lB7nPXf2eXzX8ZZDkfMmXyGjff5-joccbP8Cg\x3d.service, wireguard-wg-ssh-peer-oVF2-s7eIxyVjtG0MhKPx5SZ1JllZg\x2bZFVF2eVYtPGo\x3d.service, wireguard-wg-ssh-peer-qzNywKY9RvqTnDO8eLik75-SHveaSk9OObilDzv\x2bxkk\x3d.service, wireguard-wg-ssh-peer-zOSYGO7MfnOOUnzaTcWiKRQM0qqxR3JQrwx-gtEtHmo\x3d.service, wireguard-wg-ssh.service
would NOT stop the following changed units: getty@tty1.service, systemd-fsck@dev-disk-by\x2dlabel-boot.service, systemd-fsck@dev-disk-by\x2dlabel-data.service, systemd-journal-flush.service, systemd-logind.service, systemd-random-seed.service, systemd-remount-fs.service, systemd-update-utmp.service, systemd-user-sessions.service, user-runtime-dir@1001.service, user@1001.service
would activate the configuration...
extra: ∅ → ε, +28619.1 KiB
git: 2.44.1 → 2.44.2, -49.3 KiB
grafana: 10.4.10 → 10.4.12, +14.0 KiB
grafana-loki: 3.1.1 → 3.1.2
initrd: ∅ → ε
initrd-kmod-blacklist: ∅ → ε
initrd-linux: 6.6.56 → 6.6.60, -21.8 KiB
keymap: ∅ → ε
libarchive: 3.7.4 → 3.7.7, -324.4 KiB
libpcap: 1.10.4 → 1.10.5, +24.9 KiB
linux: 6.6.56, 6.6.56-modules → 6.6.60, 6.6.60-modules, +30.0 KiB
nixos-manual: +22.7 KiB
nixos-system-trinkgenossin: 24.05.20241016.dc2e002 → 24.05.20241110.9256f7c
promtail: 3.1.1 → 3.1.2
python3: 3.11.9 → 3.11.10, +61.4 KiB
source: +3797.0 KiB
stage: ∅ → 1-init.sh, +31.5 KiB
tzdata: 2024a → 2024b, +12.0 KiB
udev: +31.2 KiB
udhcp: ∅ → ε
vim: 9.1.0707 → 9.1.0765, +55.2 KiB
would restart systemd
would reload the following units: dbus.service, firewall.service, reload-systemd-vconsole-setup.service
would restart the following units: dhcpcd.service, home-manager-barkeeper.service, nginx.service, nix-daemon.service, promtail.service, sshd.service, systemd-journald.service
would start the following units: acme-fixperms.service, acme-lockfiles.service, alertmanager.service, audit.service, garage.service, grafana.service, kmod-static-nodes.service, logrotate-checkconf.service, loki.service, mount-pstore.service, network-local-commands.service, nscd.service, prometheus-node-exporter.service, prometheus.service, systemd-modules-load.service, systemd-oomd.socket, systemd-resolved.service, systemd-sysctl.service, systemd-timesyncd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-vconsole-setup.service, wireguard-wg-ssh-peer-3UrVLQrwXnPAVXPiTAd7eM3fZYxnFSYgKAGpNMUwnUk\x3d.service, wireguard-wg-ssh-peer-I\x2bgN7v1VXkAGoSir6L8aebtLbguvy5nAx1QVDTzdckk\x3d.service, wireguard-wg-ssh-peer-NNb7T8Jmn\x2bV2dTZ8T6Fcq7hGomHGDckKoV3kK2oAhSE\x3d.service, wireguard-wg-ssh-peer-ZT2qGWgMPwHRUOZmTQHWCRX4m14YwOsiszjsA5bpc2k\x3d.service, wireguard-wg-ssh-peer-bcrIpWrKc1M\x2bHq4ds3aN1lTaKE26f2rvXhd\x2b93QrzR8\x3d.service, wireguard-wg-ssh-peer-fTvULvdsc92binFaBV\x2buWwFi33bi8InShcaPnoxUZEA\x3d.service, wireguard-wg-ssh-peer-iRTlY1lB7nPXf2eXzX8ZZDkfMmXyGjff5-joccbP8Cg\x3d.service, wireguard-wg-ssh-peer-oVF2-s7eIxyVjtG0MhKPx5SZ1JllZg\x2bZFVF2eVYtPGo\x3d.service, wireguard-wg-ssh-peer-qzNywKY9RvqTnDO8eLik75-SHveaSk9OObilDzv\x2bxkk\x3d.service, wireguard-wg-ssh-peer-zOSYGO7MfnOOUnzaTcWiKRQM0qqxR3JQrwx-gtEtHmo\x3d.service, wireguard-wg-ssh.service
🚀 ℹ️ [deploy] [INFO] Completed dry-activate!
This is useful when updating a host, by doing a dry-run with deploy-rs we get a list of changed package versions. Example run: ``` ❯ deploy --targets '.#trinkgenossin' --magic-rollback false --auto-rollback false --keep-result --result-path ./results --skip-checks --dry-activate 🚀 ℹ️ [deploy] [INFO] Evaluating flake in . warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead 🚀 ℹ️ [deploy] [INFO] The following profiles are going to be deployed: [trinkgenossin.system] user = "root" ssh_user = "barkeeper" path = "/nix/store/3n394wwynffldhpwyyqcp600v2bx2y7w-activatable-nixos-system-trinkgenossin-24.05.20241110.9256f7c" hostname = "trinkgenossin.wg.pub.solar" ssh_opts = [] 🚀 ℹ️ [deploy] [INFO] Building profile `system` for node `trinkgenossin` 🚀 ℹ️ [deploy] [INFO] Copying profile `system` to node `trinkgenossin` ... would stop the following units: acme-fixperms.service, acme-lockfiles.service, alertmanager.service, audit.service, garage.service, grafana.service, kmod-static-nodes.service, logrotate-checkconf.service, loki.service, mount-pstore.service, network-local-commands.service, nscd.service, prometheus-node-exporter.service, prometheus.service, systemd-modules-load.service, systemd-oomd.service, systemd-oomd.socket, systemd-resolved.service, systemd-sysctl.service, systemd-timesyncd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd.service, systemd-vconsole-setup.service, wireguard-wg-ssh-peer-3UrVLQrwXnPAVXPiTAd7eM3fZYxnFSYgKAGpNMUwnUk\x3d.service, wireguard-wg-ssh-peer-I\x2bgN7v1VXkAGoSir6L8aebtLbguvy5nAx1QVDTzdckk\x3d.service, wireguard-wg-ssh-peer-NNb7T8Jmn\x2bV2dTZ8T6Fcq7hGomHGDckKoV3kK2oAhSE\x3d.service, wireguard-wg-ssh-peer-ZT2qGWgMPwHRUOZmTQHWCRX4m14YwOsiszjsA5bpc2k\x3d.service, wireguard-wg-ssh-peer-bcrIpWrKc1M\x2bHq4ds3aN1lTaKE26f2rvXhd\x2b93QrzR8\x3d.service, wireguard-wg-ssh-peer-fTvULvdsc92binFaBV\x2buWwFi33bi8InShcaPnoxUZEA\x3d.service, wireguard-wg-ssh-peer-iRTlY1lB7nPXf2eXzX8ZZDkfMmXyGjff5-joccbP8Cg\x3d.service, wireguard-wg-ssh-peer-oVF2-s7eIxyVjtG0MhKPx5SZ1JllZg\x2bZFVF2eVYtPGo\x3d.service, wireguard-wg-ssh-peer-qzNywKY9RvqTnDO8eLik75-SHveaSk9OObilDzv\x2bxkk\x3d.service, wireguard-wg-ssh-peer-zOSYGO7MfnOOUnzaTcWiKRQM0qqxR3JQrwx-gtEtHmo\x3d.service, wireguard-wg-ssh.service would NOT stop the following changed units: getty@tty1.service, systemd-fsck@dev-disk-by\x2dlabel-boot.service, systemd-fsck@dev-disk-by\x2dlabel-data.service, systemd-journal-flush.service, systemd-logind.service, systemd-random-seed.service, systemd-remount-fs.service, systemd-update-utmp.service, systemd-user-sessions.service, user-runtime-dir@1001.service, user@1001.service would activate the configuration... extra: ∅ → ε, +28619.1 KiB git: 2.44.1 → 2.44.2, -49.3 KiB grafana: 10.4.10 → 10.4.12, +14.0 KiB grafana-loki: 3.1.1 → 3.1.2 initrd: ∅ → ε initrd-kmod-blacklist: ∅ → ε initrd-linux: 6.6.56 → 6.6.60, -21.8 KiB keymap: ∅ → ε libarchive: 3.7.4 → 3.7.7, -324.4 KiB libpcap: 1.10.4 → 1.10.5, +24.9 KiB linux: 6.6.56, 6.6.56-modules → 6.6.60, 6.6.60-modules, +30.0 KiB nixos-manual: +22.7 KiB nixos-system-trinkgenossin: 24.05.20241016.dc2e002 → 24.05.20241110.9256f7c promtail: 3.1.1 → 3.1.2 python3: 3.11.9 → 3.11.10, +61.4 KiB source: +3797.0 KiB stage: ∅ → 1-init.sh, +31.5 KiB tzdata: 2024a → 2024b, +12.0 KiB udev: +31.2 KiB udhcp: ∅ → ε vim: 9.1.0707 → 9.1.0765, +55.2 KiB would restart systemd would reload the following units: dbus.service, firewall.service, reload-systemd-vconsole-setup.service would restart the following units: dhcpcd.service, home-manager-barkeeper.service, nginx.service, nix-daemon.service, promtail.service, sshd.service, systemd-journald.service would start the following units: acme-fixperms.service, acme-lockfiles.service, alertmanager.service, audit.service, garage.service, grafana.service, kmod-static-nodes.service, logrotate-checkconf.service, loki.service, mount-pstore.service, network-local-commands.service, nscd.service, prometheus-node-exporter.service, prometheus.service, systemd-modules-load.service, systemd-oomd.socket, systemd-resolved.service, systemd-sysctl.service, systemd-timesyncd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-vconsole-setup.service, wireguard-wg-ssh-peer-3UrVLQrwXnPAVXPiTAd7eM3fZYxnFSYgKAGpNMUwnUk\x3d.service, wireguard-wg-ssh-peer-I\x2bgN7v1VXkAGoSir6L8aebtLbguvy5nAx1QVDTzdckk\x3d.service, wireguard-wg-ssh-peer-NNb7T8Jmn\x2bV2dTZ8T6Fcq7hGomHGDckKoV3kK2oAhSE\x3d.service, wireguard-wg-ssh-peer-ZT2qGWgMPwHRUOZmTQHWCRX4m14YwOsiszjsA5bpc2k\x3d.service, wireguard-wg-ssh-peer-bcrIpWrKc1M\x2bHq4ds3aN1lTaKE26f2rvXhd\x2b93QrzR8\x3d.service, wireguard-wg-ssh-peer-fTvULvdsc92binFaBV\x2buWwFi33bi8InShcaPnoxUZEA\x3d.service, wireguard-wg-ssh-peer-iRTlY1lB7nPXf2eXzX8ZZDkfMmXyGjff5-joccbP8Cg\x3d.service, wireguard-wg-ssh-peer-oVF2-s7eIxyVjtG0MhKPx5SZ1JllZg\x2bZFVF2eVYtPGo\x3d.service, wireguard-wg-ssh-peer-qzNywKY9RvqTnDO8eLik75-SHveaSk9OObilDzv\x2bxkk\x3d.service, wireguard-wg-ssh-peer-zOSYGO7MfnOOUnzaTcWiKRQM0qqxR3JQrwx-gtEtHmo\x3d.service, wireguard-wg-ssh.service 🚀 ℹ️ [deploy] [INFO] Completed dry-activate! ```
teutat3s added 1 commit 2024-11-11 19:20:52 +00:00
core: add activationScript to show closure diff
All checks were successful
Flake checks / Check (pull_request) Successful in 23m35s
e48fe612e2
This is useful when updating a host, by doing a dry-run with deploy-rs
we get a list of changed package versions.
teutat3s requested review from b12f 2024-11-11 19:21:01 +00:00
teutat3s requested review from hensoko 2024-11-11 19:21:01 +00:00
teutat3s requested review from axeman 2024-11-11 19:21:01 +00:00
hensoko approved these changes 2024-11-13 19:44:28 +00:00
hensoko left a comment
Owner

Nice!

Nice!
teutat3s merged commit b41edf0cfb into main 2024-11-13 19:47:17 +00:00
teutat3s deleted branch closure-diffs 2024-11-13 19:47:17 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: pub-solar/infra#260
No description provided.