gobank-deploy

Deployment orchestrator for gobank environments: one Hetzner Cloud server per environment (prod, preprod, demo, …) running PostgreSQL and the Model Bank demo, created, deployed to, reported on and deleted by this tool. Creating a server is an explicit act; deleting it is what stops billing.

Pages

Components

Where each part lives. The code comes from the Forgejo; the laptop builds the demo from its gobank checkout and pushes releases to the appliance, which cannot build; both drive the same Hetzner project and Route 53 zone with secrets from Bitwarden.

Components

Part Lives Role
gobank cmd/demo Forgejo, checked out at ../gobank the Model Bank: what gets deployed
gobank-deploy Forgejo; go install on the laptop, a gokrazy package on hydrogen this orchestrator: up, down, status, ui, build
release store build/releases on the laptop, /perm/gobank-deploy/releases on hydrogen demo for linux amd64 and arm64 per version, plus latest; task push copies it over
Hetzner server gobank-<env> Hetzner Cloud project Ubuntu, PostgreSQL, the demo on :1347; a firewall of the same name; labels environment and, for a temporary one, expires
Route 53 record drummonds.net zone <env>.gobank.drummonds.net → the server, TTL 60 because addresses are reused
secrets Bitwarden tp secrets on the laptop; the gokrazy Environment on hydrogen

What up does

One sequence for create and redeploy; only the -create box starts billing.

Deploy sequence

The demo workflow

A temporary environment is a gobank-workflow pipeline instance keyed <env>@<expiry>: created with its expiry as a server label, served until then, removed. The page starts the workflow for any temporary server nobody is looking after, so a restart does not leave one billing.

Demo workflow

Environment states

Server Answers Version vs available State on the page Offered
none – – Not provisioned, no billing Create (scale, keep or remove after)
exists no – Not answering, booting? Redeploy, Down
exists yes same Serving, current Redeploy, Down
exists yes different Serving, vX available Redeploy, Down
exists, expires label any any as above, plus removed at the demo workflow's job, Down

Where no release can be had (no toolchain and an empty store) only status and Down are offered, and the page says why.