Version: Latest

Installation Guide

Installation

Once you have all of the requirements satisfied, follow the steps below to deploy the Studio Helm chart inside your Kubernetes cluster.

Step 1: Create a Google cloud service account with Rasa:

Reach out to Rasa's CSE team to request access to our Google Artifact Registry to pull the Helm chart and the container images. They will assist you in creating a service account that will grant you the necessary permissions to access the artifacts.

Step 2: Pull the official Studio helm chart

You can run the below-mentioned command to pull the latest version chart from Rasa's Google Artifact Registry.

helm pull oci://europe-west3-docker.pkg.dev/rasa-releases/helm-charts/studio

This will download the chart file (for example studio-0.3.1.tgz) to your machine. Extract this file to see the chart templates and values.yaml file.

Step 3: Accessing Rasa Studio container image during installation with Helm chart

To get access to the Rasa Studio container image from Google Artifact Registry, follow these steps:

  1. Create an ImagePullSecret: Once you have the service account created, you need to create an ImagePullSecret in your Kubernetes cluster to authenticate and access the container images from the Google Artifact Registry. The secret can be created using the below command. SERVICE-ACCOUNT-EMAIL is the email associated with the service account and cat KEY-FILE is the actual json file that will get generated when a service account is created.
kubectl create secret docker-registry artifact-registry \
--docker-server=https://europe-west3-docker.pkg.dev \
--docker-email=SERVICE-ACCOUNT-EMAIL \
--docker-username=_json_key \
--docker-password="$(cat KEY-FILE)"

More information can be seen here: https://cloud.google.com/artifact-registry/docs/access-control#pullsecrets.

Once the secret is generated you can set it in the my-values.yaml that you will create next.

Step 4: Create a value file:

A value file contains the configuration options and parameters for the Helm chart. You can customize these options based on your requirements. A sample values.yaml file is available in the Studio Helm Chart. The file can be seen if you extract the .tgz chart file you downloaded from the Google Artifact Registry. Follow these steps to create your value file:

  1. Make a copy of values.yaml file which can be found inside extracted chart directory. Let us call it my-values.yaml. This file will serve as your custom value file.
  2. Open my-values.yaml in a text editor and modify the configuration options according to your needs. Ensure that you review and update values related to the way your Kubernetes cluster is set up. The chart's readme file will provide you with all the keys that are available with their default values.
  3. Save and close the my-values.yaml file.
tip

Please make sure to keep the replicaCount of the pods to 1 except for the model training consumer and the model running consumer If you would like to run multiple parallel assistant training in Studio make sure to increase replicaCount of model training consumer and model running consumer pods. For example, if you plan to work with 4 assistants in Studio with parallel training sessions, it’s recommended to set model running consumer replicaCount to number of assistants + 1 (minimum) or number of assistants * 2 (recommended) and model training consumer to number of assistants i.e 4 in this case.

tip

Studio backend container has a DOCKER_IMAGE_TAG environment variable. You need to pass the complete docker repository URL of a Rasa Pro image (version 3.7.0 and above). The ImagePullSecret we created in Step 3 does not apply to this image and thus you need to make sure that your Kubernetes cluster has access to the Rasa Pro image. This image is then used to train and run your assistant model.

Step 5: Creating Kubernetes secrets:

To store sensitive values mentioned in the above section it is recommended to create Kubernetes secrets. To create them

  1. Make a copy of the secrets.yaml file which can be found inside extracted chart directory. Let us call it my-secrets.yaml.
  2. Create base64 encoded values of the secrets and update the yaml file with them. You can run echo -n "my-secret-key" | base64 to quickly create base64 encoded values of your secrets.
  3. Once all the secrets are updated run kubectl apply -f my-secrets.yaml -n <namespace>. This creates the Kubernetes secret in the namespace where you plan to deploy Studio.
  4. These secrets are then referenced and passed onto the pods inside the cluster when Studio is deployed with my-values.yaml file created in the previous step.
SECRET KEYSECRET VALUE
DATABASE_URLDatabase URL of the Studio backend database. This should be of the format postgresql://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}?schema=public
KC_DB_PASSWORDDatabase password for the Studio Keycloak database
MODEL_SERVICE_DB_PASSWORDDatabase password for the Studio model-service database
KAFKA_SASL_PASSWORDKakfa password if you use the SASL mechanism
KEYCLOAK_ADMIN_PASSWORDPassword to the admin user interface of Keycloak (Studio’s user management system). You should use this credential to login to http://<external-ip-or-hostname>/auth
KEYCLOAK_API_PASSWORDPassword to access Keycloak’s API. Studio uses this internally to communicate with Keycloak
RASA_PRO_LICENSE_SECRET_KEYRasa Pro license key
OPENAI_API_KEY_SECRET_KEYOpenAI API key
TRAINING_STORAGE_SIGNED_URL_SERVICE_ACCOUNTService Account email id for accessing Google cloud storage bucket for Studio’s model-service. This is only needed if you plan to deploy on GCP
GCP_CREDSContents of the JSON key file of your Google service account to access Google cloud storage bucket for Studio’s model-service. This is only needed if you plan to deploy on GCP
AWS_ACCESS_KEY_IDAWS Access Key ID to access S3 bucket for Studio’s model-service. Only needed for AWS deployment
AWS_SECRET_ACCESS_KEYAWS Access Secret Key to access S3 bucket for Studio’s model-service. Only needed for AWS deployment

Step 6: Deploy Rasa Studio using Helm:

With the Helm chart and value file prepared, you are ready to deploy Rasa Studio in your Kubernetes cluster. Run the following command:

helm upgrade <release-name> <path-to-chart-folder> -f <path-to-value-file> -n <namespace> --install
  • <release-name>: Choose a name for your Rasa Studio release, for example, rasa-studio.
  • <path-to-chart-folder>: Provide the path to the extracted folder of the tgz file you obtained by downloading the chart from the Google Artifactory registry.
  • <path-to-value-file>: Specify the path to your custom value file (my-values.yaml).
  • <namespace> Kubernetes namespace you want to deploy to.

Example command:

helm upgrade rasa-studio ./studio -f ./my-values.yaml -n studio --install

Helm will begin the deployment process, creating the necessary resources and configurations based on the provided values.

Step 5: Monitor deployment and access Rasa Studio:

Once the deployment is complete, you can monitor the deployment status by running:

kubectl get pods -n <namespace>

Ensure that all pods are running and ready before accessing Rasa Studio.

You can access Rasa Studio by visiting the URL https://<external-ip-or-hostname> in your web browser. You can now proceed to license activation and user management.

You can access Rasa Studio User Management UI (Keycloak) by visiting the URL https://<external-ip-or-hostname>/auth in your web browser. The login credentials for the Keycloak’s Admimsnistration Console is the value that you provided for the KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD environment variables in the values file.

You can then select the KEYCLOAK_REALM (default value is rasa-studio) and update or add users to Studio.

Please note that additional configurations and customizations can be made by modifying the value file (my-values.yaml) and upgrading the deployment using the helm upgrade command.

For further information on advanced configuration options and maintenance tasks, refer to the Rasa Studio Helm charts documentation (README.md in the downloaded Helm chart and inline comments in values.yaml file) and the official Helm documentation.