diff --git a/sim/cluster0/scripts/deploy-ac-workspace.sh b/sim/cluster0/scripts/deploy-ac-workspace.sh index 5395165..ba7af19 100755 --- a/sim/cluster0/scripts/deploy-ac-workspace.sh +++ b/sim/cluster0/scripts/deploy-ac-workspace.sh @@ -30,6 +30,12 @@ fi cd "$AC_ROOT" log "submodule sync + init core: ${SUBS_CORE}" git submodule sync --recursive 2>/dev/null || true +for _sub in $SUBS_CORE; do + if [ -d "${AC_ROOT}/${_sub}" ]; then + git -C "${AC_ROOT}/${_sub}" checkout -f HEAD 2>/dev/null || true + git -C "${AC_ROOT}/${_sub}" clean -fd 2>/dev/null || true + fi +done # shellcheck disable=SC2086 git submodule update --init --depth 1 $SUBS_CORE log "submodule init compose: ${SUBS_COMPOSE}" diff --git a/sim/cluster0/scripts/sync-cluster-scripts.sh b/sim/cluster0/scripts/sync-cluster-scripts.sh new file mode 100644 index 0000000..45e49d5 --- /dev/null +++ b/sim/cluster0/scripts/sync-cluster-scripts.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Sync NFS /shared/cluster from local ac-deploy checkout (run on any cast node as root). +set -eu +SRC="${1:-/mnt/repos/ac/ac-deploy/sim/cluster0}" +DST="${2:-/shared/cluster}" +[ -d "$SRC/scripts" ] || { echo "missing $SRC"; exit 1; } +cp -a "$SRC/scripts/." "$DST/scripts/" +cp -a "$SRC/nginx/." "$DST/nginx/" +install -m644 "$SRC/cluster.env" "$DST/cluster.env" +install -m755 "$SRC/populate_lab_setup.sh" "$DST/" +install -m755 "$SRC/verify_lab_setup.sh" "$DST/" 2>/dev/null || true +echo "sync-cluster-scripts_ok $SRC -> $DST" diff --git a/sim/cluster0/scripts/validate-ac-repos.sh b/sim/cluster0/scripts/validate-ac-repos.sh index b9bb71c..8c59990 100755 --- a/sim/cluster0/scripts/validate-ac-repos.sh +++ b/sim/cluster0/scripts/validate-ac-repos.sh @@ -50,8 +50,12 @@ if [ -d "${LEGACY}/.git" ]; then log "FAIL legacy monolith present at $LEGACY ($_url) — run purge-legacy-monolith.sh" FAIL=1 elif [ -e "$LEGACY" ]; then - log "FAIL legacy path still exists at $LEGACY (not a git checkout)" - FAIL=1 + if [ -d "${LEGACY}/examples/platform" ] && [ ! -d "${LEGACY}/.git" ]; then + log "OK hub platform stub at ${LEGACY}/examples/platform (not monolith)" + else + log "FAIL legacy path still exists at $LEGACY (not a git checkout)" + FAIL=1 + fi else log "OK no legacy monolith at $LEGACY" fi