Skip to content
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 docs/spec/disk-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ The official Tailscale apt repository must be configured and preferred.
r[image.packages.bestool+2]
bestool version >=1.4.0 must be pre-installed.

r[image.packages.upki]
upki must be pre-installed from the bes-tools repo, with its periodic refresh
of certificate revocation data enabled.

r[image.packages.chrony]
Chrony must be installed and enabled as the system time synchronization
daemon. No other time synchronization daemon (in particular,
Expand Down
11 changes: 7 additions & 4 deletions image/scripts/setup-bes-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ echo "deb [signed-by=/etc/apt/keyrings/bes-tools.gpg] https://tools.ops.tamanu.i

# r[image.packages.bes-tools]: Pin bes-tools so the right packages come from
# the right place. `bestool` is always preferred from bes-tools (it is only
# published there). The Ubuntu archive ships a sufficiently recent podman, so
# everything else is preferred from the archive.
# published there), and so is `upki` (the archive has none before 26.10). The
# Ubuntu archive ships a sufficiently recent podman, so everything else is
# preferred from the archive.
cat > /etc/apt/preferences.d/99-bes-tools << 'EOF'
Package: bestool
Package: bestool upki
Pin: origin tools.ops.tamanu.io
Pin-Priority: 999

Expand All @@ -31,4 +32,6 @@ EOF
apt-get update -q
# r[image.packages.podman]
# r[image.packages.bestool+2]
apt-get install -y podman bestool
# r[image.packages.upki]
# upki's postinst enables upki-fetch.timer, which works offline in the chroot.
apt-get install -y podman bestool upki
4 changes: 4 additions & 0 deletions tests/test-image-structure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,10 @@ check_service_enabled "grow-root-filesystem.service" "grow-root-filesystem is e
check "cloud-init-generator exists" test -x "$MNT/usr/lib/systemd/system-generators/cloud-init-generator"
check "cloud-init.target.wants populated" test -d "$MNT/etc/systemd/system/cloud-init.target.wants"

# r[verify image.packages.upki]
check "upki binary exists" test -x "$MNT/usr/bin/upki"
check_service_enabled "upki-fetch.timer" "upki-fetch.timer is enabled"

# r[verify image.packages.chrony]
check_service_enabled "chrony.service" "chrony is enabled"
check "chrony binary exists" test -x "$MNT/usr/sbin/chronyd"
Expand Down