Files
Deploy-Laboratory/scripts/ssh/run-phase2-k3s-on-ylc61-as-jack.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

26 lines
965 B
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
# 在办公机执行:经 SSH 在控制节点 ylc61 上跑「K3s 安装/复验」部署流水线。
# 对应 docs/00-05 §2 步骤 1接入+ 3部署中的 k3s 路径;与 verify.sh 矩阵验收分离。
#
# 依赖:本机可 ssh ylc61BatchMode远端仓库路径存在且含 scripts/deploy-lab.sh。
set -euo pipefail
REMOTE_ROOT="${LAB_REPO_ROOT:-/home/jack/实验室建设}"
# 将当前 shell 中的 K3S_PREPARE_STORAGE 传到远端(未设置则默认 false
KS_PREP="${K3S_PREPARE_STORAGE:-false}"
exec ssh -o BatchMode=yes ylc61 bash -lc "
set -euo pipefail
cd '${REMOTE_ROOT}'
chmod +x scripts/deploy-lab.sh 2>/dev/null || true
if [[ -f scripts/.env.verify ]]; then
set -a
# shellcheck disable=SC1091
source scripts/.env.verify
set +a
fi
# 办公机传入的 K3S_PREPARE_STORAGE 覆盖远端 .env 中的默认
export K3S_PREPARE_STORAGE='${KS_PREP}'
./scripts/deploy-lab.sh k3s
"