Saltar al contenido principal

Cluster Deployment Runbook

This runbook covers the deployment of the AlphaSwarm Scholar platform to Kubernetes clusters, including local development clusters and remote production-like environments.

Prerequisites

  • Access to a Kubernetes cluster (v1.24+).
  • kubectl configured with appropriate context.
  • Docker installed (for local builds).
  • Helm v3+ (optional, for some components).
  • AlphaSwarm CLI installed.

Quick Start: Remote Cluster Deployment

To deploy to a remote cluster (e.g., 192.168.12.112), follow these steps:

1. Configure Cluster Access

Ensure your kubeconfig is set up correctly. Use the provided helper script if needed:

./setup-cluster-access.sh

2. Run the Deployment Script

Execute the deployment script on the target machine or from a workstation with access:

./deploy-on-cluster.sh

This script will:

  • Verify Kubernetes access.
  • Create the alphaswarm-scholar namespace.
  • Deploy core databases: PostgreSQL, Redis, Neo4j.
  • Deploy AlphaSwarm services: API, Worker, Ingester, UI.

Local Cluster Deployment (Development)

For local development using k3d, minikube, or Docker Desktop:

1. Start Local Cluster

./deploy-to-local-cluster.sh --init

2. Deploy AlphaSwarm Stack

./deploy-to-local-cluster.sh --deploy

3. Verify Deployment

kubectl get pods -n alphaswarm-scholar

Configuration

Environment Variables

Key variables to configure in your deployment overlay or .env file:

  • ALPHASWARM_ENV: production, staging, or development.
  • ALPHASWARM_API_BASE: External URL of the API.
  • DATABASE_URL: Connection string for PostgreSQL.
  • NEO4J_URI: Connection string for Neo4j.

Cloudflare Tunnel Setup

If exposing the cluster via Cloudflare:

./setup-cloudflare-tunnel.sh

Post-Deployment Checklist

  • Verify all pods are in Running state.
  • Check API health: curl https://api.your-domain.com/readyz.
  • Log in to the UI and verify connectivity.
  • Configure monitoring and alerts (Loki/Grafana).
  • Verify database backups are scheduled.

Further Documentation