Add deploy-demo workflow for persistent Hetzner demo#85
Merged
Conversation
New workflow_dispatch pipeline that builds control + ui images from the current branch, provisions a Hetzner server (default type cx32, name roda-ledger-demo, both configurable), deploys the demo from the branch's docker-compose.control.yml with the freshly-built tags, and leaves the server running. Idempotent: an existing server with the same name is destroyed and recreated. Use a different server_name input to run multiple demos in parallel. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New
workflow_dispatchpipeline at.github/workflows/deploy-demo.ymlthat deploys the roda-ledger demo to a persistent Hetzner Cloud server.build-images— matrix overcontrol+ui, buildslinux/amd64from the current branch, tags astislib/roda-ledger:{control,ui}-demo-${{ github.run_id }}(unique per run, no races between concurrent demos), reuses the same GHA cache scopes asdocker-publish.yml.deploy— installshcloud, generates an SSH key, deletes any prior server/key with the same name (idempotent recreate), creates the new server, installs Docker,curls the branch'sdocker-compose.control.yml,seds the:latesttags to point at the demo build, writes adocker-compose.override.ymlthat setsCONTROL_PLANE_URL=http://<public-ip>:50051so the UI works remotely, and runsdocker compose up -d. No auto-destroy at the end.http://<ip>:8080), gRPC endpoint, image tags, and the manual destroy commands.Inputs
server_nameroda-ledger-demoserver_typecx32Why curl-then-sed instead of a fresh compose
Deploying from the branch's own
docker-compose.control.yml(with minimal sed for tags) means a broken compose surfaces in this pipeline — the same file end-users download with the README'scurl | docker compose upflow.Secrets used (all pre-existing)
HCLOUD_TOKEN,DOCKERHUB_USERNAME,DOCKERHUB_TOKEN.Non-goals
No firewall/TLS/DNS; demo runs plain HTTP on
:8080. No auto-destroy (a separatedestroy-demo.ymlcan be added later). Location pinned tofsn1to match the other Hetzner workflows. No multi-arch image build — Hetzner CX is x86.Test plan
http://<ip>:8080loads the UI and shows a 3-node cluster;grpcurl -plaintext <ip>:50051 listenumeratesroda.ledger.v1.Ledger.roda-ledger-demois destroyed and replaced (new public IP).server_name: roda-ledger-demo-2— confirm both servers coexist (hcloud server list).server_type: cx22— confirm the smaller size still boots the demo.hcloud server delete roda-ledger-demo && hcloud ssh-key delete roda-ledger-demo.🤖 Generated with Claude Code