Skip to main content
Version: 4.7.33

Self-Hosted Gentrace

Gentrace offers a self-hosted version that can be deployed in your own Kubernetes cluster via a Helm chart. The self-hosted version provides all the features of Gentrace while giving you complete control over your data and infrastructure.

The repository is available at gentrace/gentrace-self-hosted.

Overview

The Gentrace self-hosted deployment includes:

  • Gentrace API Server
  • Gentrace Web Application Frontend
  • Gentrace WebSocket Server
  • PostgreSQL Database
  • ClickHouse Analytics Database
  • Kafka Message Queue
  • Object Storage Integration
  • Service Mesh (Istio) Configuration

Prerequisites

Before deploying Gentrace, ensure you have:

  • Kubernetes 1.19+
  • Helm 3.0+
  • A configured storage class (if your default storage class isn't desirable for stateful services like Postgres and Clickhouse)
  • Install the Istio service mesh if you need mutual TLS between services
  • Access to pull container images (communicate with the Gentrace team for this)
  • Kubernetes secrets configured

Installation

1. Get the Helm Chart

Clone the Gentrace self-hosted repository:

bash
git clone https://github.com/gentrace/gentrace-self-hosted
cd gentrace-self-hosted

2. Configure Storage Class

If the default storage class in your Kubernetes environment isn't desirable for the stateful services, create storage classes with appropriate retention policies for each service. Example storage classes for PostgreSQL, ClickHouse, and Kafka:

yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: gentrace-storage
provisioner: kubernetes.io/gce-pd # Change based on your cloud provider
parameters:
type: gp3
fsType: ext4
reclaimPolicy: Retain
allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer

3. Install Istio

Install Istio with the demo profile for service mesh capabilities:

bash
curl -L https://istio.io/downloadIstio | sh -
cd istio-*
export PATH=$PWD/bin:$PATH
istioctl install --set profile=demo

Enable automatic sidecar injection:

bash
kubectl label namespace default istio-injection=enabled

4. Configure Secrets

Create the necessary Kubernetes secrets for:

  • Admin credentials
  • Database credentials (PostgreSQL, ClickHouse)
  • JWT authentication
  • Kafka configuration
  • Object storage access
  • Prisma field encryption

Example secret configuration:

yaml
apiVersion: v1
kind: Secret
metadata:
name: postgres-credentials
type: Opaque
stringData:
POSTGRES_USER: "gentrace"
POSTGRES_PASSWORD: "your-secure-password"
POSTGRES_DB: "gentrace"
DATABASE_URL: "postgresql://gentrace:your-secure-password@postgres:5432/gentrace"

5. Deploy

Use the example values.yaml file as a starting point for your configuration. This file contains all the default values and configuration options available.

The configuration values present in the values.yaml include:

  • Database settings
  • Storage configurations
  • Service mesh parameters
  • Resource allocations
  • Ingress configurations
bash
helm install gentrace ./helm-chart -f modified-values.yaml

Monitoring Istio Service Mesh

Istio provides several monitoring tools to observe your service mesh:

Istio Kiali Dashboard

Access the Kiali dashboard to visualize service mesh topology, view detailed metrics, and monitor traffic flow:

You can access these monitoring tools using the following commands:

bash
istioctl dashboard kiali

Support

For detailed deployment instructions and troubleshooting:

Updates and Maintenance

To update your self-hosted Gentrace installation:

  1. Check the changelog for breaking changes
  2. Backup your data
  3. Update the Helm chart:
bash
helm repo update
helm upgrade gentrace ./helm-chart -f values.yaml