ilum-mageai

by Ilum

Helm chartv0.2.12App 0.9.76Verified publisher

A Helm chart for Mage by Ilum

About this chart

ilum-mageai packaged by ilum

TL;DR

$ helm repo add ilum https://charts.ilum.cloud
$ helm install ilum-mageai ilum/ilum-mageai

Introduction

This chart deploys Mage on a Kubernetes cluster using the Helm package manager. Mage is a modern replacement for Airflow that provides a comprehensive platform for building, running, and managing data pipelines with an intuitive interface.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure (if persistence is enabled)

Installing the Chart

To install the chart with the release name ilum-mageai:

$ helm install ilum-mageai ilum/ilum-mageai

The command deploys Mage AI on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the ilum-mageai deployment:

$ helm delete ilum-mageai

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration and Installation Details

Deployment Modes

The chart supports two deployment modes:

  1. Standalone Mode (default): Single deployment with combined web server and scheduler
  2. Standalone Scheduler Mode: Separate deployments for web server and scheduler for better scalability

To enable standalone scheduler mode:

standaloneScheduler: true

Database Configuration

Mage AI can be configured with PostgreSQL as the backend database:

postgresql:
  enabled: true # Enables PostgreSQL support in Mage
  deploy: true # Deploy PostgreSQL instance
  auth:
    username: mage_user
    password: mage_password
    database: mage_db

Read more at the site of the PostgreSQL subchart: PostgreSQL Helm Chart

Redis Configuration

For multi-replica deployments, Redis can be enabled for caching and task queuing:

redis:
  enabled: true
  architecture: standalone
  auth:
    enabled: false

Read more at the site of the Redis subchart: Redis Helm Chart

Persistence

By default, the chart creates a PersistentVolumeClaim for storing Mage AI projects and data:

persistence:
  enabled: true
  storageClassName: ""
  size: 5Gi

Custom Configuration

Environment variables can be passed to Mage AI using the config and secrets sections:

config:
  MAGE_DATABASE_CONNECTION_URL: "postgresql://user:password@host:port/database"

secrets:
  SECRET_KEY: "your-secret-key"

Parameters

Global parameters

NameDescriptionValue
replicaCountNumber of Mage AI replicas1
standaloneSchedulerEnable standalone scheduler deployment modefalse
rootPathRoot path of the server (e.g., "mage" for http://localhost:6789/mage)""

Scheduler parameters

NameDescriptionValue
scheduler.replicaCountNumber of scheduler replicas1
scheduler.nameName for scheduler deploymentmageai-scheduler
scheduler.resourcesResource limits and requests for scheduler{}

Web Server parameters

NameDescriptionValue
webServer.replicaCountNumber of web server replicas1
webServer.nameName for web server deploymentmageai-webserver
webServer.resourcesResource limits and requests for web server{}

PostgreSQL parameters

NameDescriptionValue
postgresql.enabledEnable PostgreSQL support in Magefalse
postgresql.deployDeploy PostgreSQL instancefalse
postgresql.fullnameOverrideOverride PostgreSQL fullnamepostgresql-service
postgresql.auth.usernamePostgreSQL usernameyour_username
postgresql.auth.passwordPostgreSQL passwordyour_password
postgresql.auth.databasePostgreSQL database nameyour_database

Redis parameters

NameDescriptionValue
redis.enabledEnable Redis subchartfalse
redis.architectureRedis architecturestandalone
redis.auth.enabledEnable Redis authenticationfalse
redis.customRedisURLCustom Redis URL (make sure redis.enabled is false)""

Image parameters

NameDescriptionValue
image.repositoryMage AI image repositorymageai/mageai
image.pullPolicyImage pull policy (Always, IfNotPresent, Never)Always
image.tagImage tag (overrides the chart appVersion)""
imagePullSecretsList of image pull secrets for private registries[]

Init Container Images

NameDescriptionValue
initContainerImages.alpineAlpine image for Redis readiness checkalpine
initContainerImages.busyboxBusyBox image for PostgreSQL readiness checkbusybox

Common parameters

NameDescriptionValue
nameOverrideString to partially override mageai.fullnamemageai
fullnameOverrideString to fully override mageai.fullnamemageai

Service Account parameters

NameDescriptionValue
serviceAccount.createSpecifies whether a service account should be createdtrue
serviceAccount.annotationsAnnotations to add to the service account{}
serviceAccount.nameThe name of the service account to usemageai

Pod parameters

NameDescriptionValue
podAnnotationsAnnotations for Mage AI pods{}
podLabelsExtra labels for Mage AI pods{}
podSecurityContextSecurity context for the Mage AI pod(s){}
securityContextSecurity context for the Mage AI container(s){}

Service parameters

NameDescriptionValue
service.typeKubernetes service typeLoadBalancer
service.portService port6789
service.annotationsService annotations{}

Probe parameters

NameDescriptionValue
livenessProbe.enabledEnable liveness probetrue
livenessProbe.pathLiveness probe HTTP path/api/status
livenessProbe.portLiveness probe porthttp
livenessProbe.initialDelaySecondsInitial delay seconds for liveness probe5
livenessProbe.timeoutSecondsTimeout seconds for liveness probe10
readinessProbe.enabledEnable readiness probetrue
readinessProbe.pathReadiness probe HTTP path/api/status
readinessProbe.portReadiness probe porthttp
readinessProbe.initialDelaySecondsInitial delay seconds for readiness probe5
readinessProbe.timeoutSecondsTimeout seconds for readiness probe1
customLivenessProbeCustom liveness probe configuration{}
customReadinessProbeCustom readiness probe configuration{}

Ingress parameters

NameDescriptionValue
ingress.enabledEnable ingress record generationfalse
ingress.classNameIngressClass that will be used""
ingress.annotationsAdditional annotations for the Ingress{}
ingress.hostsIngress hosts configuration{}
ingress.tlsIngress TLS configuration[]

Resource parameters

NameDescriptionValue
resourcesResource limits and requests for the Mage AI container{}
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment[]
affinityAffinity for pod assignment{}

Volume parameters

NameDescriptionValue
extraVolumeMountsAdditional volume mounts for the Mage AI container[]
extraVolumesAdditional volumes for the Mage AI pod[]

Persistence parameters

NameDescriptionValue
persistence.enabledEnable persistence using PVCtrue
persistence.storageClassNameStorage class namenil
persistence.sizePVC size5Gi
persistence.dynamicProvisioningEnable dynamic provisioningtrue

Configuration parameters

NameDescriptionValue
configEnvironment variables configuration injected directly in the container{}
existingSecretName of existing secret for environment variables""
secretsSecret environment variables injected directly in the container{}
extraEnvsExtra environment variables{}

Cleanup Job parameters

NameDescriptionValue
cleanupJob.enabledEnable cleanup cron jobfalse
cleanupJob.clean_variable_cli_argsCLI arguments for variable cleanup""
cleanupJob.clean_log_cli_argsCLI arguments for log cleanup""
cleanupJob.schedule_cronCron schedule for cleanup job0 * * * *

Examples

Basic Installation

helm install mageai ilum/ilum-mageai

Installation with PostgreSQL

helm install mageai ilum/ilum-mageai \
  --set postgresql.enabled=true \
  --set postgresql.deploy=true \
  --set postgresql.auth.username=mage \
  --set postgresql.auth.password=magepassword \
  --set postgresql.auth.database=mage

Installation with Custom Values

# values.yaml
replicaCount: 2
standaloneScheduler: true

postgresql:
  enabled: true
  deploy: true
  auth:
    username: mage_user
    password: secure_password
    database: mage_production

redis:
  enabled: true
  auth:
    enabled: true
    password: redis_password

persistence:
  size: 20Gi
  storageClassName: fast-ssd

ingress:
  enabled: true
  className: nginx
  hosts:
    - host: mage.example.com
      paths:
        - path: /
          pathType: Prefix

resources:
  requests:
    memory: "512Mi"
    cpu

Deploy ilum-mageai with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ilum-mageai on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartilum-mageai is pinned at v0.2.12 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply