mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-07-29 01:37:54 +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:
committed by
Anton Afanasyeu
parent
4d2db29b8b
commit
6c2403aae9
@@ -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}"
|
||||
|
||||
12
sim/cluster0/scripts/sync-cluster-scripts.sh
Normal file
12
sim/cluster0/scripts/sync-cluster-scripts.sh
Normal 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"
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user