jamaibase

by joaquinito2051

Helm chartv0.1.0App 1.0.0

Complete Jamaibase AI platform with all dependencies

About this chart

Jamaibase Helm Chart

Complete Jamaibase AI platform deployment with all dependencies including storage, databases, caching, and monitoring.

📋 Table of Contents

  • Overview
  • Prerequisites
  • Installation
  • Configuration
  • Components
  • Upgrading
  • Uninstallation
  • Troubleshooting
  • Contributing

🏗️ Overview

This Helm chart deploys the complete Jamaibase AI platform including:

Application Components

  • OWL Backend - Python-based API server with Celery workers
  • Jambu Frontend - Node.js-based web interface
  • V8-Kopi - Secure code execution system with isolated workers
  • Docling - GPU-enabled document processing and OCR service

Third-Party Dependencies

NOTE: The operators for these components must be installed cluster-wide BEFORE deploying Jamaibase. See Prerequisites for installation instructions.

  • CloudNativePG - PostgreSQL operator for relational data (cluster-wide operator required)
  • ClickHouse - Analytical database for logs and metrics (cluster-wide operator required)
  • Dragonfly - High-performance Redis-compatible cache (cluster-wide operator required)
  • VictoriaMetrics - Time-series database for monitoring (cluster-wide operator required)
  • SeaweedFS - S3-compatible object storage (cluster-wide operator required)

OpenShift Features

  • Security Context Constraints - Proper security policies
  • Routes - OpenShift-native HTTP routing
  • Network Policies - Traffic management and security
  • Resource Quotas - Resource usage limits
  • Operator Management - Certified operators from marketplace

🔧 Prerequisites

Operator Requirements

IMPORTANT: The following operators must be installed cluster-wide BEFORE deploying this Helm chart. The chart only creates the custom resources (instances, clusters) that these operators manage.

1. Prometheus Operator

Required for monitoring and metrics collection. Must be installed before Victoria Metrics Operator.

# Install via OpenShift Subscription (cluster-wide)
kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.80.1/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml

kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.80.1/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
# Verify installation
oc get pods -n openshift-operators | grep prometheus

Documentation: https://prometheus-operator.dev/


2. Victoria Metrics Operator

Required for monitoring and metrics storage.

IMPORTANT: Prometheus Operator CRDs must be installed before Victoria Metrics Operator (see step 1 above).

Installation via Red Hat Certified Operators (OpenShift):

The Victoria Metrics Operator is available from the Red Hat ecosystem as a certified operator. Install it via OpenShift Subscription (cluster-wide):

cat <<EOF | oc apply -f -
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: vm-global-operator-group
  namespace: openshift-operators
spec:
  targetNamespaces:
  - "*"  # All namespaces
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: victoria-metrics-operator
  namespace: openshift-operators
spec:
  channel: stable
  installPlanApproval: Automatic
  name: victoria-metrics-operator
  source: certified-operators
  sourceNamespace: openshift-marketplace
  startingCSV: victoria-metrics-operator.v0.47.0
EOF

Verify Installation:

# Check operator pod is running
oc get pods -n openshift-operators | grep victoria-metrics

# Verify CRDs are registered
oc get crd | grep victoriametrics

# Expected CRDs:
# vmagentoperator.victoriametrics.com
# vmalertmanagerconfig.victoriametrics.com
# vmalert.victoriametrics.com
# vmauth.victoriametrics.com
# vmcluster.victoriametrics.com
# vmnodescrape.victoriametrics.com
# vmpodscrape.victoriametrics.com
# vmrule.victoriametrics.com
# vmsingle.victoriametrics.com
# vmstaticscrape.victoriametrics.com
# vmuser.victoriametrics.com
# vmalertmanager.victoriametrics.com
# vmalertmanagerconfig.victoriametrics.com
# victorialogs.victoriametrics.com

Documentation: https://docs.victoriametrics.com/operator/

Notes:

  • The operator watches all namespaces by default when installed in openshift-operators
  • The Helm chart creates VictoriaMetrics custom resources (VMCluster, VMAuth, VMUser, etc.) in the jamaibase namespace
  • No additional configuration is needed - the operator will automatically reconcile resources created by the Helm chart

3. Dragonfly Operator (Redis-Compatible Cache)

Required for Dragonfly high-performance cache.

Installation (Cluster-Wide):

IMPORTANT: If you encounter a CRD ownership error from a previous installation, follow these steps first:

# If you get an error about existing CRD with wrong ownership metadata:
# 1. Uninstall any existing dragonfly-operator releases
helm uninstall dragonfly-operator -n dragonfly-operator-system 2>/dev/null || true

# 2. Remove Helm metadata from the CRD
kubectl patch crd dragonflies.dragonflydb.io \
  -p '{"metadata":{"annotations":{"meta.helm.sh/release-name":null,"meta.helm.sh/release-namespace":null},"labels":{"app.kubernetes.io/managed-by":null}}}' \
  --type=merge

# 3. Add correct metadata for your target namespace (e.g., openshift-operators)
kubectl patch crd dragonflies.dragonflydb.io \
  -p '{"metadata":{"annotations":{"meta.helm.sh/release-name":"dragonfly-operator","meta.helm.sh/release-namespace":"openshift-operators"},"labels":{"app.kubernetes.io/managed-by":"Helm"}}}' \
  --type=merge

Installation to openshift-operators namespace:

# Install via Helm to openshift-operators namespace
helm install dragonfly-operator \
  oci://ghcr.io/dragonflydb/dragonfly-operator/helm/dragonfly-operator \
  --version v1.1.10 \
  -f k8s/manifest/openshift/dragonfly-operator-values.yaml \
  -n openshift-operators

dragonfly-operator-values.yaml:

replicaCount: 1
manager:
  resources:
    requests:
      cpu: 100m
      memory: 200Mi
    limits:
      cpu: 1000m
      memory: 2000Mi
  # Watch the jamaibase namespace for Dragonfly resources
  watchNamespace: jamaibase
serviceMonitor:
  enabled: true
  labels:
    scrape-by: vmagent
grafanaDashboard:
  enabled: true
  folder: dragonfly
  # -- Grafana dashboard configmap annotations.
  annotations:
    name: dragonfly_folder
  # -- Grafana dashboard configmap labels
  labels:
    name: dragonfly_dashboard

Apply configuration updates:

# Apply the updated values to the running operator
helm upgrade dragonfly-operator \
  oci://ghcr.io/dragonflydb/dragonfly-operator/helm/dragonfly-operator \
  --version v1.1.10 \
  -f k8s/manifest/openshift/dragonfly-operator-values.yaml \
  -n openshift-operators

Verify installation

kubectl get pods -n openshift-operators | grep dragonfly

Verify CRD is registered

kubectl get crd dragonflies.dragonflydb.io


---

**IMPORTANT: Apply Security Context Constraints (SCC)**

Dragonfly containers run with UID/GID 999, which requires special SCC permissions in OpenShift. You must apply the SCC before deploying Dragonfly instances:

```bash
# Apply the jamaibase SCC
kubectl apply -f k8s/manifest/openshift/jamaibase-scc.yaml

# Add the default service account to the SCC
kubectl patch scc jamaibase-scc --type='json' \
  -p='[{"op": "add", "path": "/users/-", "value": "system:serviceaccount:jamaibase:default"}]'

# Verify SCC was created
kubectl get scc jamaibase-scc

Note: The jamaibase-scc allows containers to run with UID/GID 999-2000, which is required for Dragonfly and other Jamaibase components.


Deploy Dragonfly Instance:

After installing the operator and applying the SCC, deploy a Dragonfly instance:

# Deploy Dragonfly with 2 replicas
kubectl apply -f k8s/manifest/openshift/dragonfly-replica-deploy.yaml -n jamaibase

# Verify Dragonfly pods are running
kubectl get pods -n jamaibase -l app.kubernetes.io/name=dragonfly

# Check Dragonfly service
kubectl get svc -n jamaibase dragonfly

Expected output:

NAME          READY   STATUS    RESTARTS   AGE
dragonfly-0   1/1     Running   0          30s
dragonfly-1   1/1     Running   0          15s

Documentation: https://dragonflydb.github.io/dragonfly-operator/


4. ClickHouse Operator

Required for ClickHouse analytical database.

Installation (Cluster-Wide):

# Install via Helm to openshift-operators namespace
helm repo add clickhouse https://docs.altinity.com/clickhouse-operator/
helm install clickhouse-operator clickhouse-operator/clickhouse-operator \
  --namespace openshift-operators \
helm upgrade clickhouse-operator clickhouse-operator/altinity-clickhouse-operator \
  -n clickhouse-operator-system \
  -f clickhouse-operator-values.yaml

apply clickhouse operator values

clickhouse-operator-values.yaml

configs:
  files:
    config.yaml:
      watch:
        namespaces:
          - jamaibase
          - tokenvisor
serviceMonitor:
  enabled: true
  additionalLabels:
    scrape-by: vmagent
dashboards:
  enabled: true
  additionalLabels:
    grafana_dashboard: "clickhouse"
  annotations: {}
  grafana_folder: clickhouse

Verify installation

kubectl get pods -n openshift-operators | grep clickhouse

Documentation: https://github.com/Altinity/clickhouse-operator


5. CloudNativePG Operator (PostgreSQL)

Required for PostgreSQL database management.

# Install via OpenShift Subscription (cluster-wide)
cat <<EOF | oc apply -f -
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: cnpg-global-operator-group
  namespace: openshift-operators
spec:
  targetNamespaces:
  - "*"  # All namespaces
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: cloudnative-pg
  namespace: openshift-operators
spec:
  channel: stable-v1
  installPlanApproval: Automatic
  name: cloudnative-pg
  source: certified-operators
  sourceNamespace: openshift-marketplace
  startingCSV: cloudnative-pg.v1.22.0
EOF

IMPORTANT: Pull Secret Required

The custom PostgreSQL image (ghcr.io/embeddedllm/cnpg-postgresql:17.5) is hosted in a private registry and requires authentication. Before deploying the Helm chart:

  1. Create a GitHub Personal Access Token with read:packages scope at https://github.com/settings/tokens
  2. Create the image pull secret in the jamaibase namespace:
    kubectl create secret docker-registry github-registry-secret \
      --docker-server=ghcr.io \
      --docker-username=YOUR_GITHUB_USERNAME \
      --docker-password=YOUR_GITHUB_TOKEN \
      --namespace=jamaibase
    
  3. The Helm chart will automatically create the ImageCatalog in your deployment namespace and reference this secret

This custom PostgreSQL image includes additional extensions and optimizations for the Jamaibase platform.

Verify installation

kubectl get pods -n openshift-operators | grep cloudnative-pg

6. SeaweedFS Operator (S3-Compatible Storage) or bring your own s3

Required for object storage.

Installation (Cluster-Wide):

# Install via Helm
helm repo add seaweedfs https://seaweedfs.github.io/seaweedfs/helm
helm install seaweedfs-operator seaweedfs/seaweedfs \
  --namespace seaweedfs-system \
  --create-namespace \
  --set controller.watchNamespace="*"  # Watch all namespaces

# Verify installation
kubectl get pods -n seaweedfs-system

Documentation: https://github.com/seaweedfs/seaweedfs


Verify All Operators

Before deploying Jamaibase, verify all operators are running:

# For OpenShift - check all required operators in openshift-operators namespace
oc get pods -n openshift-operators | grep -E "cloudnative-pg|clickhouse|dragonfly|prometheus-operator|victoria-metrics-operator"

# Check CRDs are registered for all operators
oc get crd | grep -E "cluster.postgresql|clickhouse|dragonfly|podmonitor|servicemonitor|vmagent|vmauth|vmuser|vmcluster|vmpodscrape|vmnodescrape|victorialogs|seaweed"

# Expected CRDs:
# CloudNativePG: clusters.cnpg.io, poolers.cnpg.io
# ClickHouse: clickhouseoperatorconfigs.clickhouse.altinity.com, clickhouseinstallations.clickhouse.altinity.com
# Dragonfly: dragonflies.dragonflydb.io
# Prometheus: podmonitors.monitoring.coreos.com, servicemonitors.monitoring.coreos.com
# VictoriaMetrics: vmagents.victoriametrics.com, vmauths.victoriametrics.com, vmusers.victoriametrics.com, vmclusters.victoriametrics.com, vmpodscrapes.victoriametrics.com, vmnodescrapes.victoriametrics.com, victorialogs.victoriametrics.com
# SeaweedFS: seaweedfs.seaweedfs.com (if using operator)

Cluster Requirements

  • OpenShift 4.8+ or Kubernetes 1.24+
  • Minimum 8 CPU cores and 16GB RAM for full deployment
  • 100GB+ available storage for all components
  • Helm 3.8+ installed locally
  • NVIDIA GPU nodes with CUDA support (REQUIRED for Docling by default)
    • NVIDIA GPU Operator should be installed to manage GPU drivers and labels
    • See GPU Requirements below for details

Storage Requirements

The cluster manager must provide Persistent Volumes for the following components:

ComponentStorage SizeStorage ClassPurpose
PostgreSQL20Gi+RWX/ReadWriteOnceApplication database
ClickHouse50Gi+RWX/ReadWriteOnceAnalytics and logs
SeaweedFS100Gi+RWX/ReadWriteManyObject storage
VictoriaMetrics20Gi+RWX/ReadWriteOnceMonitoring data
Dragonfly1Gi+RWX/ReadWriteOnceCache persistence

Storage Configuration: Cluster managers sh

Deploy jamaibase with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has jamaibase 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 chartjamaibase is pinned at v0.1.0 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