Files
computer-playbook/scripts/tests/environment/07_compose_minimal.sh
T
kevinveenbirkenbachandClaude Opus 4.8 c1fb96584b refactor(tests): rename swarm make targets to swarm-* and reorganize env steps
Rename the scripts/tests/environment deploy_* steps (07/08/09) to compose_*; add 12_swarm.sh (svc-db-mariadb via the swarm-* targets) and 13_roundtrip.sh (svc-db-postgres via make roundtrip), with MARIADB_APP/POSTGRES_APP in common.sh. Rename every make act-swarm-* target to make swarm-* (drop the act- prefix) across the Makefile (moved to the alphabetical slot), the deploy/act, deploy/swarm and e2e helper scripts, and the agent iteration docs. Strip mid-code narration comments from the touched scripts per the comment policy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 12:24:19 +02:00

37 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env bash
# Deploy on minimal hardware — disable non-essential services to save resources.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/tests/environment/utils/common.sh
source "${SCRIPT_DIR}/utils/common.sh"
# shellcheck source=scripts/tests/environment/utils/cache.sh
source "${SCRIPT_DIR}/utils/cache.sh"
echo "Snapshotting cache counters before the deploy."
CACHE_BEFORE="$(cache_snapshot)"
echo "Deploying dashboard with all variable (group-conditional) services disabled to speed up the deploy and verify disable= suppresses them from the inventory."
make compose-deploy mode=reinstall apps="${DASHBOARD_APP}" disable="sso,asset,simpleicons,logout,matomo,css,prometheus"
inspect
echo "Actively probing both caches to confirm pull-through works end-to-end."
probe_caches
echo "Probing the DiD inner-build cache path (frontend hijack + apt rewrite)."
probe_did_inner_build
echo "Verifying that BOTH local caches saw real pull-through traffic."
CACHE_AFTER="$(cache_snapshot)"
assert_caches_used "${CACHE_BEFORE}" "${CACHE_AFTER}"
echo "Trusting the local CA certificate so HTTPS endpoints are reachable from the host."
make network-trust-ca
echo "Verifying the dashboard is reachable (matomo was disabled, not the dashboard itself)."
assert_http_status 200 "${DASHBOARD_URL}"
echo "Verifying matomo is not reachable because it was excluded from the inventory."
# Exception: Expect 000 because curl aborts in TLS before HTTP when the excluded hostname is missing from the certificate SANs.
assert_http_status 000 "${MATOMO_URL}"