Phase 4: Update k3s/ + k8s/ for embedded OSIS architecture #49
Labels
No labels
meeting-notes
meeting-sensitive
meeting-transcript
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coopcloud_code/home#49
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Update the existing
k3s/andk8s/directories inprojectmycelium_marketplace_deployto match the current v2.0.0 architecture (embedded OSIS, no external containers) and align with the freezone k3s-v2 production pattern.Reference:
znzfreezone_deploy/k3s-v2/+znzfreezone_deploy/k8s/(production-proven, 5-node HA).Current state
The marketplace already has
k3s/andk8s/directories but they're outdated — written before the embedded OSIS migration:k8s/base/ — what's wrong
hero-osis.yamlmarketplace.yamlAPP_BACKEND=hero,HERO_OSIS_URL— should beAPP_BACKEND=localwith no external depsmarketplace.yaml/app/datafrontend-deployment.yaml— SPA frontend (nginx + WASM)frontend-service.yamladmin-deployment.yaml— admin dashboardadmin-service.yamlbackend-pvc.yaml— PersistentVolumeClaim for OSIS databackend-service.yaml— separate from deploymentkustomization.yamlk8s/overlays/ — what's wrong
prod/kustomization.yamldev/kustomization.yamlprod-ha/kustomization.yaml— freezone-style HA overlay (2 replicas, Kadalu RWX, anti-affinity)k3s/ — what's wrong
tf/main.tfscripts/setup-cluster.sh— K3s HA bootstrap (join 3 servers)scripts/setup-velero.sh— backup setupscripts/restore-data.sh— disaster recoveryscripts/migrate.sh— data migration from single-VMTasks
k8s/base/ — rewrite for v2.0.0 architecture
hero-osis.yaml(no longer needed)marketplace.yaml→backend-deployment.yaml:projectmycelium_marketplace:TAGGET /api/health(liveness 10s),GET /api/ready(readiness 5s)/app/datafrom PVCbackend-pvc.yaml— 10Gi RWO (base), overridden to RWX + Kadalu in prod-habackend-service.yaml— port 8000frontend-deployment.yaml+frontend-service.yaml— nginx + WASM SPA, port 80admin-deployment.yaml+admin-service.yaml— admin proxy, port 9000, MARKETPLACE_RPC_URL envingress.yaml— 3 hosts (app, admin, API), TFGrid gateway handles TLSkustomization.yaml— new file list, configMapGenerator for brandingk8s/prod-ha/ — new overlay (freezone pattern)
prod-ha/kustomization.yaml:images:block (SSOT for versions)imagePullSecretsk3s/tf/ — 5-node HA
main.tf— 3 servers (etcd quorum) + 2 agents + 3 gatewaysk3s-v2/tf/main.tfpatternoutputs.tf— server_ips, agent_ips, server_mycelium, agent_mycelium, URLsvariables.tf— server_node_ids (3), agent_node_ids (2), gateway_nodes (3+)k3s/scripts/ — add missing scripts
setup-cluster.sh— bootstrap 3-server HA K3s (join servers 2+3 to server 1)setup-server.sh— install K3s with--cluster-initon first serversetup-agent.sh— join agents to HA clustersetup-storage.sh— Kadalu GlusterFS Replica3 on 3 serverssetup-velero.sh— Velero + MinIO for in-cluster backupsrestore-data.sh— restore from Velero backupmigrate.sh— migrate data from single-VM Docker volume to K3s PVCdeploy-app.sh—kubectl apply -k k8s/prod-ha/k3s/Makefile — end-to-end automation
make all ENV=proddoes infra → cluster → storage → deploy → testmake migrate ENV=prodfor single-VM → K3s migrationFailure tolerance targets
Architecture
Directory structure (target)
Acceptance criteria
make all ENV=prodprovisions 5 VMs, bootstraps K3s HA, deploys appSigned-off-by: mik-tf
All 22 tasks complete
Commit: ea623ad on projectmycelium_marketplace_deploy development branch.
k8s/base/ (tasks 4.1-4.8)
k8s/prod-ha/ (task 4.9)
k3s/tf/ (tasks 4.10-4.12)
k3s/scripts/ (tasks 4.13-4.20)
k3s/Makefile (tasks 4.21-4.22)
Ready to provision when TFGrid node IDs are available.
— mik-tf