- Passwort-Reset
cd management
npm run reset-password -- admin "neues-passwort"
- Agent-Hardening
backend/.env unterstützt jetzt:
ALLOWED_MANAGEMENT_IPS="127.0.0.1,DEINE-MANAGEMENT-IP"
Wenn gesetzt, akzeptiert der Agent nur Requests von diesen IPs.
- Audit-Log
Management speichert Aktionen wie Login, Logout, Node-Änderungen, Schedule-Updates, Backup/Restore, Settings-Änderungen.
- Job-History
Management speichert gestartete Backup/Restore/Scheduler-Jobs mit Node, VM, Typ, Agent-Job-ID und Status.
- Operations-Seite
Neue UI-Seite Operations mit:
- Job History
- Audit Log
- systemd Templates
deploy/systemd/incus-backup-agent.service
deploy/systemd/incus-backup-management.service
- Deployment-Doku
docs/deployment.md
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
# Deployment
|
||||
|
||||
## Node Agent
|
||||
|
||||
Run this on every Incus host:
|
||||
|
||||
```bash
|
||||
cd /opt/incus-backup-ui/backend
|
||||
cp .env.example .env
|
||||
npm install
|
||||
sudo npm start
|
||||
```
|
||||
|
||||
Important `.env` values:
|
||||
|
||||
```env
|
||||
PORT=3000
|
||||
API_TOKEN="long-random-token"
|
||||
ALLOWED_MANAGEMENT_IPS="management-server-ip"
|
||||
```
|
||||
|
||||
If `ALLOWED_MANAGEMENT_IPS` is set, the agent only accepts requests from those comma-separated IP addresses.
|
||||
|
||||
Install systemd service:
|
||||
|
||||
```bash
|
||||
sudo cp deploy/systemd/incus-backup-agent.service /etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now incus-backup-agent
|
||||
sudo journalctl -u incus-backup-agent -f
|
||||
```
|
||||
|
||||
## Management API
|
||||
|
||||
Run this on the management server:
|
||||
|
||||
```bash
|
||||
cd /opt/incus-backup-ui/management
|
||||
cp .env.example .env
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
Important `.env` values:
|
||||
|
||||
```env
|
||||
PORT=3100
|
||||
SESSION_SECRET="long-random-secret"
|
||||
AUTH_USERNAME="admin"
|
||||
AUTH_PASSWORD="initial-password"
|
||||
DATABASE_PATH="./management.sqlite"
|
||||
```
|
||||
|
||||
Reset an existing password:
|
||||
|
||||
```bash
|
||||
npm run reset-password -- admin "new-password"
|
||||
```
|
||||
|
||||
Install systemd service:
|
||||
|
||||
```bash
|
||||
sudo useradd --system --home /opt/incus-backup-ui --shell /usr/sbin/nologin incus-backup
|
||||
sudo chown -R incus-backup:incus-backup /opt/incus-backup-ui/management
|
||||
sudo cp deploy/systemd/incus-backup-management.service /etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now incus-backup-management
|
||||
sudo journalctl -u incus-backup-management -f
|
||||
```
|
||||
|
||||
## Frontend
|
||||
|
||||
Point the frontend at the management API:
|
||||
|
||||
```bash
|
||||
cd /opt/incus-backup-ui/frontend
|
||||
npm install
|
||||
VITE_API_URL=http://management-server:3100/api npm run build
|
||||
npm run preview -- --host 0.0.0.0
|
||||
```
|
||||
|
||||
For production, put the frontend and management API behind HTTPS.
|
||||
Reference in New Issue
Block a user