forked from mtusi2026/mtusi2026lab7
15 lines
742 B
Bash
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"
|