Files
mtusi2026lab7/scripts/up.sh
T
ALMiron 912a874f00
Skeleton contracts / contracts (pull_request) Canceled after 0s
lab 7 openbao
2026-11-23 14:39:13 +03:00

15 lines
742 B
Bash

#!/bin/sh
# Operator: first start or start after a full stop. OpenBao is started first, initialised once, unsealed, filled; then the rest.
set -eu
cd "$(dirname "$0")/.."
sh scripts/bootstrap.sh
docker compose --env-file .env config --quiet
docker compose --env-file .env up -d --build init_perms openbao
i=0; until [ "$(docker inspect -f '{{.State.Health.Status}}' "$(docker compose ps -q openbao)")" = healthy ]; do i=$((i+1)); [ $i -lt 60 ] || exit 1; sleep 1; done
sh scripts/bao_init.sh
sh scripts/bao_unseal.sh
sh scripts/bao_bootstrap.sh
sh scripts/bao_secret_id.sh all
docker compose --env-file .env up -d --build
echo "stack started; wait for https://localhost:8443/health/ready, then: make test CA_FILE=\$PWD/secrets/pki/ca/ca.crt"