- [x] 完成log模块镜像构建、本地端到端写日志——收集——查询流程; - [x] 完成bind模块构建; - [x] 内置域名IP自动更新脚本,使用 /private/argus/etc目录下文件进行同步,容器启动时自动写IP,定时任务刷新更新DNS服务器IP和DNS规则; Co-authored-by: root <root@curious.host.com> Reviewed-on: #8 Reviewed-by: sundapeng <sundp@mail.zgclab.edu.cn>
31 lines
1.3 KiB
Bash
Executable File
31 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
||
set -euo pipefail
|
||
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../" && pwd)"
|
||
|
||
# 创建新的private目录结构 (基于argus目录结构)
|
||
echo "[INFO] Creating private directory structure for supervisor-based containers..."
|
||
mkdir -p "$root/private/argus/log/elasticsearch"
|
||
mkdir -p "$root/private/argus/log/kibana"
|
||
mkdir -p "$root/private/argus/etc/"
|
||
|
||
|
||
# 设置数据目录权限(ES 和 Kibana 容器都使用 UID 1000)
|
||
echo "[INFO] Setting permissions for data directories..."
|
||
sudo chown -R 2133:2015 "$root/private/argus/log/elasticsearch" 2>/dev/null || true
|
||
sudo chown -R 2133:2015 "$root/private/argus/log/kibana" 2>/dev/null || true
|
||
sudo chown -R 2133:2015 "$root/private/argus/etc" 2>/dev/null || true
|
||
|
||
echo "[INFO] Supervisor-based containers will manage their own scripts and configurations"
|
||
|
||
# 检查fluent-bit相关文件是否存在
|
||
if [[ ! -f "$root/../fluent-bit/fluent-bit-bundle.tar.gz" ]]; then
|
||
echo "[WARN] fluent-bit/fluent-bit-bundle.tar.gz 不存在,请确保已创建该文件"
|
||
fi
|
||
|
||
if [[ ! -f "$root/../fluent-bit/start-fluent-bit.sh" ]]; then
|
||
echo "[WARN] fluent-bit/start-fluent-bit.sh 不存在,请确保已创建该启动脚本"
|
||
fi
|
||
|
||
echo "[OK] 初始化完成: private/argus/log/{elasticsearch,kibana}"
|
||
echo "[INFO] Fluent-bit files should be in fluent-bit/ directory"
|