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
|
|
@ -41,6 +41,8 @@ Zapier cloud apps are listed but **not spawned**. NATS on NS1 is **monitored onl
|
|||
|
||||
On a dedicated host, run **[verae-keep](https://git.georgelambert.org/marchon/verae-keep)** next to fleet: keep restarts crashed replicas unless this console paused or stopped them (`intent.json` per instance). Pause/stop/start write that file locally and over SSH.
|
||||
|
||||
NS1 overlay (no rewrite of git JSON): `FLEET_FILE=overlays/ns1/fleet.json` `FLEET_MACHINES=overlays/ns1/machines.json`. User systemd: `bash scripts/install-systemd.sh`. Proxmox worker: machine id `px-worker` after [verae-proxmox](https://git.georgelambert.org/marchon/verae-proxmox).
|
||||
|
||||
Install on Docker / Proxmox / metal: https://zapier.georgelambert.org/packages/verae-ops/README.pdf
|
||||
|
||||
Clone: `ssh://git@git.georgelambert.org:2223/marchon/verae-fleet.git`
|
||||
|
|
|
|||
|
|
@ -42,6 +42,20 @@
|
|||
"capacity": 12,
|
||||
"roles": ["tree-node", "archive-worm"],
|
||||
"notes": "Same user/key as NS1. Enable after confirming node is on PATH."
|
||||
},
|
||||
{
|
||||
"id": "px-worker",
|
||||
"title": "Proxmox LXC 510 verae-px-worker",
|
||||
"kind": "ssh",
|
||||
"host": "10.10.10.20",
|
||||
"user": "marchon",
|
||||
"sshPort": 22,
|
||||
"identityFile": "~/.ssh/id_ed25519",
|
||||
"remoteDir": "~/verae-fleet-runtime",
|
||||
"enabled": true,
|
||||
"capacity": 12,
|
||||
"roles": ["tree-node", "archive-worm"],
|
||||
"notes": "Unprivileged Ubuntu CT 510 on NS1 vmbr1. ssh marchon@10.10.10.20."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
13
packages/verae-fleet/overlays/ns1/README.md
Normal file
13
packages/verae-fleet/overlays/ns1/README.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# NS1 overlay
|
||||
|
||||
Checked-in fleet + machines for **NS1.GEORGELAMBERT.ORG** (Proxmox). Do not rewrite these from `start.sh`.
|
||||
|
||||
```bash
|
||||
export FLEET_FILE=$PWD/overlays/ns1/fleet.json
|
||||
export FLEET_MACHINES=$PWD/overlays/ns1/machines.json
|
||||
node src/cli.js serve
|
||||
```
|
||||
|
||||
Archive worm/tree/poller stay **disabled** here so **verae-keep** owns those processes. HTTP doors stay with fleet.
|
||||
|
||||
`px-worker` (LXC 510, `10.10.10.20`) is listed disabled until `verae-proxmox/scripts/create-worker.sh` and `verae-fleet ssh-check px-worker` succeed; then set `"enabled": true`.
|
||||
40
packages/verae-fleet/overlays/ns1/fleet.json
Normal file
40
packages/verae-fleet/overlays/ns1/fleet.json
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"apiVersion": "verae.fleet/v1",
|
||||
"control": {
|
||||
"bind": "0.0.0.0",
|
||||
"port": 3850,
|
||||
"probeIntervalMs": 750,
|
||||
"unhealthyAfterMs": 2500,
|
||||
"restartBackoffMs": [200, 800, 2000],
|
||||
"maxRestartsPerHour": 40
|
||||
},
|
||||
"nats": {
|
||||
"url": "nats://127.0.0.1:4222",
|
||||
"publicBind": false
|
||||
},
|
||||
"services": {
|
||||
"nats": { "min": 1, "max": 1, "keepFloor": false, "enabled": true, "managed": false },
|
||||
"zappier-edge": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"access-authz": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"access-web": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"access-api": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"access-leaf": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"access-zapier": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"access-staff": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"identity": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"jobs-events": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"account-balance": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"customer-service": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"sales-pricing": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"accounting-export": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"middleware-http": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"job-poller": { "min": 1, "max": 2, "keepFloor": false, "enabled": false },
|
||||
"webhook-deliver": { "min": 1, "max": 2, "keepFloor": false, "enabled": false },
|
||||
"archive-aggregator": { "min": 1, "max": 2, "keepFloor": false, "enabled": false },
|
||||
"archive-worm": { "min": 3, "max": 6, "keepFloor": false, "enabled": false },
|
||||
"tree-node": { "min": 3, "max": 9, "keepFloor": false, "enabled": false },
|
||||
"zapier-simulator": { "min": 0, "max": 1, "keepFloor": false, "enabled": true },
|
||||
"staff-iam": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||
"staff-session": { "min": 1, "max": 1, "keepFloor": true, "enabled": true }
|
||||
}
|
||||
}
|
||||
54
packages/verae-fleet/overlays/ns1/machines.json
Normal file
54
packages/verae-fleet/overlays/ns1/machines.json
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"machines": [
|
||||
{
|
||||
"id": "local",
|
||||
"title": "NS1 control plane (Proxmox host)",
|
||||
"kind": "local",
|
||||
"host": "127.0.0.1",
|
||||
"enabled": true,
|
||||
"capacity": 32,
|
||||
"roles": ["*"]
|
||||
},
|
||||
{
|
||||
"id": "ns1",
|
||||
"title": "NS1.GEORGELAMBERT.ORG SSH profile",
|
||||
"kind": "ssh",
|
||||
"host": "70.88.205.138",
|
||||
"user": "marchon",
|
||||
"sshPort": 22,
|
||||
"identityFile": "~/.ssh/id_ed25519",
|
||||
"remoteDir": "~/verae-fleet-runtime",
|
||||
"enabled": false,
|
||||
"capacity": 24,
|
||||
"roles": ["tree-node", "archive-worm", "archive-aggregator", "job-poller", "webhook-deliver"],
|
||||
"notes": "Same box as local; SSH spawn unused on all-in-one."
|
||||
},
|
||||
{
|
||||
"id": "lan-134",
|
||||
"title": "70.88.205.134",
|
||||
"kind": "ssh",
|
||||
"host": "70.88.205.134",
|
||||
"user": "marchon",
|
||||
"sshPort": 22,
|
||||
"identityFile": "~/.ssh/id_ed25519",
|
||||
"remoteDir": "~/verae-fleet-runtime",
|
||||
"enabled": false,
|
||||
"capacity": 12,
|
||||
"roles": ["tree-node", "archive-worm"]
|
||||
},
|
||||
{
|
||||
"id": "px-worker",
|
||||
"title": "Proxmox LXC 510 verae-px-worker",
|
||||
"kind": "ssh",
|
||||
"host": "10.10.10.20",
|
||||
"user": "marchon",
|
||||
"sshPort": 22,
|
||||
"identityFile": "~/.ssh/id_ed25519",
|
||||
"remoteDir": "~/verae-fleet-runtime",
|
||||
"enabled": true,
|
||||
"capacity": 12,
|
||||
"roles": ["tree-node", "archive-worm"],
|
||||
"notes": "vmbr1 LXC 510. SSH as marchon@10.10.10.20 with ~/.ssh/id_ed25519."
|
||||
}
|
||||
]
|
||||
}
|
||||
11
packages/verae-fleet/scripts/install-systemd.sh
Executable file
11
packages/verae-fleet/scripts/install-systemd.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
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-fleet.service" "$UNIT_DIR/verae-fleet.service"
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable verae-fleet.service
|
||||
loginctl enable-linger "$USER" || true
|
||||
echo "enabled verae-fleet (linger). start: systemctl --user start verae-fleet"
|
||||
echo "do not also nohup node src/cli.js serve"
|
||||
|
|
@ -19,7 +19,9 @@ export function readJson(file) {
|
|||
* @param {string} [root]
|
||||
*/
|
||||
export function loadFleet(root = FLEET_ROOT, opts = {}) {
|
||||
const fleetPath = path.join(root, 'fleet.json');
|
||||
const fleetPath = process.env.FLEET_FILE
|
||||
? path.resolve(process.env.FLEET_FILE)
|
||||
: path.join(root, 'fleet.json');
|
||||
const fleet = readJson(fleetPath);
|
||||
const dir = path.join(root, 'services');
|
||||
const services = {};
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@ export function defaultMachines() {
|
|||
}
|
||||
|
||||
export function loadMachines(root, overlayPath) {
|
||||
const file = path.join(root, 'machines.json');
|
||||
const file = process.env.FLEET_MACHINES
|
||||
? path.resolve(process.env.FLEET_MACHINES)
|
||||
: path.join(root, 'machines.json');
|
||||
let list = defaultMachines();
|
||||
if (fs.existsSync(file)) {
|
||||
const raw = JSON.parse(fs.readFileSync(file, 'utf8'));
|
||||
|
|
|
|||
19
packages/verae-fleet/systemd/verae-fleet.service
Normal file
19
packages/verae-fleet/systemd/verae-fleet.service
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[Unit]
|
||||
Description=Verae fleet operator console
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=%h/verae-stack/packages/verae-fleet
|
||||
Environment=FLEET_FILE=%h/verae-stack/packages/verae-fleet/overlays/ns1/fleet.json
|
||||
Environment=FLEET_MACHINES=%h/verae-stack/packages/verae-fleet/overlays/ns1/machines.json
|
||||
Environment=STAFF_IAM_URL=https://iam.zapier.georgelambert.org
|
||||
Environment=STAFF_COOKIE_DOMAIN=.zapier.georgelambert.org
|
||||
Environment=NATS_URL=nats://127.0.0.1:4222
|
||||
Environment=FLEET_ENABLE_LAN134=
|
||||
ExecStart=/usr/bin/node src/cli.js serve
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue