Files
Deploy-Laboratory/scripts/ssh/smoke-verify-matrix-on-ylc61.sh
jack 231b6713c4 chore: 对齐 00-05 §2 的部署与验证脚本
- 新增 deploy-lab.sh(k3s/longhorn/nginx 铺栈)与 ssh/run-phase2-k3s-on-ylc61-as-jack.sh
- verify.sh:flow/preflight、VERIFY_TEARDOWN 默认、注释与 §2 对应
- 更新 smoke-verify、README、.env.verify.example、根 README 与主要 playbook 头注释
- k3s-delete-lab-stacks 标明重度清场语义

Made-with: Cursor
2026-03-26 07:32:08 +08:00

36 lines
1.2 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 从办公机 Git Bash 执行SSH 到 ylc61 上跑若干样板 verify对应 docs/00-05 §2 步骤 46 的抽样)。
# 步骤 13 需已满足:远端仓库路径正确、已 deploy K3s、可选 scripts/.env.verify。
#
# 环境变量:
# VERIFY_REPO_ROOT 远端仓库根目录(默认 /home/jack/实验室建设)
# VERIFY_TEARDOWN / nginx_entry_base / nodejs_entry_base 传给远端 verify.sh
set -euo pipefail
REMOTE_ROOT="${VERIFY_REPO_ROOT:-/home/jack/实验室建设}"
TEARDOWN="${VERIFY_TEARDOWN:-1}"
NGX="${nginx_entry_base:-http://192.168.2.61}"
NODE="${nodejs_entry_base:-http://192.168.2.61}"
exec ssh -o BatchMode=yes ylc61 bash -lc "
set -euo pipefail
cd '${REMOTE_ROOT}'
chmod +x scripts/verify.sh 2>/dev/null || true
export VERIFY_TEARDOWN='${TEARDOWN}'
export nginx_entry_base='${NGX}'
export nodejs_entry_base='${NODE}'
if [[ -f scripts/.env.verify ]]; then
set -a
# shellcheck disable=SC1091
source scripts/.env.verify
set +a
fi
export VERIFY_TEARDOWN='${TEARDOWN}'
export nginx_entry_base='${NGX}'
export nodejs_entry_base='${NODE}'
./scripts/verify.sh run 02-05
./scripts/verify.sh run 03-05
./scripts/verify.sh run 03-07
./scripts/verify.sh run 04-01
"