38 lines
1.4 KiB
Markdown
Raw Permalink 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.

# 光湖灯塔节点初始化模板
所有接入光湖灯塔体系的服务器使用同一套可重复、可审计、可回滚的基础环境。京东云北京
`JD-FD-PRIMARY / JD-OPS-CENTER` 是第一台真实样板节点。
## 固定基线
- Ubuntu Server 22.04 LTS、x86_64
- Node.js 20、Python 3、Git、jq、Docker、Nginx默认停止配置完成前不开放 80/443
- `/opt/guanghu` 放只读部署代码,`/etc/guanghu` 放节点配置和受保护 secrets
- `/var/lib/guanghu` 放运行状态与回执,`/var/backups/guanghu` 放部署前快照;
- Gatekeeper v3.2 仅监听 `127.0.0.1:3911`,不直接暴露公网;
- 每个节点拥有独立 `node_id`、独立 SSH key_id、独立地图与回执链。
## 安装
在一台全新的 Ubuntu 22.04 节点上,以 root 执行:
```bash
NODE_ID=JD-FD-PRIMARY \
NODE_NAME='京东云北京 · 第五域国内主节点' \
NODE_ROLES='fd-primary,ops-center,lighthouse-node' \
bash server-tools/light-lake-node-bootstrap/install.sh
```
脚本可重复执行。重复部署会先把节点配置和 systemd 单元备份到
`/var/backups/guanghu/bootstrap/`
## 验收与回滚
```bash
guanghu-node-health
guanghu-node-rollback
```
健康检查必须同时证明节点身份、Gatekeeper systemd 状态、私网健康端点、仓库提交和磁盘状态。
回滚不删除 secrets不清空运行数据也不修改 SSH 公钥。