Skip to main content

Automated Kubernetes Platform Deployment

This guide walks you through deploying all AI/Run CodeMie application components onto a Kubernetes cluster using the helm-charts.sh script. The script handles component installation in the correct dependency order for AWS (EKS), GCP (GKE), and Azure (AKS).

Recommended Approach

Scripted deployment is recommended for standard installations as it automates component ordering, validates prerequisites, and ensures consistent configuration across all components.

Overview​

The helm-charts.sh script from the codemie-helm-charts repository automates the installation of:

  • Infrastructure services — Nginx Ingress Controller, cloud-specific Storage Class
  • Data layer — Elasticsearch
  • Security components — Keycloak Operator, Keycloak, OAuth2 Proxy
  • Messaging system — NATS, NATS Auth Callout
  • Core CodeMie services — API, UI, MCP Connect, Mermaid Server
  • Observability stack — Fluent Bit, Kibana, Kibana Dashboards

Prerequisites​

Verification Checklist​

  • Infrastructure Deployed: Completed Infrastructure Deployment phase
  • Cluster Access: kubectl configured for EKS cluster
  • Container Registry: Completed Container Registry Access setup (pull secret gcp-artifact-registry exists)
  • Helm Installed: Helm 3.16.0+
  • Repository Cloned: codemie-helm-charts available locally
  • Deployment Outputs: Have deployment_outputs.env from infrastructure deployment
  • Tools: kubectl, helm, gcloud CLI, aws CLI
Container Registry Access Required

The gcp-artifact-registry pull secret must exist before running the script. Complete Container Registry Access setup before proceeding.


Quick Start​

Step 1: Clone Repository​

git clone git@gitbud.epam.com:epm-cdme/codemie-helm-charts.git
cd codemie-helm-charts

Step 2: Configure Cloud-Specific Values​

Source the infrastructure outputs and update AWS-specific placeholders in the values files:

# Source the deployment outputs
source deployment_outputs.env

# Update CodeMie API values with AWS-specific configuration
sed -i "s/%%DOMAIN%%/${CODEMIE_DOMAIN_NAME}/g" codemie-api/values-aws.yaml
sed -i "s/%%AWS_DEFAULT_REGION%%/${AWS_DEFAULT_REGION}/g" codemie-api/values-aws.yaml
sed -i "s|%%EKS_AWS_ROLE_ARN%%|${EKS_AWS_ROLE_ARN}|g" codemie-api/values-aws.yaml
sed -i "s/%%AWS_KMS_KEY_ID%%/${AWS_KMS_KEY_ID}/g" codemie-api/values-aws.yaml
sed -i "s/%%AWS_S3_BUCKET_NAME%%/${AWS_S3_BUCKET_NAME}/g" codemie-api/values-aws.yaml
sed -i "s/%%AWS_S3_REGION%%/${AWS_S3_REGION}/g" codemie-api/values-aws.yaml

# Update domain in all remaining values-aws.yaml files
CODEMIE_DOMAIN_NAME="airun.example.com"
find . -name "values-aws.yaml" -exec sed -i "s/%%DOMAIN%%/${CODEMIE_DOMAIN_NAME}/g" {} \;
PlaceholderDescriptionSource
%%DOMAIN%%DNS zone namedeployment_outputs.env → CODEMIE_DOMAIN_NAME
%%AWS_DEFAULT_REGION%%AWS regiondeployment_outputs.env → AWS_DEFAULT_REGION
%%EKS_AWS_ROLE_ARN%%EKS IRSA role ARNdeployment_outputs.env → EKS_AWS_ROLE_ARN
%%AWS_KMS_KEY_ID%%KMS key IDdeployment_outputs.env → AWS_KMS_KEY_ID
%%AWS_S3_BUCKET_NAME%%S3 bucket namedeployment_outputs.env → AWS_S3_BUCKET_NAME
%%AWS_S3_REGION%%S3 bucket regiondeployment_outputs.env → AWS_S3_REGION

Step 3: Authenticate to Container Registry​

export GOOGLE_APPLICATION_CREDENTIALS=key.json

gcloud auth application-default print-access-token | \
helm registry login -u oauth2accesstoken --password-stdin europe-west3-docker.pkg.dev

Step 4: Get Latest CodeMie Version​

bash get-codemie-latest-release-version.sh -c key.json
# Note the version (e.g., 2.26.0) for the next step

Step 5: Configure Optional Components (If Required)​

ComponentDescription
litellmLiteLLM Proxy — unified LLM API, multi-model routing, cost tracking
pgadminPostgreSQL admin interface for database inspection
LiteLLM Configuration Required

If deploying with --optional litellm, complete the LiteLLM Proxy Installation and Configuration Guide before running the deployment script.

Skip this step if not deploying optional components.

Step 6: Run Deployment Script​

# Standard installation with all core components
bash helm-charts.sh --cloud aws --version <version> --mode all

# With LiteLLM proxy for multi-model routing
bash helm-charts.sh --cloud aws --version <version> --mode all --optional litellm

# With all optional components
bash helm-charts.sh --cloud aws --version <version> --mode all --optional litellm,pgadmin

# Cluster with existing Nginx Ingress (skip ingress installation)
bash helm-charts.sh --cloud aws --version <version> --mode recommended

# Update existing installation (core components only)
bash helm-charts.sh --cloud aws --version <version> --mode update

Replace <version> with the version obtained in Step 4 (e.g., 2.26.0).

Idempotent Script

The deployment script is idempotent — you can safely re-run it after a failure. Simply run it again with the same parameters to continue or retry.


Configuration Reference​

Script Parameters​

ParameterDescriptionRequiredValues
-h, --helpShow help messageNo—
-c, --cloudTarget cloud providerYesaws, gcp, azure
-v, --versionCodeMie component versionYese.g., 2.26.0
-m, --modeInstallation modeYesall, recommended, update
--optionalOptional componentsNolitellm, pgadmin (comma-separated)

Deployment Modes​

ModeComponents InstalledUse Case
allAll components including Nginx Ingress ControllerFresh cluster without existing ingress
recommendedAll components except Nginx Ingress ControllerCluster with existing ingress
updateOnly CodeMie core components (API, UI, MCP Connect, Mermaid)Updating an existing installation

GCP: Post-Deployment DNS Configuration​

For GCP clusters with public access, configure DNS records after LoadBalancers are provisioned:

Wildcard record for Nginx Ingress (covers all subdomains):

kubectl get service ingress-nginx-controller -n ingress-nginx \
-o jsonpath='{.status.loadBalancer.ingress[0].ip}'

Add an A record: *.airun.example.com → <nginx-ip>

NATS record for Plugin Engine:

kubectl get service codemie-nats -n codemie \
-o jsonpath='{.status.loadBalancer.ingress[0].ip}'

Add an A record: nats-codemie.airun.example.com → <nats-ip>


Next Steps​

After successful deployment, proceed to Accessing Applications to verify access and complete initial configuration.