Title: NixOS Bento: new reporting feature | |
Author: Solène | |
Date: 05 September 2022 | |
Tags: bento nixos nix | |
Description: | |
# Bento | |
Bento received a new feature, it is now able to report if the remote | |
hosts are up-to-date, how much time passed since their last update, and | |
if they are not up-to-date, how long passed since the configuration | |
change. | |
Bento git project repository | |
As Bento is using SFTP, it's possible to deposit information on the | |
central server, I'm currently using log files from the builds, and | |
compare this date to the date of the configuration. | |
This will be very useful to track deployments across the fleet. I plan | |
to also check the version expected for a host and make them report | |
their version after an update, this should possible for flakes system | |
at least. | |
Asciinema demonstration (was done during development, doesn't contain report fe… | |
# Demonstration | |
I pushed a new version affecting all hosts on the SFTP server, and run | |
the status report regularly. | |
This is the output 15 seconds after making the changes available. | |
```text | |
status of kikimora not up to date π© (last_update 15m 6s ago) (since config … | |
status of nas not up to date π© (last_update 12m ago) (since config ch… | |
status of t470 not up to date π© (last_update 16m 9s ago) (since config … | |
status of x1 not up to date π© (last_update 16m 24s ago) (since config… | |
``` | |
This is the output after two systems picked up the changes and reported | |
a success. | |
``` | |
status of kikimora not up to date π© (last_rebuild 16m 46s ago) (since confi… | |
status of nas up to date π (last_rebuild 8s ago) | |
status of t470 not up to date π© (last_rebuild 17m 49s ago) (since confi… | |
status of x1 up to date π (last_rebuild 4s ago) | |
``` | |
This is the output after all systems reported a success. | |
``` | |
status of kikimora up to date π (last_rebuild 0s ago) | |
status of nas up to date π (last_rebuild 1m 24s ago) | |
status of t470 up to date π (last_rebuild 1m 2s ago) | |
status of x1 up to date π (last_rebuild 1m 20s ago) | |
``` |