Breadcrumbs

Deploy Rasa for Multitenancy

Overview
The MTT Rasa Deployment is designed to support multiple customers by deploying separate Rasa instances for each tenant. Since Rasa does not natively support multi-tenancy, each customer’s chatbot is deployed in its own Kubernetes namespace with a dedicated Rasa server, action server, and configuration. A single MinIO instance is deployed once and acts as centralized storage, where each tenant has its own bucket to store and manage trained Rasa models. This setup ensures complete isolation of data, models, and configurations for every customer while allowing easy scalability and management through Helm-based deployments.


Clone

git clone https://efcx:RecRpsuH34yqp56YRFUb@gitlab.expertflow.com/bot/rasa/rasa-deployment.git -b 3.6.20 /home/rasa && cd /home/rasa

Pull Images

CONTAINERD_ADDRESS=/run/k3s/containerd/containerd.sock /var/lib/rancher/rke2/bin/ctr -n k8s.io i pull -u efcx:RecRpsuH34yqp56YRFUb gitimages.expertflow.com/general/minio:2022.10.5-debian-11-r1
CONTAINERD_ADDRESS=/run/k3s/containerd/containerd.sock /var/lib/rancher/rke2/bin/ctr -n k8s.io i pull -u efcx:RecRpsuH34yqp56YRFUb gitimages.expertflow.com/bot/rasa/rasa:3.6.20
CONTAINERD_ADDRESS=/run/k3s/containerd/containerd.sock /var/lib/rancher/rke2/bin/ctr -n k8s.io i pull -u efcx:RecRpsuH34yqp56YRFUb gitimages.expertflow.com/general/redis:7.4.2-debian-12-k8s
CONTAINERD_ADDRESS=/run/k3s/containerd/containerd.sock /var/lib/rancher/rke2/bin/ctr -n k8s.io i pull -u efcx:RecRpsuH34yqp56YRFUb gitimages.expertflow.com/bot/rasa/rasa-action-server:3.6.2-rich


Deploy Minio
Do not need to deploy Minio for every time just need to deploy once

helm install minio chart/minio --create-namespace -f chart/minio/values.yaml -n <tenant-name>
  • Once deployed access through https://{IP}:30901/

  • Login Minio with Default creds
    username: minioadmin
    Password: minioadmin

  • Create buckets with tenant name & upload the specific model file

image-20250805-143818.png


Deploy Rasa
first copy the existing rasa folder with the new tenant name

cd /home
cp rasa <tenant-name>
cd <tenant-name>
  • Edit the file rasa.yaml

  • set the model name & bucket name accordingly

image-20250805-144319.png
  • For every new tenant you have to copy the existing folder with new tenant name and change the bucket & model name in rasa.yaml file accordingly

    image-20250805-144554.png


  • Update you custom actions (If any)

    • Delete existing action files in the actions directory and place you custom action files

    • Update the volume path of actions
      Open the actions.yaml file and update the hostPath > path according to your tenant (/home/<tenant-name>/actions)

      image-20251124-132009.png


  • Update the port (If required)
    By default, the Rasa service is configured to expose port 30505. If this port is already in use or if network requirements dictate a specific port assignment, you can modify the configuration in the deployment manifest.

    • Open the rasa.yml configuration file.

    • Navigate to the Service section.

    • Locate the nodePort field under ports.

    • Update the value to your desired port number (ensuring it is within the valid range from 30000 to 32767).


installation

helm install rasa chart/rasa --create-namespace -f rasa.yaml -n <tenant-name>
helm install rasa-action-server chart/rasa-action-server --create-namespace -f actions.yaml -n <tenant-name>


Uninstallation

Rasa

helm uninstall rasa -n <tenant-name>
helm uninstall rasa-action-server -n <tenant-name>

Minio

helm uninstall minio -n <tenant-name>