Compare commits
12 changed files with 10 additions and 45 deletions
1
AUTHORS
1
AUTHORS
|
|
@ -1 +0,0 @@
|
||||||
Scott "R00tPiG Security" Lindsey <rootpig@georgelambert.org> (rootpig) — owner
|
|
||||||
10
OWNER.md
10
OWNER.md
|
|
@ -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.
|
|
||||||
24
README.md
24
README.md
|
|
@ -1,7 +1,5 @@
|
||||||
# verae-fleet
|
# verae-fleet
|
||||||
|
|
||||||
[](https://github.com/RichardLitt/standard-readme)
|
|
||||||
|
|
||||||
Operator control plane for Verae Time × Zapier **runtime** services:
|
Operator control plane for Verae Time × Zapier **runtime** services:
|
||||||
|
|
||||||
- a **list** of every service and its config file
|
- 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
|
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`
|
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
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Per-service files: [`services/`](services/).
|
||||||
| Service | Config | min | max | keepFloor | Spawned by fleet |
|
| Service | Config | min | max | keepFloor | Spawned by fleet |
|
||||||
|---------|--------|-----|-----|-----------|------------------|
|
|---------|--------|-----|-----|-----------|------------------|
|
||||||
| nats | `services/nats.json` | 1 | 1 | no | no (external monitor) |
|
| 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 |
|
| middleware-http | `services/middleware-http.json` | 1 | 1 | yes | yes |
|
||||||
| job-poller | `services/job-poller.json` | 1 | 2 | yes | yes |
|
| job-poller | `services/job-poller.json` | 1 | 2 | yes | yes |
|
||||||
| webhook-deliver | `services/webhook-deliver.json` | 1 | 2 | yes | yes |
|
| webhook-deliver | `services/webhook-deliver.json` | 1 | 2 | yes | yes |
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
},
|
},
|
||||||
"services": {
|
"services": {
|
||||||
"nats": { "min": 1, "max": 1, "keepFloor": false, "enabled": true, "managed": false },
|
"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-authz": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||||
"access-web": { "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-api": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
},
|
},
|
||||||
"services": {
|
"services": {
|
||||||
"nats": { "min": 1, "max": 1, "keepFloor": false, "enabled": true, "managed": false },
|
"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-authz": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||||
"access-web": { "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-api": { "min": 1, "max": 1, "keepFloor": true, "enabled": true },
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
"package": "zappier-accounting-export",
|
"package": "zappier-accounting-export",
|
||||||
"role": "accounting-export",
|
"role": "accounting-export",
|
||||||
"managed": true,
|
"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 },
|
"health": { "type": "http", "path": "/health", "timeoutMs": 2000 },
|
||||||
"ports": { "healthBase": 3013 },
|
"ports": { "healthBase": 3013 },
|
||||||
"spawn": {
|
"spawn": {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"id": "zapier-platform-app",
|
"id": "zapier-platform-app",
|
||||||
"package": "verae-zapier",
|
"package": "verae-zapier",
|
||||||
"runtime": "Zapier cloud",
|
"runtime": "Zapier cloud",
|
||||||
"notes": "HTTPS only to verae-edge-billing. Never NATS."
|
"notes": "HTTPS only to zappier-edge. Never NATS."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "verae-activate",
|
"id": "verae-activate",
|
||||||
|
|
|
||||||
41
services/zappier-edge.json
Normal file
41
services/zappier-edge.json
Normal 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."
|
||||||
|
}
|
||||||
|
|
@ -17,7 +17,7 @@ import { sshSpawnWorker, sshKillWorker, sshHttp, sshCheck, sshWriteIntent } from
|
||||||
const WORKER = path.join(path.dirname(fileURLToPath(import.meta.url)), 'worker.js');
|
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.
|
* Everything else is the fleet health worker.
|
||||||
*/
|
*/
|
||||||
export function spawnLocal(root, spec, env, healthPort) {
|
export function spawnLocal(root, spec, env, healthPort) {
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ describe('verae-fleet', () => {
|
||||||
const ids = rows.map((r) => r.id);
|
const ids = rows.map((r) => r.id);
|
||||||
for (const need of [
|
for (const need of [
|
||||||
'nats',
|
'nats',
|
||||||
'verae-edge-billing',
|
'zappier-edge',
|
||||||
'access-authz',
|
'access-authz',
|
||||||
'access-web',
|
'access-web',
|
||||||
'access-api',
|
'access-api',
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ describe('machine placement', () => {
|
||||||
|
|
||||||
it('skips machines that do not allow the role', () => {
|
it('skips machines that do not allow the role', () => {
|
||||||
const machines = [
|
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'] },
|
{ id: 'trees', enabled: true, capacity: 8, roles: ['tree-node'] },
|
||||||
];
|
];
|
||||||
const pick = pickMachine(machines, [], 'tree-node', 'tree-node');
|
const pick = pickMachine(machines, [], 'tree-node', 'tree-node');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue