refactor: config/apps 目录重组、文档重构、架构图收窄

- 中央:config/(prometheus,alertmanager,grafana)、apps/(tile-cache,topology-editor)
- 边缘:config/(vmagent,blackbox,targets)、apps/(onvif-exporter)
- env: TRAEFIK_PROVIDER、prometheus/env.example 详细说明
- 文档:README/doc 重构,EDGE_CACHE 合并到 EDGE_AGENT_CONFIG
- targets.csv 更新流程说明,ARCHITECTURE 图收窄

Made-with: Cursor
This commit is contained in:
2026-02-28 22:05:43 -05:00
parent 650e5145f1
commit ab1515dffb
48 changed files with 2071 additions and 509 deletions

View File

@@ -1,6 +1,10 @@
#!/bin/bash
# 边缘节点部署vmagent + 内存/磁盘缓存
# 用法: ./deploy.sh [--local] --local = 本机同机(中央与边缘同机)
#
# targets.csv部署时自动从 targets.csv 生成 target-onvif.json、target-ping.json
# 修改 targets.csv 后需手动执行 config/update-configs.sh或重新 deploy
# vmagent 每 5 分钟自动重载 JSON无需重启。
set -e
cd "$(dirname "${BASH_SOURCE[0]}")"
@@ -24,7 +28,7 @@ command -v jq &>/dev/null || { echo "❌ 需要 jq"; exit 1; }
[ -f config/targets.csv ] && (cd config && ./update-configs.sh) || true
[ ! -f config/target-onvif.json ] && echo '[]' > config/target-onvif.json
[ ! -f config/target-ping.json ] && echo '[]' > config/target-ping.json
[ ! -f prometheus-edge/vmagent-scrape.yml.template ] && { echo "❌ 缺少 vmagent-scrape.yml.template"; exit 1; }
[ ! -f config/vmagent/vmagent-scrape.yml.template ] && { echo "❌ 缺少 config/vmagent/vmagent-scrape.yml.template"; exit 1; }
# .env
[ ! -f .env ] && cp env.example .env