2025-12-18 01:13:04 -03:00
|
|
|
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: [
|
2026-01-01 12:04:25 -03:00
|
|
|
{
|
|
|
|
|
name: "Keycloak",
|
|
|
|
|
category: "identity",
|
2026-01-01 13:04:07 -03:00
|
|
|
summary: "Unified accounts for Single Sign-On. OIDC & LDAP",
|
2026-01-01 12:04:25 -03:00
|
|
|
link: "https://sso.bstein.dev",
|
|
|
|
|
},
|
2025-12-18 01:13:04 -03:00
|
|
|
{
|
2026-01-01 13:04:07 -03:00
|
|
|
name: "Nextcloud",
|
2025-12-18 01:13:04 -03:00
|
|
|
category: "productivity",
|
2026-01-01 13:04:07 -03:00
|
|
|
summary: "Storage, office, and mail apps for bstein.dev users.",
|
2025-12-18 01:13:04 -03:00
|
|
|
link: "https://cloud.bstein.dev",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "VaultWarden",
|
|
|
|
|
category: "security",
|
|
|
|
|
summary: "Open Source & private password manager.",
|
|
|
|
|
link: "https://vault.bstein.dev",
|
|
|
|
|
},
|
|
|
|
|
{
|
2026-01-01 12:04:25 -03:00
|
|
|
name: "AI Chat",
|
|
|
|
|
category: "ai",
|
2026-01-01 13:04:07 -03:00
|
|
|
summary: "Customized LLM for the titan home lab.",
|
2026-01-01 12:04:25 -03:00
|
|
|
link: "/ai/chat",
|
|
|
|
|
host: "chat.ai.bstein.dev",
|
|
|
|
|
status: "live",
|
2025-12-18 01:13:04 -03:00
|
|
|
},
|
|
|
|
|
{
|
2026-01-01 12:04:25 -03:00
|
|
|
name: "Jellyfin",
|
2026-01-01 13:04:07 -03:00
|
|
|
category: "streaming",
|
|
|
|
|
summary: "Family movies streaming server with GPU acceleration.",
|
2026-01-01 12:04:25 -03:00
|
|
|
link: "https://stream.bstein.dev",
|
2025-12-18 01:13:04 -03:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Pegasus",
|
2026-01-01 13:04:07 -03:00
|
|
|
category: "streaming",
|
|
|
|
|
summary: "Upload pipeline feeding the Jellyfin library.",
|
2025-12-18 01:13:04 -03:00
|
|
|
link: "https://pegasus.bstein.dev",
|
|
|
|
|
},
|
|
|
|
|
{
|
2026-01-01 13:04:07 -03:00
|
|
|
name: "Mailu",
|
|
|
|
|
category: "mail",
|
|
|
|
|
summary: "Self-hosted mailserver with accepted outgoing mail.",
|
|
|
|
|
link: "https://mail.bstein.dev",
|
|
|
|
|
host: "mail.bstein.dev",
|
2025-12-18 01:13:04 -03:00
|
|
|
},
|
|
|
|
|
{
|
2026-01-01 12:04:25 -03:00
|
|
|
name: "Grafana",
|
|
|
|
|
category: "observability",
|
2026-01-01 13:04:07 -03:00
|
|
|
summary: "Atlas metrics and dashboards for the lab.",
|
2026-01-01 12:04:25 -03:00
|
|
|
link: "https://metrics.bstein.dev",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Element",
|
2026-01-01 11:32:42 -03:00
|
|
|
category: "comms",
|
2026-01-01 13:04:07 -03:00
|
|
|
summary: "Discord style communication system for users.",
|
2026-01-01 12:04:25 -03:00
|
|
|
link: "https://live.bstein.dev",
|
|
|
|
|
host: "live.bstein.dev",
|
2026-01-01 11:32:42 -03:00
|
|
|
status: "live",
|
|
|
|
|
},
|
|
|
|
|
{
|
2026-01-01 12:04:25 -03:00
|
|
|
name: "Matrix (Synapse)",
|
2026-01-01 11:32:42 -03:00
|
|
|
category: "comms",
|
2026-01-01 13:04:07 -03:00
|
|
|
summary: "Encrypted chat backend with bot integrations.",
|
2026-01-01 12:04:25 -03:00
|
|
|
link: "https://live.bstein.dev",
|
|
|
|
|
host: "matrix.live.bstein.dev",
|
2026-01-01 11:32:42 -03:00
|
|
|
status: "live",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "LiveKit",
|
|
|
|
|
category: "comms",
|
2026-01-01 13:04:07 -03:00
|
|
|
summary: "Video and Voice SFU calls integrated into Element.",
|
2026-01-01 12:04:25 -03:00
|
|
|
link: "https://live.bstein.dev",
|
|
|
|
|
host: "kit.live.bstein.dev",
|
2026-01-01 11:32:42 -03:00
|
|
|
status: "live",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Coturn",
|
|
|
|
|
category: "comms",
|
2026-01-01 13:04:07 -03:00
|
|
|
summary: "Integrated VoIP server for reliable calls.",
|
2026-01-01 12:04:25 -03:00
|
|
|
link: "https://live.bstein.dev",
|
|
|
|
|
host: "turn.live.bstein.dev",
|
2025-12-22 16:52:25 -03:00
|
|
|
status: "live",
|
|
|
|
|
},
|
|
|
|
|
{
|
2026-01-01 12:04:25 -03:00
|
|
|
name: "Gitea",
|
|
|
|
|
category: "dev",
|
|
|
|
|
summary: "Source control for dev projects.",
|
|
|
|
|
link: "https://scm.bstein.dev",
|
2025-12-22 16:52:25 -03:00
|
|
|
},
|
|
|
|
|
{
|
2026-01-01 12:04:25 -03:00
|
|
|
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",
|
|
|
|
|
},
|
2026-01-01 13:04:07 -03:00
|
|
|
{
|
|
|
|
|
name: "Monero",
|
|
|
|
|
category: "crypto",
|
|
|
|
|
summary: "Private monero node for monero wallets.",
|
|
|
|
|
link: "/monero",
|
|
|
|
|
host: "monerod.crypto.svc.cluster.local:18081",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Oceanus",
|
|
|
|
|
category: "crypto",
|
|
|
|
|
summary: "Dedicated SUI Validator - Planned.",
|
|
|
|
|
link: "#",
|
|
|
|
|
host: "oceanus",
|
|
|
|
|
status: "planned",
|
|
|
|
|
},
|
2026-01-01 12:04:25 -03:00
|
|
|
{
|
|
|
|
|
name: "AI Vision",
|
2025-12-22 16:52:25 -03:00
|
|
|
category: "ai",
|
|
|
|
|
summary: "Visualization tool - Planned",
|
|
|
|
|
link: "/ai/roadmap",
|
2026-01-01 12:04:25 -03:00
|
|
|
host: "vision.ai.bstein.dev",
|
2025-12-22 16:52:25 -03:00
|
|
|
status: "planned",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "AI Speech",
|
|
|
|
|
category: "ai",
|
|
|
|
|
summary: "Live Translation - Planned",
|
|
|
|
|
link: "/ai/roadmap",
|
|
|
|
|
host: "talk.ai.bstein.dev",
|
|
|
|
|
status: "planned",
|
|
|
|
|
},
|
2026-01-01 12:04:25 -03:00
|
|
|
{
|
2026-01-01 13:04:07 -03:00
|
|
|
name: "AI Translation",
|
|
|
|
|
category: "ai",
|
|
|
|
|
summary: "Inline translation (roadmap) for comms.",
|
|
|
|
|
link: "/ai/roadmap",
|
|
|
|
|
host: "translate.ai.bstein.dev",
|
2026-01-01 12:04:25 -03:00
|
|
|
status: "planned",
|
|
|
|
|
},
|
2025-12-18 01:13:04 -03:00
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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<br/>rpi5 4c/8g"]
|
|
|
|
|
titan0b["titan-0b<br/>rpi5 4c/8g"]
|
|
|
|
|
titan0c["titan-0c<br/>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<br/>8TB astreae + 12TB asteria"]
|
|
|
|
|
titan13["titan-13<br/>8TB astreae + 12TB asteria"]
|
|
|
|
|
titan14["titan-14<br/>8TB astreae + 12TB asteria"]
|
|
|
|
|
titan15["titan-15<br/>8TB astreae + 12TB asteria"]
|
|
|
|
|
titan16["titan-16<br/>offline"]:::down
|
|
|
|
|
titan17["titan-17"]
|
|
|
|
|
titan18["titan-18"]
|
|
|
|
|
titan19["titan-19"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
subgraph Accel["Accelerators + heavy nodes"]
|
|
|
|
|
titan20["titan-20<br/>Jetson Xavier 6c/16g"]
|
|
|
|
|
titan21["titan-21<br/>Jetson Xavier 6c/16g"]
|
|
|
|
|
titan22["titan-22<br/>10c/32g<br/>GPU streaming"]
|
|
|
|
|
titan24["titan-24 (tethys)<br/>12c/64g<br/>bridge + metrics"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
longhorn["Longhorn<br/>astreae: 4x8TB<br/>asteria: 4x12TB"]
|
|
|
|
|
traefik["Traefik ingress"]
|
|
|
|
|
keycloak["Keycloak SSO"]
|
|
|
|
|
services["Services<br/>cloud / stream / ci / registry / cd / secret"]
|
|
|
|
|
|
|
|
|
|
keycloak --> traefik
|
|
|
|
|
traefik --> services
|
|
|
|
|
services --> longhorn
|
|
|
|
|
longhorn --> Storage
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
subgraph Dedicated["Dedicated hosts (outside Atlas)"]
|
|
|
|
|
titanDb["titan-db<br/>Postgres for HA control plane<br/>rpi5 4c/8g"]
|
|
|
|
|
theia["titan-jh (theia)<br/>bastion<br/>rpi5 4c/8g"]
|
|
|
|
|
oceanus["titan-23 (oceanus)<br/>SUI validator<br/>24c/256g<br/>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
|
|
|
|
|
`;
|
|
|
|
|
}
|