init
PostgreSQL integration / tests (push) Has been cancelled

This commit is contained in:
ms
2026-11-09 13:15:48 +01:00
parent 4fb7613689
commit 2c1c48df0c
78 changed files with 2707 additions and 176 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
[[ $EUID -eq 0 ]] || { echo 'Run as root on the monitored host.'; exit 1; }
[[ "$PWD" == /opt/dilib-dashboard ]] || { echo 'Extract project to /opt/dilib-dashboard first.'; exit 1; }
apt-get update
apt-get install -y python3 python3-venv
id dilib-agent >/dev/null 2>&1 || useradd --system --home /var/lib/dilib-agent --shell /usr/sbin/nologin dilib-agent
install -d -o dilib-agent -g dilib-agent -m 750 /var/lib/dilib-agent /var/lib/dilib-flower
install -d -o root -g dilib-agent -m 750 /etc/dilib-agent
python3 -m venv .venv-agent
.venv-agent/bin/pip install -r agent/requirements.txt
if [[ ! -f /etc/dilib-agent/agent.env ]]; then
install -m 640 -o root -g dilib-agent agent/.env.example /etc/dilib-agent/agent.env
fi
install -m 644 deploy/systemd/dilib-agent.service /etc/systemd/system/
systemctl daemon-reload
echo 'Configure agent.env and start: systemctl enable --now dilib-agent'