refactor: 边缘节点与配置精简
- 边缘: Prometheus 改为 vmagent,统一 docker-compose.yml,内存+磁盘缓存 - 边缘脚本: 合并为 deploy.sh [--local],删除 run-edge-local、quick-setup、run-edge-with-cache - 配置: 合并为 update-configs.sh,统一 targets.csv,生成 target-onvif/target-ping/target-topology - 删除 topology-editor、旧格式 devices.csv/ping-targets.csv、setup-remote-write、test-connection - 文档: 更新 EDGE_CACHE、TIANDITU(瓦片改 4090 直连 tile-cache) Made-with: Cursor
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# 部署指南
|
||||
|
||||
部署顺序见 **[doc/README.md](README.md)#部署顺序**:中央 → 边缘 → 多用户/告警(可选)→ 拓扑标注(可选)。本文为各步操作与验证要点。
|
||||
部署顺序见 **[doc/README.md](README.md)#部署顺序**:中央 → 边缘 → 多用户/告警(可选)。本文为各步操作与验证要点。
|
||||
|
||||
---
|
||||
|
||||
## 第一步:部署中央服务器
|
||||
|
||||
**前置**:Docker、Docker Compose;端口 3000、9091、8428、9093、4080 未被占用;磁盘充足。
|
||||
**前置**:Docker、Docker Compose;端口 3000、9091、8428、9093、4090 未被占用;磁盘充足。
|
||||
|
||||
```bash
|
||||
cd central-server
|
||||
@@ -14,7 +14,7 @@ cp env.example .env # 可选
|
||||
bash deploy.sh
|
||||
```
|
||||
|
||||
**验证**:Grafana http://localhost:3000(admin/admin123)、Prometheus http://localhost:9091、VictoriaMetrics http://localhost:8428、拓扑标注助手 http://localhost:4080。
|
||||
**验证**:Grafana http://localhost:3000(admin/admin123)、Prometheus http://localhost:9091、VictoriaMetrics http://localhost:8428。
|
||||
|
||||
---
|
||||
|
||||
@@ -22,10 +22,10 @@ bash deploy.sh
|
||||
|
||||
**前提**:中央已运行,VictoriaMetrics 8428 可访问。
|
||||
|
||||
- **本机同机**:`cd edge-agent && bash run-edge-local.sh`(中央地址设为 host.docker.internal:8428)。
|
||||
- **本机同机**:`cd edge-agent && bash deploy.sh --local`(中央地址设为 host.docker.internal:8428)。
|
||||
- **边缘在另一台机器**:
|
||||
- 在 edge-agent 下 `cp env.example .env`,编辑 `CENTRAL_SERVER_HOST`、`CENTRAL_SERVER_PORT=8428`。
|
||||
- `cd config && ./update-configs.sh && cd .. && bash deploy.sh`。
|
||||
- `bash deploy.sh`(会自动调用 update-configs)。
|
||||
|
||||
**验证**:边缘 Prometheus http://localhost:9092(或边缘机 IP:9092);中央 Grafana 选数据源 **VictoriaMetrics**,查询 `probe_success{job="network-ping"}` 可见边缘数据。
|
||||
|
||||
@@ -42,16 +42,6 @@ bash deploy.sh
|
||||
|
||||
---
|
||||
|
||||
## 第四步(可选):拓扑标注助手
|
||||
|
||||
与中央同机运行,访问 http://localhost:4080。上传本机 `targets.csv` → 选择设备、GPS 或地图点击补坐标 → 保存 → 下载 CSV → 将下载文件部署到各边缘 `edge-agent/config/targets.csv`,在边缘执行:
|
||||
|
||||
```bash
|
||||
cd edge-agent/config && ./update-configs.sh && ./csv-to-topology-geojson.sh targets.csv topology.geojson
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 部署后检查清单
|
||||
|
||||
- **中央**:`docker compose ps` 中相关服务 Up;Grafana 中 Prometheus 数据源可查 `up`。
|
||||
|
||||
Reference in New Issue
Block a user