File size: 977 Bytes
503b0e9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #!/usr/bin/env bash
set -euo pipefail
# One-shot bring-up for this host. Idempotent.
DBOPS_ROOT=${DBOPS_ROOT:-/data/adaptai/platform/dbops}
SECRETS_DIR=${SECRETS_DIR:-/data/adaptai/secrets/dataops}
DBOPS_MODE=${DBOPS_MODE:-local}
SUP="unix://$DBOPS_ROOT/run/supervisor.sock"
echo "[bootstrap] host namespace"
bash "$DBOPS_ROOT/tools/host_namespace_bootstrap.sh"
echo "[bootstrap] render connections ($DBOPS_MODE)"
SECRETS_DIR="$SECRETS_DIR" DBOPS_MODE="$DBOPS_MODE" \
python3 "$DBOPS_ROOT/tools/render_connections.py" || true
echo "[bootstrap] supervisor reread/update"
supervisorctl -s "$SUP" reread || true
supervisorctl -s "$SUP" update || true
echo "[bootstrap] start core services"
supervisorctl -s "$SUP" start qdrant || true
for n in 1 2 3; do supervisorctl -s "$SUP" start dragonfly-node$n || true; done
for n in 1 2 3; do supervisorctl -s "$SUP" start redis-node$n || true; done
supervisorctl -s "$SUP" start janusgraph || true
echo "[bootstrap] done"
exit 0
|