lab7: PKI, mTLS infra, OpenBao non-dev, hardening, lifecycle scripts

This commit is contained in:
2026-11-26 16:47:23 +03:00
parent cda6e27fb8
commit 16accda962
45 changed files with 3593 additions and 660 deletions
+11 -4
View File
@@ -1,8 +1,15 @@
#!/usr/bin/env bash
# Restart hook for `make test-persistence ACTION_SCRIPT=scripts/restart.sh`.
# Semantic and evidence notes: tests/README.md ("Проверка сохранности") and REPORT.md.
# Restarts all application, stateful data, and telemetry containers with volumes
# preserved. OpenBao remains unsealed across ordinary stand restarts (per
# contracts/trust-matrix.md); OpenBao restart + manual operator unseal is tested
# explicitly in scripts/lab7/openbao_lifecycle.py.
set -euo pipefail
compose=(docker compose --env-file .env)
"${compose[@]}" restart postgres redis s3 broker api worker haproxy otel-collector prometheus loki tempo grafana
"${compose[@]}" up -d --no-recreate --no-deps --wait postgres redis s3 broker api worker haproxy otel-collector prometheus loki tempo grafana
compose=(docker compose --env-file "${COMPOSE_ENV_FILE:-.env}")
# Stop otel-collector before restarting otel-gateway (shared netns owner) so
# otel-collector cleanly re-attaches to the fresh otel-gateway network namespace.
"${compose[@]}" stop otel-collector
"${compose[@]}" restart postgres redis s3 broker api worker haproxy otel-gateway prometheus loki tempo grafana
"${compose[@]}" up -d --no-build --no-recreate --no-deps --wait postgres redis s3 broker api worker haproxy otel-gateway prometheus loki tempo grafana
"${compose[@]}" up -d --no-build --no-deps otel-collector