Skip to content

Document lessons from the first live auto-deploy - #49

Merged
JoaoPucci merged 1 commit into
mainfrom
docs-post-v0.7.0-deploy-lessons
Apr 24, 2026
Merged

Document lessons from the first live auto-deploy#49
JoaoPucci merged 1 commit into
mainfrom
docs-post-v0.7.0-deploy-lessons

Conversation

@JoaoPucci

@JoaoPucci JoaoPucci commented Apr 24, 2026

Copy link
Copy Markdown
Owner

Summary

Four updates to docs/deployment.md based on what actually tripped during the first live auto-deploy (v0.7.0):

  • Fix v0.0.0 smoke-test claim. v0.0.0 actually passes the regex ^v[0-9]+\.[0-9]+\.[0-9]+$ (zeros are digits), so the docs' "expect rejection" guidance was wrong. Switched to v1.0 as the canonical negative-shape example and listed other valid rejection inputs.
  • Add Tailscale prerequisites (admin console). Three things live only in the Tailscale admin console and silently block the rest of the setup: MagicDNS enablement, a non-empty tagOwners entry for tag:ci, and an ACL grant letting tag:ci reach the server's port 22 (only needed on locked-down tailnets; default allow-all already covers it).
  • Add the bootstrap prerequisite note. Step 3 installs the entry stub from /opt/ephemera/scripts/deploy/ephemera-deploy-entry, so that path must already exist on disk before step 3. If the current deploy predates the auto-deploy infrastructure, one manual checkout is required first. Added a one-paragraph preface at the top of "One-time server setup".
  • Rename "Failure & rollback" → "When a CI run fails" + expand. The existing section jumped straight to rollback, which isn't the first thing you want when a deploy breaks. New structure: diagnose first (journalctl -t ephemera-deploy on the server, gh run view --log-failed on the laptop, gh run rerun for transient issues), with a callout for the specific bootstrap-chicken-and-egg retry pattern. Rollback split into its own subsection for discoverability.

Out of scope

  • Private DEPLOYMENT.md updates for the same lessons (the runbook at repo root, .gitignored) — applied directly, not in this PR.
  • Any code change to deploy.sh, the entry stub, or the workflow — the one code fix from this rollout already shipped in PR Fix deploy.sh cwd + correct sudoers subject in docs #48.

Test plan

  • Read through the new structure to confirm the linear flow (prereqs → on-server → smoke-test → diagnose → rollback) reads cleanly.
  • Spot-check the Tailscale JSON snippets render correctly on GitHub (code fences + json language tag).
  • Confirm the smoke-test negative example works against the live server: ssh deploy@<host> v1.0 returns the "does not match" line + exit 2.

Four updates to docs/deployment.md based on what actually tripped
during the v0.7.0 rollout:

1. Fix the smoke-test section's v0.0.0 example: v0.0.0 passes the
   regex (zeros are digits), so it is not a negative-path test. Use
   v1.0 as the canonical bad-shape example and list other valid
   rejection cases.

2. Add a "Tailscale prerequisites (admin console)" subsection before
   the on-server setup, covering the three things that live only in
   the admin console and are silently required: MagicDNS enablement,
   a non-empty tagOwners entry for tag:ci, and an ACL grant letting
   tag:ci reach the server on port 22.

3. Add a bootstrap prerequisite note to the on-server setup: step 3
   installs the entry stub *from* /opt/ephemera/scripts/deploy/, so
   that path must already exist before step 3 can run. Deployments
   predating the auto-deploy infra need one manual checkout first.

4. Rename the "Failure & rollback" subsection to "When a CI run
   fails" and expand it with a diagnostic recipe: journalctl -t
   ephemera-deploy + systemctl status on the server, gh run
   view/rerun on the laptop, and the specific retry-after-manual-
   checkout pattern for the bootstrap chicken-and-egg. Split the
   actual rollback instructions into their own "Rollback"
   subsection for discoverability.

No code changes; no behavior changes. All additions are about
making the existing pipeline easier to stand up and recover
without the manual steps that were needed today.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JoaoPucci JoaoPucci added the documentation Improvements or additions to documentation label Apr 24, 2026
@JoaoPucci JoaoPucci self-assigned this Apr 24, 2026
@JoaoPucci
JoaoPucci merged commit e48e19f into main Apr 24, 2026
4 checks passed
@JoaoPucci
JoaoPucci deleted the docs-post-v0.7.0-deploy-lessons branch April 30, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant