mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-29 06:17:25 +00:00
Replace 8 bash env modules with a single Python generator
(cli.meta.env) that materialises env/static.env + runtime context
into a gitignored .env. Each variable lives in its own handler
under utils/env/handlers/; defaults carry inline one-line `# ...`
comments.
Rename to the INFINITO_* schema:
- workflow inputs: APPS, SERVICES_DISABLED, CMD, DEBUG, WHITELIST,
BUNDLES, FULL_CYCLE, VARIANT, RUN_FLAGS, LIMIT_HOST, PARALLEL
- inventory: INVENTORY_DIR / INVENTORY_FILE / HOST_VARS_FILE,
PW_FILE -> INVENTORY_PASSWORD_FILE
- venv: VENV_BASE / VENV_FALLBACK / VENV_NAME
- new SPOT defaults: COMPILE_SILENCE, CONTAINER_NO_CA,
WAIT_HEALTH_TIMEOUT_S, PACKAGE_CACHE_FRONTEND_INIT_IMAGE,
promoted IMAGE_TAG from GHA-only to general passthrough
compose.yml hardening:
- inline \${VAR:-default} removed; strict \${VAR:?...} everywhere
- new integration lint blocks regressions
Tooling:
- scripts/install/all.sh owns the stamp-file install logic
(Makefile target delegates)
- scripts/meta/env/load.sh is the single shell entry point;
8 bash modules deleted
- new shell lint: no INFINITO_* defaults outside env/static.env
Tests:
- 93 new unit tests for utils/env/{builder,parser,runtime,writer}
- restructure tests/lint into repository/ (file-content rules) vs
filesystem/{shell,python,env}/ (filesystem-shape rules)
- drift + smoke integration tests against the generator
Docs:
- variables.md is now a pointer; per-variable docs live next to
the key in env/static.env / env/ci.env
- compose.yml.md drops the Default column
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
37 lines
1.5 KiB
Bash
Executable File
37 lines
1.5 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 matomo disabled to verify INFINITO_SERVICES_DISABLED suppresses the shared service in the inventory."
|
|
make deploy-fresh-purged-apps INFINITO_APPS="${DASHBOARD_APP}" INFINITO_SERVICES_DISABLED="matomo"
|
|
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 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."
|
|
# 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}"
|