Compare commits

...
12 changed files with 10 additions and 45 deletions

View file

@ -1 +0,0 @@
Scott "R00tPiG Security" Lindsey <rootpig@georgelambert.org> (rootpig) — owner

View file

@ -1,10 +0,0 @@
# Repository owner
**Owner / credited author:** Scott "R00tPiG Security" Lindsey (`rootpig`)
Forgejo: https://git.georgelambert.org/rootpig
This repository is owned by **rootpig** for Verae Inc. server maintenance,
deployment scripting, and related operations work.
Co-contributors may appear in git history; ownership and ops credit belong to rootpig.

View file

@ -1,7 +1,5 @@
# verae-fleet
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
Operator control plane for Verae Time × Zapier **runtime** services:
- a **list** of every service and its config file
@ -48,25 +46,3 @@ NS1 overlay (no rewrite of git JSON): `FLEET_FILE=overlays/ns1/fleet.json` `FLEE
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`
## Install
```sh
git clone ssh://git@git.georgelambert.org:2223/marchon/verae-fleet.git
cd verae-fleet
```
## Usage
```sh
npm install
npm start
```
## Contributing
Questions: open an issue at https://git.georgelambert.org/marchon/verae-fleet/issues. Pull requests are accepted.
## License
UNLICENSED © George Lambert

View file

@ -6,7 +6,7 @@ Per-service files: [`services/`](services/).
| Service | Config | min | max | keepFloor | Spawned by fleet |
|---------|--------|-----|-----|-----------|------------------|
| nats | `services/nats.json` | 1 | 1 | no | no (external monitor) |
| verae-edge-billing | `services/verae-edge-billing.json` | 1 | 1 | yes | yes |
| zappier-edge | `services/zappier-edge.json` | 1 | 1 | yes | yes |
| middleware-http | `services/middleware-http.json` | 1 | 1 | yes | yes |
| job-poller | `services/job-poller.json` | 1 | 2 | yes | yes |
| webhook-deliver | `services/webhook-deliver.json` | 1 | 2 | yes | yes |

View file

@ -14,7 +14,7 @@
},
"services": {
"nats": { "min": 1, "max": 1, "keepFloor": false, "enabled": true, "managed": false },
"verae-edge-billing": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
"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 },

View file

@ -14,7 +14,7 @@
},
"services": {
"nats": { "min": 1, "max": 1, "keepFloor": false, "enabled": true, "managed": false },
"verae-edge-billing": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
"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 },

View file

@ -5,7 +5,7 @@
"package": "zappier-accounting-export",
"role": "accounting-export",
"managed": true,
"runtime": "HTTP :3013 IIF/CSV → verae-edge-billing invoices",
"runtime": "HTTP :3013 IIF/CSV → zappier-edge invoices",
"health": { "type": "http", "path": "/health", "timeoutMs": 2000 },
"ports": { "healthBase": 3013 },
"spawn": {

View file

@ -6,7 +6,7 @@
"id": "zapier-platform-app",
"package": "verae-zapier",
"runtime": "Zapier cloud",
"notes": "HTTPS only to verae-edge-billing. Never NATS."
"notes": "HTTPS only to zappier-edge. Never NATS."
},
{
"id": "verae-activate",

View file

@ -0,0 +1,41 @@
{
"id": "zappier-edge",
"title": "Zappier commercial HTTPS edge",
"kind": "http",
"package": "zappier",
"role": "zappier-edge",
"managed": true,
"runtime": "loopback :3000 (portal, admin, Stripe; public doors are access-*)",
"health": { "type": "http", "path": "/health", "timeoutMs": 4000 },
"ports": { "healthBase": 3000 },
"spawn": {
"cwd": "../zappier",
"command": "npx",
"args": ["ts-node", "--transpile-only", "src/index.ts"]
},
"env": {
"PORT": "3000",
"STAFF_IAM_URL": "http://127.0.0.1:3028",
"STAFF_AUTH": "1",
"BIND": "127.0.0.1",
"ZAPPIER_UPSTREAM": "http://127.0.0.1:3100",
"CS_SERVICE_URL": "http://127.0.0.1:3011",
"SALES_PRICING_URL": "http://127.0.0.1:3012",
"ACCOUNTING_EXPORT_URL": "http://127.0.0.1:3013",
"NATS_URL": "nats://10.10.10.21:4222,nats://10.10.10.22:4222,nats://10.10.10.23:4222",
"AUTHZ_URL": "http://127.0.0.1:3020",
"ACCOUNT_BALANCE_URL": "http://127.0.0.1:3010",
"IDENTITY_URL": "http://127.0.0.1:3026"
},
"nats": {
"in": [],
"out": [
"verae.billing.usage.recorded",
"verae.billing.payment.recorded",
"verae.billing.credit.applied",
"verae.billing.statement.get",
"verae.billing.balance.adjust"
]
},
"notes": "Loopback only. Public Zapier traffic hits access-zapier :3024."
}

View file

@ -17,7 +17,7 @@ import { sshSpawnWorker, sshKillWorker, sshHttp, sshCheck, sshWriteIntent } from
const WORKER = path.join(path.dirname(fileURLToPath(import.meta.url)), 'worker.js');
/**
* Real HTTP apps (verae-edge-billing, middleware) set `spawn` in services/*.json.
* Real HTTP apps (zappier-edge, middleware) set `spawn` in services/*.json.
* Everything else is the fleet health worker.
*/
export function spawnLocal(root, spec, env, healthPort) {

View file

@ -52,7 +52,7 @@ describe('verae-fleet', () => {
const ids = rows.map((r) => r.id);
for (const need of [
'nats',
'verae-edge-billing',
'zappier-edge',
'access-authz',
'access-web',
'access-api',

View file

@ -33,7 +33,7 @@ describe('machine placement', () => {
it('skips machines that do not allow the role', () => {
const machines = [
{ id: 'edge', enabled: true, capacity: 8, roles: ['verae-edge-billing'] },
{ id: 'edge', enabled: true, capacity: 8, roles: ['zappier-edge'] },
{ id: 'trees', enabled: true, capacity: 8, roles: ['tree-node'] },
];
const pick = pickMachine(machines, [], 'tree-node', 'tree-node');