Skip to content

Commit d69c762

Browse files
h4x3rotabclaude
andcommitted
refactor(consul-postgres-ha): consolidate to single polished template
The directory was an engineering log — phase0/, stage1/, stage2/, stage3a/, stage3b/, stage4/, stage4-experiments/ — useful while building, useless to a user landing here cold who just wants to deploy HA Postgres on dstack-TEE. Promote stage4/ contents up one level to consul-postgres-ha/ as the canonical, opinionated shape. Rename phase0/icetest → signaling/. Move stage3b/{webdemo,sidecar} up. Drop the predecessor stage*/ + phase0/ + stage4-experiments/ + deploy/ (historical results) + STAGE4_PLAN.md. Git history preserves everything. Final layout: consul-postgres-ha/ ├── README.md / ARCHITECTURE.md / FAILOVER.md / PUBLISHING.md / ROBUSTNESS.md ├── cluster-example/ one cluster.tf ├── compose/ coordinator.yaml + worker.yaml templates ├── coordinator/ external-coordinator docker-compose ├── mesh-conn/ QUIC-over-pion/ICE overlay ├── bootstrap-secrets/ TEE-derives per-CVM secrets ├── patroni/ Patroni + Postgres ├── webdemo/ sidecar/ example workload + Envoy bootstrapper ├── signaling/ HTTP /publish + /poll broker for ICE rendezvous └── quic-on-ice/ standalone smoke test for the QUIC-over-ICE transport Updates beyond the moves: - README.md rewritten as a deploy-first story; old stage-4-internal README's "Known limitation" + punch-list (yamux + worker-pair instability) is obsolete since the QUIC swap and isn't preserved. - ARCHITECTURE.md: 4-CVM topology (ctrl+w1/w2/w3) → 6-CVM (3+3), yamux deep-dive section replaced with a tight QUIC summary that matches the actual code. - ROBUSTNESS.md: yamux → QUIC mentions, "single Consul server SPOF" section updated to reflect the 3-server quorum that's been live since `17f4642`, "real registry" recommended-fix moved to "already shipped" since GHCR + Sigstore is now the publish path. - All Go module paths bumped: github.com/Dstack-TEE/dstack-examples /consul-postgres-ha/<name> (no stage4/ or phase0/ infix). - CI workflow path filters + matrix `context:` paths updated. - .gitignore rewritten to match the new layout. - Builds + tests pass on all 5 Go modules under the new paths. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c8c6067 commit d69c762

69 files changed

Lines changed: 356 additions & 4426 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/consul-postgres-ha-publish.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Publish consul-postgres-ha images
22

3-
# Builds and publishes the six container images that the stage-4
4-
# consul-postgres-ha example needs (mesh-conn, bootstrap-secrets,
5-
# signaling, webdemo, sidecar, patroni). On push to main, images are
3+
# Builds and publishes the six container images the consul-postgres-ha
4+
# example needs (mesh-conn, bootstrap-secrets, signaling, webdemo,
5+
# sidecar, patroni). On push to main, images are
66
# tagged with the commit SHA *and* `latest`, pushed to GHCR, and
77
# attested with Sigstore-backed GitHub Build Provenance so consumers
88
# can verify "this image came from this commit of this repo" without
@@ -23,21 +23,21 @@ on:
2323
push:
2424
branches: [main]
2525
paths:
26-
- 'consul-postgres-ha/stage4/mesh-conn/**'
27-
- 'consul-postgres-ha/stage4/bootstrap-secrets/**'
28-
- 'consul-postgres-ha/stage4/patroni/**'
29-
- 'consul-postgres-ha/stage3b/webdemo/**'
30-
- 'consul-postgres-ha/stage3b/sidecar/**'
31-
- 'consul-postgres-ha/phase0/icetest/**'
26+
- 'consul-postgres-ha/mesh-conn/**'
27+
- 'consul-postgres-ha/bootstrap-secrets/**'
28+
- 'consul-postgres-ha/patroni/**'
29+
- 'consul-postgres-ha/webdemo/**'
30+
- 'consul-postgres-ha/sidecar/**'
31+
- 'consul-postgres-ha/signaling/**'
3232
- '.github/workflows/consul-postgres-ha-publish.yml'
3333
pull_request:
3434
paths:
35-
- 'consul-postgres-ha/stage4/mesh-conn/**'
36-
- 'consul-postgres-ha/stage4/bootstrap-secrets/**'
37-
- 'consul-postgres-ha/stage4/patroni/**'
38-
- 'consul-postgres-ha/stage3b/webdemo/**'
39-
- 'consul-postgres-ha/stage3b/sidecar/**'
40-
- 'consul-postgres-ha/phase0/icetest/**'
35+
- 'consul-postgres-ha/mesh-conn/**'
36+
- 'consul-postgres-ha/bootstrap-secrets/**'
37+
- 'consul-postgres-ha/patroni/**'
38+
- 'consul-postgres-ha/webdemo/**'
39+
- 'consul-postgres-ha/sidecar/**'
40+
- 'consul-postgres-ha/signaling/**'
4141
- '.github/workflows/consul-postgres-ha-publish.yml'
4242
workflow_dispatch:
4343

@@ -60,17 +60,17 @@ jobs:
6060
matrix:
6161
include:
6262
- name: mesh-conn
63-
context: consul-postgres-ha/stage4/mesh-conn
63+
context: consul-postgres-ha/mesh-conn
6464
- name: bootstrap-secrets
65-
context: consul-postgres-ha/stage4/bootstrap-secrets
65+
context: consul-postgres-ha/bootstrap-secrets
6666
- name: patroni
67-
context: consul-postgres-ha/stage4/patroni
67+
context: consul-postgres-ha/patroni
6868
- name: signaling
69-
context: consul-postgres-ha/phase0/icetest
69+
context: consul-postgres-ha/signaling
7070
- name: webdemo
71-
context: consul-postgres-ha/stage3b/webdemo
71+
context: consul-postgres-ha/webdemo
7272
- name: sidecar
73-
context: consul-postgres-ha/stage3b/sidecar
73+
context: consul-postgres-ha/sidecar
7474

7575
steps:
7676
- uses: actions/checkout@v4

.gitignore

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11

22
*~
33
.claude/
4-
# compiled go binaries
4+
5+
# consul-postgres-ha — compiled Go binaries (build artifacts)
56
consul-postgres-ha/.local/
6-
consul-postgres-ha/phase0/icetest/icetest
7-
consul-postgres-ha/stage1/mesh-conn/mesh-conn
8-
consul-postgres-ha/stage3a/webdemo/webdemo
9-
consul-postgres-ha/stage3b/webdemo/webdemo
10-
consul-postgres-ha/stage4/bootstrap-secrets/bootstrap-secrets
11-
consul-postgres-ha/stage4/cluster-example/.terraform/
12-
consul-postgres-ha/stage4/cluster-example/.terraform.lock.hcl
13-
consul-postgres-ha/stage4/cluster-example/terraform.tfstate*
14-
consul-postgres-ha/stage4/cluster-example/terraform.tfvars
15-
consul-postgres-ha/stage4-experiments/**/.terraform/
16-
consul-postgres-ha/stage4-experiments/**/.terraform.lock.hcl
17-
consul-postgres-ha/stage4-experiments/**/terraform.tfstate
18-
consul-postgres-ha/stage4-experiments/**/terraform.tfstate.backup
19-
consul-postgres-ha/stage4-experiments/**/terraform.tfvars
20-
consul-postgres-ha/stage4/mesh-conn/mesh-conn
21-
consul-postgres-ha/stage4/quic-on-ice/quic-on-ice
22-
# terraform local state
7+
consul-postgres-ha/bootstrap-secrets/bootstrap-secrets
8+
consul-postgres-ha/mesh-conn/mesh-conn
9+
consul-postgres-ha/quic-on-ice/quic-on-ice
10+
consul-postgres-ha/signaling/signaling
11+
consul-postgres-ha/signaling/icetest
12+
consul-postgres-ha/webdemo/webdemo
13+
14+
# consul-postgres-ha — local terraform state (per-deploy, not for git)
15+
consul-postgres-ha/cluster-example/.terraform/
16+
consul-postgres-ha/cluster-example/.terraform.lock.hcl
17+
consul-postgres-ha/cluster-example/terraform.tfstate*
18+
consul-postgres-ha/cluster-example/terraform.tfvars

0 commit comments

Comments
 (0)