steid

@jamesgill /

steid/plans/decisions/0009-releases-from-releases-steid-dev.md
Markdown5.3 KBRendered·Source·Blame·History·Raw
1# 0009 — Releases come from `releases.steid.dev`, not from an instance
2
3**Status:** accepted · **Date:** 2026-09-20
4
5## Context
6
7Since 0.4.0 Steid has been downloaded from Steid: `jpgill.dev` is the author's own
8instance, and Caddy serves the release tarballs and `install.sh` as static files ahead
9of the application (`deploy/Caddyfile`). That was deliberate and it made a point — the
10project distributes itself from the product.
11
12Three things have since changed what that costs.
13
14- **Installs are now headless and other people's.** The control plane provisions a
15 machine per tenant and cloud-init runs `install.sh` unattended
16 ([steid-control-plane ADR 0002]../../../steid-control-plane/decisions/0002-machine-per-tenant.md).
17 Every provision therefore depends on one hand-run VPS being up. A download that 404s
18 in the middle of cloud-init surfaces as an instance that never came up, with the
19 cause three systems away.
20- **The box has two unrelated jobs**, and the one that is somebody's live website is
21 the one that gets restarted, upgraded and rolled back. `deploy.sh` snapshots and
22 rolls back the *application*; the artefacts sitting beside it are collateral.
23- **The estate for the alternative already exists.** The Steid Cloud account holds a
24 private, versioned bucket `steid-releases` behind a CloudFront distribution at
25 `releases.steid.dev` with origin access control, laid out exactly as `install.sh`
26 expects ([steid-control-plane ADR 0004]../../../steid-control-plane/decisions/0004-releases-from-s3.md).
27
28Meanwhile every link published between 0.4.0 and now points at `jpgill.dev`, and there
29is no redirect to be had: the path is served by that box's Caddy.
30
31## Decision
32
33**`install.sh` defaults `RELEASE_BASE_URL` to `https://releases.steid.dev` — S3 behind
34CloudFront — and `deploy.sh --publish` writes both that host and the existing
35`jpgill.dev` path, which becomes a mirror.** The URL layout under the base is unchanged
36(`/v<version>/steid-<version>-<target>.tar.gz` and `.sha256`), so the two hosts differ
37only in their base and old links keep resolving against the mirror.
38
39The mirror is temporary. It goes when the control plane's milestone 2 moves the
40author's instance onto the managed fleet and `jpgill.dev` stops being a hand-run box.
41
42The publish credential is **a named AWS profile** (`--profile ${STEID_AWS_PROFILE:-steid}`),
43never a value. This repository is public: no key, no account id, no role ARN.
44
45## Alternatives considered
46
47- **Keep serving from `jpgill.dev`.** Free, and it is the demonstration. Rejected
48 because the demonstration has been made, and repeating it on every headless install
49 puts one person's VPS in the critical path of someone else's provision.
50- **Move, and drop the mirror.** One host, no divergence to reason about. Rejected on
51 the published links: they cannot be redirected without keeping the box, which is what
52 keeping the mirror already does, and dropping them silently breaks an install someone
53 copied into a runbook.
54- **GitHub Releases.** What everyone does, free, and with a CDN. Rejected on the
55 project's terms: Steid exists because code hosting does not have to live there, and
56 making the installer depend on it is the concession the project is about. The
57 CloudFront bill for a few tarballs is small enough not to be the deciding argument.
58- **A "latest" pointer to install from.** Would mean `install.sh` needs no version
59 default. Rejected as a separate decision: a mutable pointer on a 24-hour cache is a
60 version nobody can name afterwards, and a pinned default makes the upgrade path
61 explicit.
62- **Publishing from CI.** There is no CI, and it would need a credential in the public
63 repository's secrets rather than on the laptop. Push-to-release is milestone 8+.
64
65## Consequences
66
67- **A headless install no longer depends on a Steid instance being up.** That was the
68 point, and it is the prerequisite the control plane's provisioning gap was blocked on.
69- **A publish now touches two hosts and can half-succeed.** `deploy.sh --publish` does
70 the releases host first and the mirror second, and verifies each over HTTPS; a mirror
71 failure leaves a published release, which is the right way round.
72- **Publishing needs the AWS CLI and the `steid` profile**, so it is the author's
73 machine only. `--no-mirror` and `--publish-s3-only` keep the two halves separable, and
74 `--publish-s3-only` is what cuts a release without going near the live site.
75- **CloudFront caches for up to 24 hours**, so anything published at a path that already
76 existed must be invalidated. `deploy.sh` invalidates `/install.sh` and `/v<version>/*`
77 and *waits* for it, because otherwise its own verification can pass against the
78 previous publish.
79- **The distribution id is looked up by alias**, not written down — an id in a public
80 repository is a fact about one estate that rots, and a stale one means a publish that
81 reports success while the host serves the old script.
82- **Reversing is one line** in `install.sh` plus dropping the S3 half of the publish;
83 the mirror is what makes that true, and it stops being true when the mirror goes.
84- **`.sha256` files, not signatures.** A checksum served from the same host as the
85 artefact proves transport, not provenance. Signing is still unaddressed and is now
86 more visible, because the host is no longer something the author controls end to end.