#!/bin/bash # Deploy the full stack to Kubernetes (core, nearle, alaska, doormile, ingress) # Usage: ./shfiles/deploy.sh (run from the repo root, or anywhere - it cd's there itself) set -euo pipefail cd "$(dirname "$0")/.." echo "🚀 Deploying full stack..." # Check if kubectl is available if ! command -v kubectl &> /dev/null; then echo "❌ kubectl not found. Please install kubectl first." exit 1 fi # Check cluster connection echo "📡 Checking Kubernetes cluster connection..." kubectl cluster-info || { echo "❌ Cannot connect to Kubernetes cluster. Please configure kubectl." exit 1 } # Check node count NODE_COUNT=$(kubectl get nodes --no-headers | wc -l) echo "📊 Cluster has $NODE_COUNT node(s)" echo "" echo "===== Core stack (NATS workers) =====" bash shfiles/deploy-core-stack.sh echo "" echo "===== Nearle stack (jupiter, titan, fiesta, ariane, atlantis) =====" bash shfiles/deploy-nearle-stack.sh echo "" echo "===== Alaska stack (deliveries gateway + dashboard) =====" bash shfiles/deploy-alaska.sh echo "" echo "===== Doormile stack =====" bash shfiles/deploy-doormile.sh echo "" echo "===== Ingress & Traefik middlewares =====" bash shfiles/deploy-ingress.sh echo "" echo "✅ Full deployment complete!" echo "" echo "📋 Check status:" echo " bash shfiles/check-k8s-status.sh" echo ""