The keycloak project ended with four open questions that design could not
settle. A two-VM lab was built to answer them by measurement, and this is
that material: 26 experiments, 125 raw command outputs, 22 browser captures.
Follows the import procedure in README.md.
source/ the originating repository verbatim — 78 documents, 28 SVGs,
8 manifests, plus .source-revision recording the commit
final/ the SSOT
document.md 729 lines written from the 29 experiment documents, not
concatenated: what was predicted, what was measured, and
where the measurement itself was wrong
evidence/raw 125 outputs, flattened to <experiment>__<file> because
the originals collided (01-baseline.txt appeared three
times) and the audit only globs the top level
evidence/meta one per raw file; command and exitCode are null and the
README says why rather than inventing them
evidence/browser 22 captures
assets/ three diagrams through techviz
.techviz/ their VizSpecs
A separate project rather than an addition to keycloak: the B-layer answers
that project's four questions, but the A, C and D layers are about cluster
failure, SSO and operations, and one document.md should hold one subject.
The four question records there can point here through 관계.
Recorded rather than papered over: only three of the 28 diagrams were
remade. The repository forbids hand-drawn SVG and forbids titles inside the
canvas; all 28 originals carry both, so converting them is redrawing, not
reformatting. They stay in source/ and the gap is written into the document.
verify-pipeline.py passes. audit-records.py reports no issues.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
48 lines
1.8 KiB
Bash
Executable File
48 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Confirm the lab infrastructure is intact. Run on the lab host.
|
|
#
|
|
# A 404 from the HTTPS entry point is the success signal: TLS terminated and the
|
|
# request reached Traefik, which simply had no matching ingress rule. A 502 or a
|
|
# refused connection means the chain is broken somewhere.
|
|
set -uo pipefail
|
|
|
|
export LIBVIRT_DEFAULT_URI="${LIBVIRT_DEFAULT_URI:-qemu:///system}"
|
|
HOSTS="${HOSTS:-auth.hyeonworks.com app1.hyeonworks.com app2.hyeonworks.com}"
|
|
NODE_IPS="${NODE_IPS:-192.168.122.11 192.168.122.12}"
|
|
fail=0
|
|
|
|
check() { # description, expected, actual
|
|
if [ "$2" = "$3" ]; then printf ' ok %-34s %s\n' "$1" "$3"
|
|
else printf ' FAIL %-34s got %s, want %s\n' "$1" "$3" "$2"; fail=1; fi
|
|
}
|
|
|
|
echo "== guests =="
|
|
for name in kc-lab-1 kc-lab-2; do
|
|
check "$name" running "$(virsh domstate "$name" 2>/dev/null || echo absent)"
|
|
done
|
|
|
|
echo "== k3s =="
|
|
ready="$(kubectl get nodes --no-headers 2>/dev/null | grep -c ' Ready ')"
|
|
check "nodes Ready" 2 "$ready"
|
|
lb="$(kubectl -n kube-system get svc traefik \
|
|
-o jsonpath='{.status.loadBalancer.ingress[*].ip}' 2>/dev/null | wc -w)"
|
|
check "traefik node IPs" 2 "$lb"
|
|
|
|
echo "== host nginx =="
|
|
check "service" active "$(systemctl is-active nginx)"
|
|
check "cert renew timer" active "$(systemctl is-active certbot-renew.timer)"
|
|
for ip in $NODE_IPS; do
|
|
check "traefik $ip" 404 "$(curl -s -o /dev/null -w '%{http_code}' --max-time 5 "http://${ip}/")"
|
|
done
|
|
|
|
echo "== public entry point =="
|
|
for h in $HOSTS; do
|
|
check "https://$h" 404 "$(curl -s -o /dev/null -w '%{http_code}' --max-time 8 "https://${h}/")"
|
|
check "tls verify $h" 0 "$(curl -s -o /dev/null -w '%{ssl_verify_result}' --max-time 8 "https://${h}/")"
|
|
done
|
|
check "http redirect" 301 "$(curl -s -o /dev/null -w '%{http_code}' --max-time 8 "http://${HOSTS%% *}/")"
|
|
|
|
echo
|
|
[ "$fail" -eq 0 ] && echo "lab is healthy" || echo "lab has failures"
|
|
exit "$fail"
|