Design from F/multi-system-install-cluster-mode branch, preserved before that branch closes.
Summary
Add three installation modes to install.sh: Start Cluster, Join Cluster, and Standalone. Re-runnable so any node can change its role later.
Core concept: CLUSTER_ROLE in .env
CLUSTER_ROLE=standalone|seed|member
CLUSTER_NAME=ai-cluster
CLUSTER_ID= # generated once per seed
- standalone: current behavior (default)
- seed: first node — originates cluster, hosts node registry
- member: joins existing cluster
Discovery
Seed nodes pull a marker model ai-stack-cluster:latest (~1MB). Joiners scan LAN port 11434 for this model — no extra infrastructure.
Files to change
install.sh — mode selection menu, scan/join/seed-init functions
.env.example — add CLUSTER_ROLE, CLUSTER_NAME, CLUSTER_ID (commented)
scripts/change-cluster-role.sh (new)
scripts/discover-network.sh — export scan_lan_ollama() as library
Notes
Design from
F/multi-system-install-cluster-modebranch, preserved before that branch closes.Summary
Add three installation modes to
install.sh: Start Cluster, Join Cluster, and Standalone. Re-runnable so any node can change its role later.Core concept:
CLUSTER_ROLEin.envCLUSTER_ROLE=standalone|seed|member
CLUSTER_NAME=ai-cluster
CLUSTER_ID= # generated once per seed
Discovery
Seed nodes pull a marker model
ai-stack-cluster:latest(~1MB). Joiners scan LAN port 11434 for this model — no extra infrastructure.Files to change
install.sh— mode selection menu, scan/join/seed-init functions.env.example— add CLUSTER_ROLE, CLUSTER_NAME, CLUSTER_ID (commented)scripts/change-cluster-role.sh(new)scripts/discover-network.sh— export scan_lan_ollama() as libraryNotes