1
0
mirror of git://f0xx.org/ac/ac-deploy synced 2026-07-29 04:19:00 +03:00

Cluster ops: tolerate hub platform stub; auto-clean dirty submodules.

Add sync-cluster-scripts.sh for NFS /shared/cluster updates from /mnt/repos/ac.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyev
2026-06-24 23:18:15 +02:00
committed by Anton Afanasyeu
parent 4d2db29b8b
commit 6c2403aae9
3 changed files with 24 additions and 2 deletions

View File

@@ -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}"

View File

@@ -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"

View File

@@ -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
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