[#37] server install 增加重试自检
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
|
||||
## Quick Start
|
||||
1. Extract to a target dir, e.g. `/opt/argus-deploy/versions/<YYYYMMDD>`
|
||||
2. `cd scripts && sudo ./server-prepare-dirs.sh`
|
||||
3. `./server-install.sh`
|
||||
2. `cd scripts && sudo ./server-prepare-dirs.sh` (recommended)
|
||||
3. `./server-install.sh` (non‑root is supported: it will precreate minimal dirs and auto-fix Kibana/ES/Bind in containers)
|
||||
4. `./server-status.sh`
|
||||
5. `./server-selfcheck.sh` (on failure it auto-runs diagnose and writes logs under `logs/`)
|
||||
6. `./server-uninstall.sh` to tear down
|
||||
@@ -25,7 +25,11 @@
|
||||
- Writes `logs/selfcheck.json` as final summary
|
||||
|
||||
## OS Compatibility
|
||||
- NixOS / non-xattr FS: containers run with `security_opt: ["label=disable"]` and `userns_mode: host`; ensure data dirs are pre-created via `sudo ./server-prepare-dirs.sh` and owned by runtime UID:GID (default 1000:1000).
|
||||
- NixOS / non-xattr FS: containers run with `security_opt: ["label=disable"]` and `userns_mode: host`.
|
||||
- If you cannot use sudo, the installer will:
|
||||
- create minimal data dirs (incl. `private/argus/log/{elasticsearch,kibana}`) with permissive perms when possible;
|
||||
- ensure inside containers: Kibana `data` → `/private/argus/log/kibana`, Elasticsearch `data` → `/private/argus/log/elasticsearch`, and Bind `rndc.key` is generated.
|
||||
You can still run `sudo ./server-prepare-dirs.sh` later to normalize ownership.
|
||||
|
||||
## Files & Layout
|
||||
- `compose/` (docker-compose.yml, .env)
|
||||
@@ -45,4 +49,3 @@ Common issues:
|
||||
- Kibana 503: wait cold start or fix DNS so `es.log.argus.com` resolves
|
||||
- web‑proxy 504: check nginx `resolver` includes `172.31.0.2 127.0.0.11`
|
||||
- EACCES/locks: ensure `sudo ./server-prepare-dirs.sh` ran and ownership matches UID:GID
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
## 快速开始
|
||||
1. 解压到目标目录(例如 `/opt/argus-deploy/versions/<YYYYMMDD>`)
|
||||
2. 进入 `scripts/`:`sudo ./server-prepare-dirs.sh`
|
||||
3. 安装:`./server-install.sh`
|
||||
2. 进入 `scripts/`:`sudo ./server-prepare-dirs.sh`(推荐)
|
||||
3. 安装:`./server-install.sh`(支持普通用户:会自动创建最小目录并在容器内修复 Kibana/ES/Bind)
|
||||
4. 状态:`./server-status.sh`
|
||||
5. 自检:`./server-selfcheck.sh`(失败会自动采集诊断)
|
||||
6. 卸载:`./server-uninstall.sh`
|
||||
@@ -19,10 +19,13 @@
|
||||
- 输出自检结果到 `logs/selfcheck.json`。
|
||||
|
||||
## 兼容说明(NixOS 等)
|
||||
- 使用 `security_opt: ["label=disable"]` 与 `userns_mode: host`;
|
||||
- 先运行 `sudo ./server-prepare-dirs.sh` 创建/授权目录为 `1000:1000`;
|
||||
- 使用 `security_opt: ["label=disable"]` 与 `userns_mode: host`。
|
||||
- 若不能使用 sudo:安装器会创建最小目录(含 `private/argus/log/{elasticsearch,kibana}`),并在容器内完成:
|
||||
- Kibana 的 `data` 软链到 `/private/argus/log/kibana`
|
||||
- Elasticsearch 的 `data` 软链到 `/private/argus/log/elasticsearch`
|
||||
- Bind 生成 `/etc/bind/rndc.key`
|
||||
安装后也可再执行 `sudo ./server-prepare-dirs.sh` 统一目录属主。
|
||||
|
||||
## 故障排查(见下文 Troubleshooting_zh)
|
||||
- `./server-selfcheck.sh` → `logs/selfcheck.json`
|
||||
- `./server-diagnose.sh` → `logs/diagnose_error_*.log` / `logs/diagnose_details_*.log`
|
||||
|
||||
|
||||
@@ -11,5 +11,6 @@
|
||||
|
||||
Web‑Proxy:8083=200/302/403;8084/8085 需包含 CORS
|
||||
Kibana:确认可解析 `es.log.argus.com`
|
||||
权限:先运行 `sudo ./server-prepare-dirs.sh`
|
||||
|
||||
权限:
|
||||
- 非 root 安装时,安装器已创建最小目录并在容器内修复 Kibana/ES/Bind;
|
||||
- 如仍有 `EACCES`/锁文件报错,可再运行 `sudo ./server-prepare-dirs.sh` 统一目录属主。
|
||||
|
||||
Reference in New Issue
Block a user