Skip to content

0.2.0 Track B: deploy story for wohl-hub (systemd + Docker + INSTALL.md)#24

Merged
avrabe merged 1 commit into
mainfrom
0.2.0/deploy-story
May 25, 2026
Merged

0.2.0 Track B: deploy story for wohl-hub (systemd + Docker + INSTALL.md)#24
avrabe merged 1 commit into
mainfrom
0.2.0/deploy-story

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 25, 2026

Summary

First deployment story for wohl-hub. Adds a hardened systemd unit, a multi-stage distroless Dockerfile, a docker-compose example, and an INSTALL.md walking through both deploy paths. Adds a small --config <path> flag to wohl-hub so systemd's ExecStart has an explicit path argument (no path → existing default search, missing explicit path → hard fail so systemd Restart=always surfaces the error).

Part of the 0.2.0 milestone — see release plan in this PR thread.

Files

  • deploy/systemd/wohl-hub.serviceType=simple, Restart=always, dedicated wohl user, hardening (NoNewPrivileges, ProtectSystem=strict, ProtectHome, PrivateTmp, ReadWritePaths=/var/lib/wohl /var/log/wohl).
  • Dockerfile — multi-stage. Builder rust:1.85-slim-bookworm; runtime gcr.io/distroless/cc-debian12:nonroot (~25 MB, no shell/pkg-mgr, uid 65532).
  • .dockerignore — excludes target/, .git/, .claude/.
  • deploy/docker/docker-compose.yml — single-service example with config + state volumes.
  • docs/INSTALL.md — prerequisites, quickstart from tarball, source build, Docker quickstart, integrity verification (the cosign verify-blob + gh attestation verify one-liner from v0.1.0), troubleshooting, update procedure.
  • README.md — new Deploying section pointing at INSTALL.md.
  • crates/wohl-hub/src/main.rs--config <path> and WOHL_CONFIG env override. Missing explicit path → exit 2.

Verified locally

cargo +1.85.0 fmt -- --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace — all green. wohl-hub --config <path> exercised end-to-end with a freeze alert producing the expected JSON. docker build and systemd-analyze verify could not be run locally (no docker daemon, macOS) — left to CI to validate as a follow-up.

Open questions

  • sd_notify watchdog support — currently Type=simple; could move to Type=notify later for tick-loss kill+restart.
  • Publishing the OCI image from release.yml — separate follow-up.
  • /var/lib/wohl state-dir layout — reserved but unused yet; needs a spec when wohl-alert Verus dedup state starts snapshotting.

🤖 Generated with Claude Code

Make `wohl-hub` deployable as a long-running daemon for the modeled
Pi 4/5 and MiniPC field hubs (see spar/wohl_nodes.aadl).

  * deploy/systemd/wohl-hub.service — hardened unit that runs the
    hub as a dedicated `wohl` user with NoNewPrivileges, ProtectSystem
    strict, syscall allow-list, Restart=always + StartLimitBurst.
    WatchdogSec deliberately omitted until sd_notify lands.
  * Dockerfile + .dockerignore — multi-stage build on rust:1.85-slim
    runtime image is distroless/cc-debian12:nonroot. Build context
    climbs to the parent dir so the `path = "../relay/..."` sibling
    deps resolve, matching the release.yml checkout shape.
  * deploy/docker/docker-compose.yml — single-service stack with a
    config bind-mount, named state volume, read-only rootfs, capability
    drop, and 128M / 0.5cpu caps tuned for a Pi 4.
  * docs/INSTALL.md — release-tarball quickstart, source build, Docker
    walkthrough, cosign + SLSA verification one-liner, troubleshooting,
    and update / rollback procedure.
  * README.md — short "Deploying" section linking to docs/INSTALL.md.
  * crates/wohl-hub/src/main.rs — add --config flag and $WOHL_CONFIG
    env override (with hard-fail on missing/invalid explicit paths)
    so the systemd unit and Docker entrypoint can point at
    /etc/wohl/wohl.toml without the historical cwd search.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avrabe avrabe merged commit 8bbab5e into main May 25, 2026
6 checks passed
@avrabe avrabe deleted the 0.2.0/deploy-story branch May 25, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant