This project is licensed under Apache 2.0 with The Commons Clause.
Google Cloud's Artifact Registry is used to store the helm chart. The following steps are to be followed to release a new version of the chart. Google's Documentation
gcloud auth application-default login
gcloud container clusters get-credentials helicone --location us-west1-b
-
Create a new GKE cluster with the following command
gcloud container clusters create helicone \ --enable-stackdriver-kubernetes \ --subnetwork default \ --num-nodes 1 \ --machine-type e2-standard-8 \ --zone us-west1-b
-
Install the chart with the following command
helm install helicone ./
-
Connect via K9s and verify the pods are running.
k9s -n default
-
Port forward to the following services:
- web
- oai
- api
-
Send a request to oai and api services and verify they are showing in the web.
-
If everything is working as expected, delete the cluster with the following command
Important: As this is expensive, please remember to delete the cluster after testing.
gcloud container clusters delete helicone
-
Increase number of nodes in the cluster
gcloud container clusters resize helicone --node-pool default-pool --num-nodes [NUM_NODES]
-
Upgrade the helm chart
helm upgrade helicone ./ -f values.example.yaml
-
Decrease the number of nodes in the cluster
gcloud container clusters resize helicone --node-pool default-pool --num-nodes 0
-
Update the
Chart.yaml
file with the new version number. -
Package the chart with
helm package .
-
Authenticate
gcloud auth print-access-token | helm registry login -u oauth2accesstoken \ --password-stdin https://us-central1-docker.pkg.dev
-
Push the chart to the repository with
helm push helicone-[VERSION].tgz oci://us-central1-docker.pkg.dev/helicone-416918/helicone-helm
-
Notify the consumers of the new version.
-
Auth with gcloud docker
gcloud auth configure-docker us-central1-docker.pkg.dev
-
Configure helm auth
gcloud auth application-default print-access-token | helm registry login -u oauth2accesstoken \ --password-stdin https://us-central1-docker.pkg.dev
-
Or to impersonate a service account
gcloud auth application-default print-access-token \ --impersonate-service-account=SERVICE_ACCOUNT | helm registry login -u oauth2accesstoken \ --password-stdin https://us-central1-docker.pkg.dev
-
Pull the chart locally
helm pull oci://us-central1-docker.pkg.dev/helicone-416918/helicone-helm/helicone \ --version [VERSION] \ --untar
-
To install directly from OCI registry
helm install helicone oci://us-central1-docker.pkg.dev/helicone-416918/helicone-helm/helicone \ --version [VERSION]
-
Add cors for the s3 bucket
gcloud storage buckets update gs://<BUCKET_NAME> --cors-file=bucketCorsConfig.json
Add consumer's Google Cloud Service Account to the Enterprise Consumer
group within the helicone-416918
project.
The Enterprise Consumer
group will be scoped to the Artifact Registry Reader
role.
Or directly add the Artifact Registry Reader
role to the consumer's service account.
If you don't specify, it will create a default user and password.
kubectl -n default create secret generic helicone-clickhouse \
--from-literal=CLICKHOUSE_USER='default' \
--from-literal=CLICKHOUSE_PASSWORD='default'
Create a bucket in your cloud.
For GCP you will have to go into the interoperability section and create an access key.
For us it was like this...
kubectl -n default create secret generic helicone-s3 \
--from-literal=access_key='' \
--from-literal=bucket_name='helicone-bucket' \
--from-literal=endpoint='https://storage.googleapis.com' \
--from-literal=secret_key=''
kubectl -n default create secret generic helicone-s3 \
--from-literal=access_key='minio' \
--from-literal=bucket_name='request-response-storage' \
--from-literal=endpoint='http://localhost:9000' \
--from-literal=secret_key='minioadmin'
values.examples.yaml can be deployed to GKE
-
Install cert-manager
helm repo add jetstack https://charts.jetstack.io helm repo update helm upgrade --install \ cert-manager jetstack/cert-manager \ --namespace cert-manager \ --create-namespace \ --set installCRDs=true
Apply production issuer
kubectl apply -f prod_issuer.yaml
-
Install Ingress Nginx
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm install nginx ingress-nginx/ingress-nginx --namespace nginx --set rbac.create=true --set controller.publishService.enabled=true
-
Install the helm chart
helm upgrade helicone ./ -f values.example.yaml --install
Note:
- Ensure domain A record is pointing to the load balancer IP