Infra as code for Scobleclaw multi-node cluster
SKIP LOCKED + heartbeat-based lease + LISTEN/NOTIFY. Lives in pgqueue schema. Idempotent migration, installable in any database. API: enqueue, claim_next, heartbeat, ack, nack, janitor_reset_stale_claims. View: pgqueue.depth for dashboard. Reference: skills/data-stack-conventions.md |
||
|---|---|---|
| apps | ||
| docs | ||
| migrations | ||
| modules | ||
| nodes | ||
| scripts | ||
| flake.nix | ||
| hardware-n97.nix | ||
| hardware-rpi4.nix | ||
| README.md | ||
sscoble/devops
Infrastructure as code for the Scobleclaw cluster.
Hardware
| Node | Platform | Arch | Role | RAM | Storage |
|---|---|---|---|---|---|
| n97-1 | GMK N97 | x86_64 | k3s server | 12GB | 233GB |
| n97-2 | GMK N97 | x86_64 | k3s worker | 12GB | ~233GB |
| n97-3 | GMK N97 | x86_64 | k3s worker | 12GB | ~233GB |
| rpi4-1 | RPi 4B | aarch64 | k3s worker | 8GB | SD/USB |
| rpi4-2 | RPi 4B | aarch64 | k3s worker | 8GB | SD/USB |
Network
- Mesh: Tailscale (all nodes)
- DNS: os.scoble.me → n97-1 (Tailscale IP), SSL via Let's Encrypt + Cloudflare DNS
- K8s API: Tailscale-only, no public exposure
Repo Layout
├── README.md
├── flake.nix # NixOS flake — all 5 nodes
├── hardware-n97.nix # shared N97 perf tuning
├── hardware-rpi4.nix # shared RPi4 config
├── modules/
│ ├── k3s-cluster.nix # shared k3s agent config
│ ├── meos-gateway.nix # nginx + acme + homepage
│ ├── ollama-worker.nix # Ollama on worker nodes
│ └── tailscale.nix # shared Tailscale config
├── nodes/
│ ├── n97-1.nix # control plane + gateway
│ ├── n97-2.nix # Ollama worker x86
│ ├── n97-3.nix # Ollama worker x86
│ ├── rpi4-1.nix # ARM worker (light services)
│ └── rpi4-2.nix # ARM worker (umami)
├── apps/ # K8s manifests + Helm values
│ ├── forgejo/
│ ├── postgres/
│ ├── umami/
│ ├── openbrain/
│ ├── meos-dashboard/
│ └── mcp-servers/
├── scripts/
│ ├── bootstrap-node.sh # initial node setup
│ └── migrate-db.sh # Postgres migration from bare to K8s
└── docs/
└── migration.md # transition plan
Quickstart
# Build and deploy a node
nixos-rebuild switch --flake .#n97-1 --target-host root@100.x.x.x
# Access cluster
kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml get nodes
# Deploy app
kubectl apply -k apps/forgejo/