my-homelab-configs/apps/progressive-lab/README.md

42 lines
1.9 KiB
Markdown

# Progressive delivery and failure lab
This disposable lab demonstrates a manual canary orchestrated by Jeannie and
Argo CD. A small internal router sends traffic to a stable or canary backend and
exposes Prometheus counters. The Argo CD Application's Helm values are the
runtime control for this experiment; Jeannie updates those values and Argo CD
reconciles the workloads. This is a learning implementation, not Argo Rollouts
or a production traffic manager.
Push the commit first. On Debian, select the cluster profile and run:
```sh
cd ~/my-homelab-configs
git pull --ff-only gitea main
./jeannie progressive-lab plan
./jeannie progressive-lab apply
./jeannie progressive-lab run errors
./jeannie progressive-lab run readiness
```
Each run directs approximately 10% of 120 requests to the canary, compares the
router's `progressive_lab_requests_total` counter before and after, and rolls
back when the expected canary error rate exceeds 10%. The `errors` scenario
returns HTTP 500 from the canary; `readiness` uses an intentionally failing
readiness probe, removing the canary endpoint and producing a router error.
The stable service should continue returning success. Jeannie restores the
canary weight to zero in a `finally` block, including on most command failures.
If Jeannie is interrupted or the API is unavailable, explicitly run:
```sh
./jeannie progressive-lab rollback
./jeannie progressive-lab status
```
The ServiceMonitor exposes router counters to the existing Prometheus stack if
its ServiceMonitor selectors include the `monitoring` namespace and the
`release=prometheus-stack` label. The experiment measures the same counters
directly, so a successful run does not by itself prove Prometheus scraped them.
The router is available only through its ClusterIP and temporary local port
forward; existing public routes are unchanged. It is deliberately simple and
does not implement production-grade retries, traffic management, or analysis.