Infra as code for Scobleclaw multi-node cluster
- Multi-host flake.nix (3x N97 x86_64 + 2x RPi4 aarch64) - Shared modules: k3s-cluster, tailscale, meos-gateway - Node configs: n97-1 (control plane), n97-2/n97-3 (Ollama workers), rpi4-1/rpi4-2 (ARM workers) - K8s manifests: Forgejo, Postgres (CNPG), Umami, OpenBrain, MeOS Dashboard, MCP servers - Bootstrap and DB migration scripts - Migration plan doc (7-day phased rollout) |
||
|---|---|---|
| apps | ||
| docs | ||
| 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/