mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 03:38:23 +00:00
Hoist the swarm-test node, network and NFS-export-base names out of the shell harness (00_topology.sh) into default.env (INFINITO_SWARM_*), so the shell harness and the Python harness (extend_inventory, write_extras) read one source instead of each hardcoding the suffixes. 00_topology.sh, extend_inventory.py, write_extras.py and 01/09/11 now read the SPOT; passthrough.py exports the keys into the generated .env. 00_topology.sh reads default.env directly (not .env) because the workflow sources it before make dotenv runs. Rename topology.sh -> 00_topology.sh (sorts ahead of 01_/02_, the order it is sourced in) and update all 10 references. Add scripts/tests/deploy/swarm/clean_all.sh + make act-swarm-clean to reclaim wedged act-swarm state between runs, label-scoped via INFINITO_SWARM_TEST_LABEL so it never touches unrelated containers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
19 lines
582 B
Bash
Executable File
19 lines
582 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# shellcheck source=scripts/tests/deploy/swarm/00_topology.sh
|
|
. "$(dirname "$0")/../swarm/00_topology.sh"
|
|
|
|
node="${node:-${MGR}}"
|
|
|
|
if ! docker inspect --format '{{.State.Running}}' "${node}" 2>/dev/null | grep -q '^true$'; then
|
|
echo "ERROR: container '${node}' is not running." >&2
|
|
echo "Available swarm-test containers (if any):" >&2
|
|
docker ps --format ' {{.Names}}\t{{.Status}}' |
|
|
grep -E 'swarm-|nfs-server' >&2 ||
|
|
echo " (none — run \`make act-swarm-zombie app=<id>\` first)" >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec docker exec -it "${node}" bash
|