fleet redo 2026-08-17: retire PP+NPU, new topology
- Move all previous scripts to old/scripts/ (retired PP/NPU-era) - frank-default-large: llama.cpp FastMTP on dankserver (HauhauCS Qwen3.8-27B IQ4_XS + FastMTP 32K draft + ngram-mod, K q8_0/V f16, 128K ctx, batch 2048/ubatch 1024, port 7770) - frank-default-small: vLLM ROCm on dankclaw (Avesed Qwen3.6-35B-A3B INT8 W8A8, full 262144 ctx, no KV quant, 4 seqs, batch 16384, ngram spec, port 52625) - retarget deploy.sh (dankserver/dankclaw, inline sudo, no helpers) - docs: deployment + index + AGENTS.md + README for new topology, superseded banners on retired docs, add frank-redo-2026-08-17 runbook
This commit is contained in:
Executable → Regular
+28
-60
@@ -1,62 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
# deploy.sh — Deploy the vllmScripts repo to a target and restart its service.
|
||||
# deploy.sh - Deploy the vllmScripts repo to a target and restart its service.
|
||||
#
|
||||
# This script implements the second half of the git deployment workflow from
|
||||
# AGENTS.md. It assumes the local changes are committed and pushed, then:
|
||||
# 1. Pulls the repo on the target
|
||||
# 2. Installs / enables the systemd unit
|
||||
# 3. Drops page caches (dankclaw) and restarts the service
|
||||
# 2. Symlinks the systemd unit
|
||||
# 3. Reloads systemd and restarts the service
|
||||
# 4. Waits for the health endpoint and reports status
|
||||
#
|
||||
# Sudo: when FRANK_SUDO_PW is set, remote sudo pipes it via `sudo -S` for
|
||||
# headless runs. Otherwise plain `sudo` is used (tty or passwordless config).
|
||||
# Prefer the passwordless restart helpers installed on each target
|
||||
# (/usr/local/sbin/frank-restart-<large|small>.sh); they cover the unit
|
||||
# symlink, cache drop (dankclaw), daemon-reload, and restart in one root
|
||||
# script. See docs/deployment.md -> Passwordless restart.
|
||||
# Sudo: set FRANK_SUDO_PW so remote sudo reads the password from stdin
|
||||
# (`sudo -S`). The passwordless restart helpers installed for the retired
|
||||
# topology are obsolete and must not be used.
|
||||
#
|
||||
# Usage:
|
||||
# ./deploy.sh <target> [--dry-run]
|
||||
# FRANK_SUDO_PW=... ./deploy.sh <target>
|
||||
#
|
||||
# Targets:
|
||||
# dankclaw - llama.cpp server (frank-default-large.service, port 7770)
|
||||
# dankserver - llama.cpp server (frank-default-small.service, port 7770)
|
||||
#
|
||||
# Example:
|
||||
# ./deploy.sh dankclaw
|
||||
# ./deploy.sh dankserver --dry-run
|
||||
# Targets (2026-08-17 topology):
|
||||
# dankserver - llama.cpp FastMTP (frank-default-large.service, port 7770)
|
||||
# dankclaw - vLLM ROCm (frank-default-small.service, port 52625)
|
||||
set -euo pipefail
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Target configuration
|
||||
# ---------------------------------------------------------------------------
|
||||
declare -A REMOTE_USER REMOTE_HOST REMOTE_DIR SERVICE SERVICE_HEALTH DROP_CACHES HELPER HEALTH_WAIT
|
||||
|
||||
REMOTE_USER[dankclaw]=dank
|
||||
REMOTE_HOST[dankclaw]=dankclaw
|
||||
REMOTE_DIR[dankclaw]="/home/dank/vllmScripts"
|
||||
SERVICE[dankclaw]="frank-default-large"
|
||||
SERVICE_HEALTH[dankclaw]="http://127.0.0.1:7770/health"
|
||||
# Drop page caches before restart: with the model's pages fully cached, the
|
||||
# KV/graph allocation stalls at load (VRAM stuck at 28 GiB). See AGENTS.md.
|
||||
DROP_CACHES[dankclaw]=1
|
||||
# Passwordless restart helper (root-owned, installed via /etc/sudoers.d/frank-large).
|
||||
# When present, deploy.sh uses it instead of inline sudo commands.
|
||||
HELPER[dankclaw]="/usr/local/sbin/frank-restart-large.sh"
|
||||
# Health wait in iterations of 2s. Cold loads after the cache drop measured
|
||||
# at up to 17 minutes on 2026-08-13; 600 iterations = 20 minutes.
|
||||
HEALTH_WAIT[dankclaw]=600
|
||||
declare -A REMOTE_USER REMOTE_HOST REMOTE_DIR SERVICE SERVICE_HEALTH DROP_CACHES HEALTH_WAIT
|
||||
|
||||
REMOTE_USER[dankserver]=dank
|
||||
REMOTE_HOST[dankserver]=dankserver
|
||||
REMOTE_DIR[dankserver]="/home/dank/vLLM"
|
||||
SERVICE[dankserver]="frank-default-small"
|
||||
SERVICE[dankserver]="frank-default-large"
|
||||
SERVICE_HEALTH[dankserver]="http://127.0.0.1:7770/health"
|
||||
DROP_CACHES[dankserver]=0
|
||||
HELPER[dankserver]="/usr/local/sbin/frank-restart-small.sh"
|
||||
# Cold load: --no-mmap reads 15.7 GB through RAM; allow 10 minutes.
|
||||
HEALTH_WAIT[dankserver]=300
|
||||
|
||||
REMOTE_USER[dankclaw]=dank
|
||||
REMOTE_HOST[dankclaw]=dankclaw
|
||||
REMOTE_DIR[dankclaw]="/home/dank/vllmScripts"
|
||||
SERVICE[dankclaw]="frank-default-small"
|
||||
SERVICE_HEALTH[dankclaw]="http://127.0.0.1:52625/health"
|
||||
DROP_CACHES[dankclaw]=0
|
||||
# vLLM loads a 38 GB checkpoint; allow 20 minutes.
|
||||
HEALTH_WAIT[dankclaw]=600
|
||||
|
||||
TARGET="${1:-}"
|
||||
DRY_RUN=0
|
||||
if [ "${2:-}" = "--dry-run" ]; then
|
||||
@@ -67,7 +54,7 @@ fi
|
||||
# Validation
|
||||
# ---------------------------------------------------------------------------
|
||||
if [ -z "${TARGET:-}" ]; then
|
||||
echo "Usage: $0 <dankclaw|dankserver> [--dry-run]"
|
||||
echo "Usage: $0 <dankserver|dankclaw> [--dry-run]"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "${REMOTE_HOST[$TARGET]:-}" ]; then
|
||||
@@ -78,8 +65,6 @@ fi
|
||||
# ---------------------------------------------------------------------------
|
||||
# Sudo wrapper (headless-friendly)
|
||||
# ---------------------------------------------------------------------------
|
||||
# When FRANK_SUDO_PW is set, remote sudo reads the password from stdin via
|
||||
# `sudo -S`. Otherwise plain `sudo` is used (tty or passwordless config).
|
||||
SUDO_PREFIX="sudo"
|
||||
if [ -n "${FRANK_SUDO_PW:-}" ]; then
|
||||
SUDO_PREFIX="printf '%s\n' '$FRANK_SUDO_PW' | sudo -S"
|
||||
@@ -131,8 +116,6 @@ ${SUDO_PREFIX} sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches'
|
||||
"
|
||||
fi
|
||||
|
||||
HELPER_PATH="${HELPER[$TARGET]:-}"
|
||||
|
||||
REMOTE_SCRIPT="
|
||||
set -euo pipefail
|
||||
cd '${REMOTE_DIR[$TARGET]}'
|
||||
@@ -140,27 +123,12 @@ cd '${REMOTE_DIR[$TARGET]}'
|
||||
echo '[2/4] Pulling repo on ${TARGET}...'
|
||||
git pull origin main
|
||||
|
||||
if [ -x '${HELPER_PATH}' ]; then
|
||||
# Passwordless restart helper (sudoers NOPASSWD) - preferred path.
|
||||
echo '[3/4] Restarting via passwordless helper ${HELPER_PATH}...'
|
||||
${SUDO_PREFIX} '${HELPER_PATH}'
|
||||
else
|
||||
echo '[3/4] Helper not installed; using inline sudo commands...'
|
||||
# Install / symlink the systemd unit
|
||||
case '${TARGET}' in
|
||||
dankclaw)
|
||||
${SUDO_PREFIX} ln -sf '${REMOTE_DIR[$TARGET]}/scripts/frank-default-large.service' /etc/systemd/system/frank-default-large.service
|
||||
;;
|
||||
dankserver)
|
||||
${SUDO_PREFIX} ln -sf '${REMOTE_DIR[$TARGET]}/scripts/frank-default-small.service' /etc/systemd/system/frank-default-small.service
|
||||
;;
|
||||
esac
|
||||
${DROP_CACHES_CMD}
|
||||
echo '[3/4] Reload and restart ${SERVICE[$TARGET]}...'
|
||||
${SUDO_PREFIX} systemctl daemon-reload
|
||||
${SUDO_PREFIX} systemctl enable '${SERVICE[$TARGET]}'
|
||||
${SUDO_PREFIX} systemctl restart '${SERVICE[$TARGET]}'
|
||||
fi
|
||||
echo '[3/4] Symlink unit and restart ${SERVICE[$TARGET]}...'
|
||||
${SUDO_PREFIX} ln -sf '${REMOTE_DIR[$TARGET]}/scripts/${SERVICE[$TARGET]}.service' /etc/systemd/system/${SERVICE[$TARGET]}.service
|
||||
${DROP_CACHES_CMD}
|
||||
${SUDO_PREFIX} systemctl daemon-reload
|
||||
${SUDO_PREFIX} systemctl enable '${SERVICE[$TARGET]}'
|
||||
${SUDO_PREFIX} systemctl restart '${SERVICE[$TARGET]}'
|
||||
"
|
||||
|
||||
if [ "$DRY_RUN" = "1" ]; then
|
||||
|
||||
Reference in New Issue
Block a user