SPB Git forge
2commits 1branches 0releases
492.0 KBsize
maindefault branch
2 h agolast push
TypeScript 96.1% CSS 3.1% JavaScript 0.8%
8.0 KB · 86 lines typescript
Raw Blame History
1export interface ClusterNode {2  id: string;3  name: string;4  hostname: string;5  tailscaleName: string;6  tailscaleIp: string;7  /** LAN address (192.168.2.0/24) for direct node-to-node traffic; empty when Tailscale-only. */8  lanIp?: string;9  chip: string;10  modelName: string;11  cpuCores: number;12  memoryGB: number;13  gpuCores: number;14  tier: "ultra" | "max" | "pro" | "base";15  generation: string;16  role: "compute" | "worker";17}1819export const CLUSTER_NODES: ClusterNode[] = [20  { id: "M3U96a", name: "M3U96a", hostname: "M3U96a.maclustr.io", tailscaleName: "macstudio-de-simon-pierre-5-1", tailscaleIp: "100.114.37.21",  lanIp: "192.168.2.166", chip: "M3 Ultra", modelName: "Mac Studio",  cpuCores: 32, memoryGB: 96,  gpuCores: 80, tier: "ultra", generation: "m3", role: "compute" },21  { id: "M3U96b", name: "M3U96b", hostname: "M3U96b.maclustr.io", tailscaleName: "macstudio-de-simon-pierre-3",   tailscaleIp: "100.64.248.66",  lanIp: "192.168.2.125", chip: "M3 Ultra", modelName: "Mac Studio",  cpuCores: 32, memoryGB: 96,  gpuCores: 80, tier: "ultra", generation: "m3", role: "compute" },22  { id: "M2U64",  name: "M2U64",  hostname: "M2U64.maclustr.io",  tailscaleName: "macstudio-de-simon-pierre",     tailscaleIp: "100.86.37.40",                           chip: "M2 Ultra", modelName: "Mac Studio",  cpuCores: 24, memoryGB: 64,  gpuCores: 76, tier: "ultra", generation: "m2", role: "compute" },23  { id: "M4M64a", name: "M4M64a", hostname: "M4M64a.maclustr.io", tailscaleName: "macstudio-de-simon-pierre-6",   tailscaleIp: "100.67.55.114",  lanIp: "192.168.2.127", chip: "M4 Max",   modelName: "Mac Studio",  cpuCores: 16, memoryGB: 64,  gpuCores: 40, tier: "max",   generation: "m4", role: "worker"  },24  { id: "M4M64b", name: "M4M64b", hostname: "M4M64b.maclustr.io", tailscaleName: "macstudio-de-simon-pierre-8",   tailscaleIp: "100.96.144.88",  lanIp: "192.168.2.128", chip: "M4 Max",   modelName: "Mac Studio",  cpuCores: 16, memoryGB: 64,  gpuCores: 40, tier: "max",   generation: "m4", role: "worker"  },25  { id: "M4BP48", name: "M4BP48", hostname: "M4BP48.maclustr.io", tailscaleName: "simon-pierres-macbook-pro-2",    tailscaleIp: "100.66.205.22",   lanIp: "192.168.2.137", chip: "M4 Max",   modelName: "MacBook Pro", cpuCores: 16, memoryGB: 48,  gpuCores: 40, tier: "max",   generation: "m4", role: "worker"  },26  { id: "M4BP36", name: "M4BP36", hostname: "M4BP36.maclustr.io", tailscaleName: "simon-pierres-macbook-pro",     tailscaleIp: "100.125.194.59",   lanIp: "192.168.2.133", chip: "M4 Max",   modelName: "MacBook Pro", cpuCores: 14, memoryGB: 36,  gpuCores: 32, tier: "max",   generation: "m4", role: "worker"  },27  { id: "M4M36",  name: "M4M36",  hostname: "M4M36.maclustr.io",  tailscaleName: "macstudio-de-simon-pierre-3-1", tailscaleIp: "100.83.17.53",   lanIp: "192.168.2.131", chip: "M4 Max",   modelName: "Mac Studio",  cpuCores: 14, memoryGB: 36,  gpuCores: 40, tier: "max",   generation: "m4", role: "worker"  },28  { id: "M2M32",  name: "M2M32",  hostname: "M2M32.maclustr.io",  tailscaleName: "macstudio-de-simon-pierre-2-1", tailscaleIp: "100.117.121.45", lanIp: "192.168.2.129", chip: "M2 Max",   modelName: "Mac Studio",  cpuCores: 12, memoryGB: 32,  gpuCores: 38, tier: "max",   generation: "m2", role: "worker"  },29  { id: "M2M32b", name: "M2M32b", hostname: "M2M32b.maclustr.io", tailscaleName: "simon-pierres-mac-studio",      tailscaleIp: "100.111.100.56", lanIp: "192.168.2.130", chip: "M2 Max",   modelName: "Mac Studio",  cpuCores: 12, memoryGB: 32,  gpuCores: 38, tier: "max",   generation: "m2", role: "worker"  },30  { id: "M2M32c", name: "M2M32c", hostname: "M2M32c.maclustr.io", tailscaleName: "macstudio-de-simon-pierre-7",   tailscaleIp: "100.114.153.84",  lanIp: "192.168.2.126", chip: "M2 Max",   modelName: "Mac Studio",  cpuCores: 12, memoryGB: 32,  gpuCores: 30, tier: "max",   generation: "m2", role: "worker"  },31  { id: "m4mc",   name: "m4mc",   hostname: "m4mc.maclustr.io",   tailscaleName: "macmini-de-simon-pierre-3",     tailscaleIp: "100.119.234.78", lanIp: "192.168.2.134", chip: "M4 Pro",   modelName: "Mac mini",    cpuCores: 12, memoryGB: 24,  gpuCores: 16, tier: "pro",   generation: "m4", role: "worker"  },32  { id: "M1M32",  name: "M1M32",  hostname: "M1M32.maclustr.io",  tailscaleName: "macstudio-de-simon-pierre-4-1", tailscaleIp: "100.71.182.61",  lanIp: "192.168.2.132", chip: "M1 Max",   modelName: "Mac Studio",  cpuCores: 10, memoryGB: 32,  gpuCores: 32, tier: "max",   generation: "m1", role: "worker"  },33  { id: "m4ma",   name: "m4ma",   hostname: "m4ma.maclustr.io",   tailscaleName: "macmini-de-simon-pierre",       tailscaleIp: "100.79.44.76",   lanIp: "192.168.2.135", chip: "M4",       modelName: "Mac mini",    cpuCores: 10, memoryGB: 24,  gpuCores: 10, tier: "base",  generation: "m4", role: "worker"  },34  { id: "m4mb",   name: "m4mb",   hostname: "m4mb.maclustr.io",   tailscaleName: "macmini-de-simon-pierre-2",     tailscaleIp: "100.103.74.121", lanIp: "192.168.2.136", chip: "M4",       modelName: "Mac mini",    cpuCores: 10, memoryGB: 16,  gpuCores: 10, tier: "base",  generation: "m4", role: "worker"  },35  { id: "M3BA24", name: "M3BA24", hostname: "M3BA24.maclustr.io", tailscaleName: "macbookair-de-simon-pierre",     tailscaleIp: "100.81.73.64",   lanIp: "192.168.2.145", chip: "M3",       modelName: "MacBook Air", cpuCores: 8,  memoryGB: 24,  gpuCores: 10, tier: "base",  generation: "m3", role: "worker"  },36  { id: "m2m8a",  name: "m2m8a",  hostname: "m2m8a.maclustr.io",  tailscaleName: "mac-mini-de-simon-pierre-1",    tailscaleIp: "100.86.164.23",  lanIp: "192.168.2.167", chip: "M2",       modelName: "Mac mini",    cpuCores: 8,  memoryGB: 8,   gpuCores: 10, tier: "base",  generation: "m2", role: "worker"  },37  { id: "m2m16",  name: "m2m16",  hostname: "m2m16.maclustr.io",  tailscaleName: "macmini-de-simon-pierre-4",     tailscaleIp: "100.64.86.19",   lanIp: "192.168.2.169", chip: "M2 Pro",   modelName: "Mac mini",    cpuCores: 10, memoryGB: 16,  gpuCores: 16, tier: "pro",   generation: "m2", role: "worker"  },38  { id: "M3BA16", name: "M3BA16", hostname: "M3BA16.maclustr.io", tailscaleName: "macbookair-de-simon-pierre-1",  tailscaleIp: "100.104.125.79", lanIp: "192.168.2.143", chip: "M3",       modelName: "MacBook Air", cpuCores: 8,  memoryGB: 16,  gpuCores: 10, tier: "base",  generation: "m3", role: "worker"  },39  { id: "m2m8b",  name: "m2m8b",  hostname: "m2m8b.maclustr.io",  tailscaleName: "mac-mini-de-simon-pierre-2",    tailscaleIp: "100.101.248.32", lanIp: "192.168.2.170", chip: "M2",       modelName: "Mac mini",    cpuCores: 8,  memoryGB: 8,   gpuCores: 10, tier: "base",  generation: "m2", role: "worker"  },40];4142/** UGREEN NAS devices shared across the cluster over SMB (each mounted at ~/<mountSubdir> on every node). */43export interface NASConfig {44  id: string;45  name: string;46  model: string;47  os: string;48  host: string;49  user: string;50  share: string;51  volume: string;52  mountSubdir: string;53  webUrl: string;54}5556export const NAS_DEVICES: NASConfig[] = [57  {58    id: "nas-ugreen-1", name: "UGREEN DXP4800 Plus", model: "DXP4800 Plus", os: "UGOS Pro",59    host: "192.168.2.173", user: "maclustr-nas", share: "clustr", volume: "/volume1",60    mountSubdir: "nas_clustr", webUrl: "http://192.168.2.173:9999",61  },62  {63    id: "nas-ugreen-2", name: "UGREEN DH4300 Plus", model: "DH4300 Plus", os: "UGOS Pro",64    host: "192.168.2.175", user: "maclustr-nas-2", share: "clustr", volume: "/volume1",65    mountSubdir: "nas2_clustr", webUrl: "http://192.168.2.175:9999",66  },67];6869export const TOTAL_CORES = CLUSTER_NODES.reduce((a, n) => a + n.cpuCores, 0);70export const TOTAL_MEMORY = CLUSTER_NODES.reduce((a, n) => a + n.memoryGB, 0);71export const TOTAL_GPU = CLUSTER_NODES.reduce((a, n) => a + n.gpuCores, 0);7273export const TIER_COLORS: Record<string, string> = {74  ultra: "#a855f7",75  max: "#3b82f6",76  pro: "#14b8a6",77  base: "#22c55e",78};7980export const TIER_BG: Record<string, string> = {81  ultra: "bg-purple-500/20 text-purple-400 border-purple-500/30",82  max: "bg-blue-500/20 text-blue-400 border-blue-500/30",83  pro: "bg-teal-500/20 text-teal-400 border-teal-500/30",84  base: "bg-green-500/20 text-green-400 border-green-500/30",85};86