learning_ai_common_plat/docs/devops/single_azure_vm
saravanakumardb1 32522b218a fix(k8s): setup-k8s.sh — fail phase 3 on build errors, fix non-root crash
- Phase 3 now exits with error if any image builds fail, preventing
  mark_phase_done from running. Previously it just warned and continued,
  which could lead to phase 5 deploying with missing images.
- Moved mkdir from top-level scope into mark_phase_done(). The old
  top-level mkdir -p /opt/bytelyst/.setup-state-k8s crashed non-root
  invocations (--status, --help) due to set -e + permission denied.
- Fixed header comment: 'containerd' → 'Docker runtime' (we use --docker).
- Added --resume to header usage block (was supported but undocumented).
2026-03-24 14:52:53 -07:00
..
docker refactor(infra): reorganize single_azure_vm into docker/ and k8s/ subfolders 2026-03-24 14:11:50 -07:00
k8s fix(k8s): setup-k8s.sh — fail phase 3 on build errors, fix non-root crash 2026-03-24 14:52:53 -07:00
README.md refactor(infra): reorganize single_azure_vm into docker/ and k8s/ subfolders 2026-03-24 14:11:50 -07:00

ByteLyst Single-VM Deployment

Deploy the entire ByteLyst ecosystem (30 services, 10 products) on a single Azure VM. Two orchestration approaches — pick one or learn both side by side.


Approaches

docker/ — Docker Compose (Production-ready)

Proven, battle-tested deployment using docker-compose.ecosystem.yml. Installs everything from scratch on a raw Ubuntu VM in ~20 minutes.

sudo ./docker/setup.sh              # Full install
sudo ./docker/setup.sh --resume     # Resume after disconnect
/opt/bytelyst/check-health.sh       # Verify all 30 services

Use this if: You want reliable deployment now.

k8s/ — Kubernetes via k3s (Learning / Future-ready)

Same 30 services orchestrated by Kubernetes on a single VM using k3s. Builds on the same Docker images — no Dockerfile changes needed.

Use this if: You want to learn K8s with real services, practice kubectl, and prepare for multi-node scaling later.


Architecture (shared by both approaches)

Raw Ubuntu 24.04 VM (Standard_D8s_v5: 8 vCPU, 32 GB RAM)
├── Ollama (systemd, :11434) ─── local LLM inference
├── Gitea (Docker/:3300) ──────── npm package registry
└── 30 Services
    ├── Infrastructure (6): cosmos-emulator, azurite, mailpit, loki, grafana, traefik
    ├── Platform (3): platform-service, extraction-service, mcp-server
    ├── Dashboards (2): admin-web, tracker-web
    ├── Backends (10): peakpulse, chronomind, jarvisjr, nomgap, mindlyst,
    │                   lysnrai, notelett, flowmonk, actiontrail, localmemgpt
    └── Web Apps (9): lysnrai-dashboard, chronomind-web, jarvisjr-web, flowmonk-web,
                      notelett-web, mindlyst-web, nomgap-web, actiontrail-web, localmemgpt-web

Comparison

Docker Compose K8s (k3s)
Setup time ~20 min ~30 min
RAM overhead ~100 MB ~600 MB
Config files 1 compose + 1 .env ~30 manifests (or Helm)
Scaling Manual kubectl scale / HPA
Rolling updates Restart-based Zero-downtime
Resource limits Basic Fine-grained per pod
Multi-VM ready Docker Swarm Native kubectl join
Learning value Low High (transferable to AKS/EKS/GKE)