docs: deployment overview + LXC server deploy + per-host agent install
This commit is contained in:
parent
585fbd0623
commit
b06668fcbb
3 changed files with 280 additions and 0 deletions
51
docs/deployment-overview.md
Normal file
51
docs/deployment-overview.md
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
# Deployment Overview
|
||||
|
||||
Two artifacts, built independently, deployed independently.
|
||||
|
||||
```
|
||||
┌─────────────────────────┐
|
||||
│ Server (LXC in RZ) │
|
||||
agents ──WSS─>│ - Phoenix release │
|
||||
│ - SQLite │
|
||||
│ - Caddy (TLS) │
|
||||
└─────────────────────────┘
|
||||
▲
|
||||
│ ssh
|
||||
│
|
||||
┌─────────────────────────┐
|
||||
│ Operator workstation │
|
||||
│ - Builds server release│
|
||||
│ - Builds agent binary │
|
||||
└─────────────────────────┘
|
||||
│ scp
|
||||
▼
|
||||
┌─────────────────────────┐
|
||||
│ Proxmox host (any of N) │
|
||||
│ - Burrito agent binary │
|
||||
│ - systemd unit │
|
||||
└─────────────────────────┘
|
||||
```
|
||||
|
||||
## What runs where
|
||||
|
||||
| Component | Host | Port / Path |
|
||||
|-----------|------|------------------------------------------|
|
||||
| Caddy | Server LXC | 443 public, forwards → 127.0.0.1:4000 |
|
||||
| Phoenix | Server LXC | 127.0.0.1:4000 (HTTP + WS) |
|
||||
| SQLite | Server LXC | file at $DATABASE_PATH |
|
||||
| Agent | Proxmox host | no listening ports |
|
||||
|
||||
## Secrets the operator must provide
|
||||
|
||||
| Variable | Where | How to generate |
|
||||
|---------------------------|------------|-------------------------------------------------|
|
||||
| `SECRET_KEY_BASE` | Server env | `mix phx.gen.secret` |
|
||||
| `DASHBOARD_PASSWORD_HASH` | Server env | `mix run -e 'IO.puts(Argon2.hash_pwd_salt("..."))'` |
|
||||
| Agent token | Server DB | Admin UI → "Add host" reveals it once |
|
||||
|
||||
## Build flow
|
||||
|
||||
1. `cd server && MIX_ENV=prod mix release` → produces `_build/prod/rel/server/`
|
||||
2. `cd agent && ./scripts/build-linux.sh` → produces `dist/proxmox-monitor-agent_linux_amd64`
|
||||
|
||||
See `server/docs/deploy-lxc.md` and `agent/docs/install.md` for step-by-step.
|
||||
Loading…
Add table
Add a link
Reference in a new issue