HF-13: labnuc celld node under systemd; byte-identical bundles #7

Merged
gmackie merged 3 commits from feat/HF-13-labnuc-celld-node into main 2026-11-04 10:51:51 +00:00
Owner

HF-13 (Phase R): labnuc celld node under systemd, and byte-identical bundles for both profiles.

  • deploy/site/labnuc/hospital-fabric-celld.service: dynamic user; Worker listener 127.0.0.1:18780 (Caddy goes in front); peer/operator listener 100.64.115.45:18781 (Tailscale only); Restart=always; MemoryMax=2G; TimeoutStopSec above celld's 40 s shutdown bound.
  • install.sh installs the unit and generates the operator token. deploy.sh checks the bundle digest, migrates, then runs celld deploy; a fleet with no lease yet deploys first. push.sh builds HEAD and deploys it from a clean checkout. restart-drill.sh runs the restart-policy test.
  • celld has no secret store, so DEMO_API_KEY is merged into vars on labnuc at deploy time and stored in the on-site bucket. It is never committed.
  • no_bundle: true in both profile configs: Wrangler's dry-run output has the same sha256 as dist/index.mjs (ab8d20a6…), and celld 0.6.3 accepts it with no esbuild on the node.

Verified on labnuc (deployed from this branch, commit 07fa1f8, celld version 06b421bd74198a4d):

  • /healthz → profile: site; /readyz → both D1s ready; component registry seeded.
  • Listeners: 18780 on loopback only (LAN IP refused), 18781 on the Tailscale IP only.
  • Restart drill passed: lost ACK, then SIGKILL; systemd restarted the node (PID 2660772→2675193); reconcile → accepted, with exactly one delivery.submit_started plus delivery.reconciled.
  • npm test 57/57.

Not yet done: Caddy/hostname ingress for hospital.mackie.house, and the hospital.gmac.io deploy.

🤖 Generated with Claude Code

HF-13 (Phase R): labnuc celld node under systemd, and byte-identical bundles for both profiles. - `deploy/site/labnuc/hospital-fabric-celld.service`: dynamic user; Worker listener `127.0.0.1:18780` (Caddy goes in front); peer/operator listener `100.64.115.45:18781` (Tailscale only); `Restart=always`; `MemoryMax=2G`; `TimeoutStopSec` above celld's 40 s shutdown bound. - `install.sh` installs the unit and generates the operator token. `deploy.sh` checks the bundle digest, migrates, then runs `celld deploy`; a fleet with no lease yet deploys first. `push.sh` builds HEAD and deploys it from a clean checkout. `restart-drill.sh` runs the restart-policy test. - celld has no secret store, so `DEMO_API_KEY` is merged into vars on labnuc at deploy time and stored in the on-site bucket. It is never committed. - `no_bundle: true` in both profile configs: Wrangler's dry-run output has the same sha256 as `dist/index.mjs` (`ab8d20a6…`), and celld 0.6.3 accepts it with no esbuild on the node. Verified on labnuc (deployed from this branch, commit 07fa1f8, celld version `06b421bd74198a4d`): - `/healthz` → `profile: site`; `/readyz` → both D1s ready; component registry seeded. - Listeners: 18780 on loopback only (LAN IP refused), 18781 on the Tailscale IP only. - Restart drill passed: lost ACK, then SIGKILL; systemd restarted the node (PID 2660772→2675193); reconcile → `accepted`, with exactly one `delivery.submit_started` plus `delivery.reconciled`. - `npm test` 57/57. Not yet done: Caddy/hostname ingress for hospital.mackie.house, and the hospital.gmac.io deploy. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
deploy/site/labnuc adds the hospital-fabric-celld systemd unit (dynamic
user, Worker listener on loopback for Caddy, peer/operator listener on
the Tailscale address only, Restart=always, 2 GB memory cap) and the
install, deploy and push scripts. deploy.sh checks the bundle digest,
applies both D1 migrations and runs celld deploy. celld has no secret
store, so DEMO_API_KEY is generated on labnuc and merged into vars at
deploy time; it is never committed.

Both profile configs now set no_bundle, so celld and Wrangler ship
dist/index.mjs byte for byte. Wrangler's dry-run output matches its
sha256, and celld 0.6.3 accepts it without esbuild on the node.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HF-13: lease-aware site deploy ordering and restart drill
All checks were successful
Scaffold conformance / test (pull_request) Successful in 1m39s
forgegraph/ci CI passed
Scaffold conformance / forgegraph-report (pull_request) Successful in 3s
07fa1f88ca
Migrations run before celld deploy; a fleet with no lease yet (first
deploy) deploys first and then migrates. restart-drill.sh loses a
delivery ACK, SIGKILLs the node and checks systemd restarts it and
reconciliation finds the order instead of resending it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HF-13: loopback Caddy ingress for the labnuc site node
All checks were successful
Scaffold conformance / test (pull_request) Successful in 2m25s
forgegraph/ci CI passed
Scaffold conformance / forgegraph-report (pull_request) Successful in 3s
6bc04adfdf
The ForgeGraph tunnel connects straight to a route's port and passes
client headers through, so it targets a loopback Caddy listener (18782)
that overwrites X-Forwarded-Proto and X-Forwarded-Host before proxying
to celld. install.sh validates the Caddy config and removes the file if
validation fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
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
gmackie/hospital-fabric!7
No description provided.