Add Proxmox worker CT, off-box watch, backup, and tagged deploy.
Some checks are pending
offline / test (push) Waiting to run
Some checks are pending
offline / test (push) Waiting to run
NS1 is the Proxmox host. verae-proxmox creates LXC 510 (verae-px-worker 10.10.10.20 on vmbr1) with a private NATS proxy on 10.10.10.1:4222. verae-uptime GET-watches public doors; verae-backup snapshots SQLite and worm/tree data; verae-deploy does host-deps + checkout + npm ci. Fleet overlays/ns1 are checked in (start.sh no longer rewrites JSON). User systemd + linger for keep and fleet survive reboot.
This commit is contained in:
parent
2d51d7a0dd
commit
7a5e25639e
69 changed files with 1087 additions and 118 deletions
|
|
@ -28,7 +28,14 @@ KEEP_UNITS=$HOME/verae-keep/units.ns1.json KEEP_STATE=$HOME/verae-keep/data \
|
|||
nohup bash scripts/guard.sh >/tmp/verae-keep-guard.out 2>&1 &
|
||||
```
|
||||
|
||||
Or systemd user unit `systemd/verae-keep-guard.service` (`loginctl enable-linger`).
|
||||
Or user systemd (survives reboot; do not also `nohup guard.sh`):
|
||||
|
||||
```bash
|
||||
bash scripts/install-systemd.sh
|
||||
systemctl --user start verae-keep-guard
|
||||
```
|
||||
|
||||
Proxmox guest extra copies: `KEEP_UNITS=units.px-worker.json`.
|
||||
|
||||
Units: NATS (observe only), job-poller, webhook-deliver, archive-aggregator, archive-worm ×3, tree-node ×3.
|
||||
|
||||
|
|
|
|||
12
packages/verae-keep/scripts/install-systemd.sh
Executable file
12
packages/verae-keep/scripts/install-systemd.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
# User systemd for keep guard + linger so it survives reboot.
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
UNIT_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user"
|
||||
mkdir -p "$UNIT_DIR"
|
||||
install -m 644 "$ROOT/systemd/verae-keep-guard.service" "$UNIT_DIR/verae-keep-guard.service"
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable verae-keep-guard.service
|
||||
loginctl enable-linger "$USER" || true
|
||||
echo "enabled verae-keep-guard (linger). start: systemctl --user start verae-keep-guard"
|
||||
echo "do not also run nohup guard.sh"
|
||||
40
packages/verae-keep/units.px-worker.json
Normal file
40
packages/verae-keep/units.px-worker.json
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"bind": "127.0.0.1",
|
||||
"port": 3860,
|
||||
"intervalMs": 2000,
|
||||
"runtimeDir": "~/verae-fleet-runtime",
|
||||
"units": [
|
||||
{
|
||||
"id": "archive-worm-px-0",
|
||||
"health": "http://127.0.0.1:13500/health",
|
||||
"cwd": "~/verae-src/verae-fleet",
|
||||
"command": ["node", "src/worker.js"],
|
||||
"env": {
|
||||
"FLEET_ROLE": "archive-worm",
|
||||
"FLEET_SERVICE": "archive-worm",
|
||||
"FLEET_INSTANCE": "archive-worm-px-0",
|
||||
"FLEET_MACHINE": "px-worker",
|
||||
"FLEET_HEALTH_PORT": "13500",
|
||||
"FLEET_HEALTH_BIND": "127.0.0.1",
|
||||
"FLEET_STATE_DIR": "data/archive-worm-px-0",
|
||||
"NATS_URL": "nats://10.10.10.1:4222"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "tree-node-px-0",
|
||||
"health": "http://127.0.0.1:13600/health",
|
||||
"cwd": "~/verae-src/verae-fleet",
|
||||
"command": ["node", "src/worker.js"],
|
||||
"env": {
|
||||
"FLEET_ROLE": "tree-node",
|
||||
"FLEET_SERVICE": "tree-node",
|
||||
"FLEET_INSTANCE": "tree-node-px-0",
|
||||
"FLEET_MACHINE": "px-worker",
|
||||
"FLEET_HEALTH_PORT": "13600",
|
||||
"FLEET_HEALTH_BIND": "127.0.0.1",
|
||||
"FLEET_STATE_DIR": "data/tree-node-px-0",
|
||||
"NATS_URL": "nats://10.10.10.1:4222"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue