Files
mtusi2026lab6/scripts/restart.sh
T

15 lines
951 B
Bash
Executable File

#!/bin/sh
# Restart hook for tests/resilience.py --mode persistence (Linux/macOS).
# Restarts the stores first (PostgreSQL, Redis, SeaweedFS S3, RabbitMQ; lab6: Prometheus, Loki, Tempo), then
# otel-collector, api, janitor, dispatcher,
# worker, then the balancer. Volumes are kept (no down -v), nothing is re-seeded.
# "restart" does not wait for healthchecks; SeaweedFS needs a few seconds to bring up S3, so wait explicitly
# ("up --wait --no-recreate" keeps the same containers and only waits until they are healthy).
set -eu
cd "$(dirname "$0")/.."
docker compose restart postgres redis s3 rabbitmq prometheus loki tempo
docker compose up -d --wait --no-recreate --no-build --no-deps postgres redis s3 rabbitmq prometheus loki tempo
docker compose restart otel-collector api janitor dispatcher worker grafana
docker compose restart lb
docker compose up -d --wait --no-recreate --no-build --no-deps otel-collector api lb dispatcher worker grafana