export function fallbackHardware() { return { clusters: [ { name: "atlas", role: "Flux-managed Kubernetes for bstein.dev services", nodes: [ { name: "titan-0a", role: "control-plane (leader)", hardware: "rpi5", status: "ready" }, { name: "titan-0b", role: "control-plane", hardware: "rpi5", status: "ready" }, { name: "titan-0c", role: "control-plane", hardware: "rpi5", status: "ready" }, { name: "titan-04", role: "worker", hardware: "rpi5", status: "ready" }, { name: "titan-05", role: "worker", hardware: "rpi5", status: "ready" }, { name: "titan-06", role: "worker", hardware: "rpi5", status: "ready" }, { name: "titan-07", role: "worker", hardware: "rpi5", status: "ready" }, { name: "titan-08", role: "worker", hardware: "rpi5", status: "ready" }, { name: "titan-09", role: "worker", hardware: "rpi5", status: "ready" }, { name: "titan-10", role: "worker", hardware: "rpi5", status: "ready" }, { name: "titan-11", role: "worker", hardware: "rpi5", status: "ready" }, { name: "titan-12", role: "worker (HDD astreae)", hardware: "rpi4", status: "ready" }, { name: "titan-13", role: "worker (HDD astreae)", hardware: "rpi4", status: "ready" }, { name: "titan-14", role: "worker (HDD astreae)", hardware: "rpi4", status: "ready" }, { name: "titan-15", role: "worker (HDD astreae)", hardware: "rpi4", status: "ready" }, { name: "titan-16", role: "worker", hardware: "rpi4", status: "offline" }, { name: "titan-17", role: "worker (HDD asteria)", hardware: "rpi4", status: "ready" }, { name: "titan-18", role: "worker (HDD asteria)", hardware: "rpi4", status: "ready" }, { name: "titan-19", role: "worker (HDD asteria)", hardware: "rpi4", status: "ready" }, { name: "titan-20", role: "jetson ai workload", hardware: "jetson xavier", status: "ready" }, { name: "titan-21", role: "jetson ai workload", hardware: "jetson xavier", status: "ready" }, { name: "titan-22", role: "gpu mini-pc (jellyfin)", hardware: "mini pc", status: "ready" }, ], }, ], specialty: [ { name: "titan-db", alias: "atlas-db", role: "control-plane database (postgres)", hardware: "rpi5", status: "active" }, { name: "titan-23", alias: "oceanus", role: "SUI validator (baremetal)", status: "active", hardware: "epyc-24c" }, { name: "titan-24", alias: "tethys", role: "bridge node + scraper for oceanus metrics", status: "active", hardware: "ryzen-3900x" }, { name: "titan-jh", alias: "theia", role: "bastion / KVM landing / lesavka", status: "active", hardware: "rpi5" }, ], }; } export function fallbackServices() { return { services: [ { name: "Nextcloud Hub", category: "productivity", summary: "Core user hub: storage, office, bstein.dev mail, & more apps.", link: "https://cloud.bstein.dev", }, { name: "Jellyfin", category: "media", summary: "Family Movies hosted on titan-22 for GPU acceleration.", link: "https://stream.bstein.dev", }, { name: "VaultWarden", category: "security", summary: "Open Source & private password manager.", link: "https://vault.bstein.dev", }, { name: "Keycloak", category: "identity", summary: "Unified accounts for Single Sign-On.", link: "https://sso.bstein.dev", }, { name: "Gitea", category: "dev", summary: "Source control for dev projects.", link: "https://scm.bstein.dev", }, { name: "Jenkins", category: "dev", summary: "Continuous integration build pipelines.", link: "https://ci.bstein.dev", }, { name: "Harbor", category: "dev", summary: "Artifact Registry for build artifacts.", link: "https://registry.bstein.dev", }, { name: "Flux", category: "dev", summary: "GitOps UI for flux continuous deployment drift prevention.", link: "https://cd.bstein.dev", }, { name: "Vault", category: "dev", summary: "Secrets for secure environment injection.", link: "https://secret.bstein.dev", }, { name: "Grafana", category: "observability", summary: "Health metrics for atlas and eventually oceanus.", link: "https://metrics.bstein.dev", }, { name: "Pegasus", category: "media ingest", summary: "Uploading service to inject jellyfin media.", link: "https://pegasus.bstein.dev", }, { name: "Monero", category: "crypto", summary: "Private monero node for monero wallets", link: "/monero", host: "monerod.crypto.svc.cluster.local:18081", }, { name: "Jitsi", category: "conferencing", summary: "Video Conferencing - Planned", link: "https://meet.bstein.dev", status: "degraded", }, { name: "AI Chat", category: "ai", summary: "LLM chat (public beta)", link: "/ai/chat", host: "chat.ai.bstein.dev", status: "live", }, { name: "AI Image", category: "ai", summary: "Visualization tool - Planned", link: "/ai/roadmap", host: "draw.ai.bstein.dev", status: "planned", }, { name: "AI Speech", category: "ai", summary: "Live Translation - Planned", link: "/ai/roadmap", host: "talk.ai.bstein.dev", status: "planned", }, ], }; } export function fallbackNetwork() { return { ingress: [ { name: "dns_and_tls", path: "DNS -> Traefik -> oauth2-proxy -> service", notes: "TLS via cert-manager; Keycloak on the edge.", }, { name: "media", path: "media.bstein.dev -> Traefik -> Pegasus -> Longhorn PVC -> Jellyfin", notes: "Uploads and playback with storage on Longhorn.", }, { name: "registry", path: "registry.bstein.dev -> Traefik -> Harbor -> FluxCD pull", notes: "Harbor issues signed images for GitOps.", }, ], egress: [ { name: "ci_to_registry", path: "Gitea webhook -> Jenkins -> Harbor push", notes: "Builds signed before promotion.", }, { name: "metrics", path: "Atlas scraping -> Prometheus -> Grafana -> metrics.bstein.dev", notes: "titan-24 scrapes oceanus (titan-23).", }, ], ingress_gateway: "Traefik with oauth2-proxy and Keycloak; Longhorn backs stateful ingress targets.", }; } export function fallbackMetrics() { return { dashboard: "https://metrics.bstein.dev", description: "Atlas + Oceanus metrics.", }; } export function buildHardwareDiagram(data) { return ` flowchart TB subgraph TitanLab["Titan Lab (25 nodes)"] subgraph Atlas["Atlas (k3s cluster)"] subgraph CP["Control plane (rpi5)"] titan0a["titan-0a
rpi5 4c/8g"] titan0b["titan-0b
rpi5 4c/8g"] titan0c["titan-0c
rpi5 4c/8g"] end subgraph Pi5["Workers (rpi5)"] titan04["titan-04"] titan05["titan-05"] titan06["titan-06"] titan07["titan-07"] titan08["titan-08"] titan09["titan-09"] titan10["titan-10"] titan11["titan-11"] end subgraph Storage["Storage workers (rpi4 + disks)"] titan12["titan-12
8TB astreae + 12TB asteria"] titan13["titan-13
8TB astreae + 12TB asteria"] titan14["titan-14
8TB astreae + 12TB asteria"] titan15["titan-15
8TB astreae + 12TB asteria"] titan16["titan-16
offline"]:::down titan17["titan-17"] titan18["titan-18"] titan19["titan-19"] end subgraph Accel["Accelerators + heavy nodes"] titan20["titan-20
Jetson Xavier 6c/16g"] titan21["titan-21
Jetson Xavier 6c/16g"] titan22["titan-22
10c/32g
GPU streaming"] titan24["titan-24 (tethys)
12c/64g
bridge + metrics"] end longhorn["Longhorn
astreae: 4x8TB
asteria: 4x12TB"] traefik["Traefik ingress"] keycloak["Keycloak SSO"] services["Services
cloud / stream / ci / registry / cd / secret"] keycloak --> traefik traefik --> services services --> longhorn longhorn --> Storage end subgraph Dedicated["Dedicated hosts (outside Atlas)"] titanDb["titan-db
Postgres for HA control plane
rpi5 4c/8g"] theia["titan-jh (theia)
bastion
rpi5 4c/8g"] oceanus["titan-23 (oceanus)
SUI validator
24c/256g
2.5GbE"] end titanDb -->|DB| titan0a theia -->|ssh| titan0a oceanus -->|metrics| titan24 end classDef down fill:#311023,stroke:#ff4f93,color:#fff,stroke-width:2px; `; } export function buildNetworkDiagram() { return ` sequenceDiagram participant U as User participant DNS as DNS (*.bstein.dev) participant T as Traefik (Atlas) participant A as auth.bstein.dev (oauth2-proxy) participant K as sso.bstein.dev (Keycloak) participant S as Service (cloud/stream/ci/registry/cd/secret) participant L as Longhorn PVC U->>DNS: resolve host DNS-->>U: Traefik VIP U->>T: HTTPS request T->>A: forwardAuth A->>K: OIDC login/refresh K-->>A: token A-->>T: allow T->>S: route to service S-->>L: persistent storage operations S-->>U: response / stream / artifact `; } export function buildPipelineDiagram() { return ` flowchart LR dev[Developer] -->|push| gitea[scm.bstein.dev] gitea -->|webhook| jenkins[ci.bstein.dev] jenkins -->|build + push| harbor[registry.bstein.dev] harbor -->|image update| flux[cd.bstein.dev] flux -->|reconcile| atlas[Atlas] atlas -->|deploy| svc[cloud / stream / secret / other apps] keycloak[sso.bstein.dev] --> gitea keycloak --> jenkins keycloak --> harbor keycloak --> flux `; }