sync dari sicabe-doc/deploy
This commit is contained in:
@@ -273,6 +273,40 @@ else
|
||||
bad "--sync: masih ada path repo ter-hardcode (~/sicabe-doc/deploy)"
|
||||
fi
|
||||
|
||||
# ─── 0n. Bucket & warehouse Iceberg terkonfigurasi (bukan literal) ───────────
|
||||
# Bucket = MINIO_BUCKET_ICEBERG_DATA; warehouse = ICEBERG_WAREHOUSE (nama REST
|
||||
# Nessie + prefix path S3, IDENTIK). Client boleh punya nama berbeda → tak boleh
|
||||
# ada literal 'warehouse' / region Nessie hardcoded.
|
||||
_wh_dc="${DEPLOY_DIR}/docker-compose.yml"; _wh_ed="${DEPLOY_DIR}/config/environment.defaults.sh"
|
||||
_wh_ip="${DEPLOY_DIR}/config/trino/catalog/iceberg.properties"; _wh_bs="${DEPLOY_DIR}/bootstrap.sh"
|
||||
_wh_se="${DEPLOY_DIR}/scripts/seed-starrocks.sh"; _wh_v2="${DEPLOY_DIR}/scripts/verify-phase2-storage.sh"
|
||||
_wh_ins="${DEPLOY_DIR}/install.sh"
|
||||
wh_bad=""
|
||||
have() { grep -qF "$2" "$1" 2>/dev/null || wh_bad="${wh_bad} $(basename "$1"):$3"; }
|
||||
lack() { grep -qF "$2" "$1" 2>/dev/null && wh_bad="${wh_bad} $(basename "$1"):$3"; }
|
||||
have "${_wh_ed}" 'export ICEBERG_WAREHOUSE=' "env-default"
|
||||
have "${_wh_dc}" 'NESSIE_CATALOG_DEFAULT_WAREHOUSE: "${ICEBERG_WAREHOUSE:-warehouse}"' "nessie-name"
|
||||
have "${_wh_dc}" 's3://${MINIO_BUCKET_ICEBERG_DATA:-iceberg-data}/${ICEBERG_WAREHOUSE:-warehouse}' "nessie-loc"
|
||||
have "${_wh_dc}" 'DEFAULT_OPTIONS_REGION: "${S3_REGION:-us-east-1}"' "nessie-region"
|
||||
have "${_wh_dc}" 'ICEBERG_WAREHOUSE: ${ICEBERG_WAREHOUSE:-warehouse}' "trino-env"
|
||||
have "${_wh_ip}" '${ENV:ICEBERG_WAREHOUSE}' "trino-catalog"
|
||||
have "${_wh_bs}" "'iceberg.catalog.warehouse' = '\${ICEBERG_WAREHOUSE:-warehouse}'" "sr-catalog"
|
||||
have "${_wh_bs}" "'iceberg.catalog.warehouse'='\${ICEBERG_WAREHOUSE:-warehouse}'" "sr-catalog2"
|
||||
have "${_wh_bs}" 'rest_warehouse: ${ICEBERG_WAREHOUSE:-warehouse}' "sling"
|
||||
have "${_wh_v2}" 'WAREHOUSE="${ICEBERG_WAREHOUSE:-warehouse}"' "gate-def"
|
||||
have "${_wh_v2}" 's3://${BUCKET}/${WAREHOUSE}' "gate-expect"
|
||||
have "${_wh_ins}" 'MINIO_BUCKET_ICEBERG_DATA=iceberg-data' "env-bucket"
|
||||
have "${_wh_ins}" 'ICEBERG_WAREHOUSE=warehouse' "env-warehouse"
|
||||
lack "${_wh_bs}" "'iceberg.catalog.warehouse' = 'warehouse'" "sr-literal"
|
||||
lack "${_wh_bs}" "'iceberg.catalog.warehouse'='warehouse'" "sr-literal2"
|
||||
lack "${_wh_bs}" 'rest_warehouse: warehouse' "sling-literal"
|
||||
lack "${_wh_se}" "'iceberg.catalog.warehouse' = 'warehouse'" "seed-literal"
|
||||
if [[ -z "${wh_bad}" ]]; then
|
||||
ok "storage: bucket+warehouse terkonfigurasi (nama & prefix), region Nessie = S3_REGION"
|
||||
else
|
||||
bad "storage: konfigurasi bucket/warehouse belum lengkap →${wh_bad}"
|
||||
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