sync dari sicabe-doc/deploy @ 733df6c
This commit is contained in:
@@ -373,6 +373,32 @@ else
|
||||
bad "client origin airflow masih pakai AIRFLOW_HOST (origin salah di host non-pemilik)"
|
||||
fi
|
||||
|
||||
# ─── 0q. minio EKSTERNAL ⇒ `minio-init` TIDAK ditempatkan ────────────────────
|
||||
# Regresi: `TIER_SERVICES['state']` memuat minio + minio-init. Bila `minio` dijadikan
|
||||
# eksternal (P3), hanya `minio` yang di-exclude → `minio-init` nyasar ke bundle `state`
|
||||
# (padahal `minio` absen) → `install.sh --host state` menjalankannya tanpa guna.
|
||||
_qr="$(python3 - "${DEPLOY_DIR}" <<'PY'
|
||||
import importlib.util, sys
|
||||
d = sys.argv[1]
|
||||
s = importlib.util.spec_from_file_location("inv", f"{d}/lib/cluster/inventory.py")
|
||||
inv = importlib.util.module_from_spec(s); s.loader.exec_module(inv)
|
||||
doc = {"version": 1, "tls": {"mode": "none"},
|
||||
"hosts": {"control": {"address": "10.20.0.10", "tiers": ["identity", "policy", "pipeline", "governance"]},
|
||||
"compute": {"address": "10.20.0.11", "tiers": ["coord", "engine"]},
|
||||
"state": {"address": "10.20.0.12", "tiers": ["state"]}},
|
||||
"components": {"minio": {"address": "https://minio.corp:9000"}}}
|
||||
errs = inv.validate(doc)
|
||||
svcs = set(inv.plan(doc)["state"]["services"])
|
||||
ok = (not errs) and "minio" not in svcs and "minio-init" not in svcs
|
||||
print("1" if ok else f"0 err={errs} state={sorted(svcs)}")
|
||||
PY
|
||||
)"
|
||||
if [[ "${_qr}" == "1" ]]; then
|
||||
ok "minio eksternal: minio-init tak ditempatkan (bundle host bebas minio-init)"
|
||||
else
|
||||
bad "minio eksternal: minio-init masih ditempatkan → ${_qr}"
|
||||
fi
|
||||
|
||||
# ─── 1. generate ────────────────────────────────────────────────────────────
|
||||
if ! python3 "${DEPLOY_DIR}/lib/cluster/generate.py" render \
|
||||
"${INVENTORY}" "${DEPLOY_DIR}/docker-compose.yml" "${DEPLOY_DIR}/.env" \
|
||||
|
||||
Reference in New Issue
Block a user