- Install Kafka, which is used by components of Rasa and Studio to communicate.
- Install Rasa itself using its Helm chart.
- Deploy a TLS certificate and Kubernetes Ingress to make your assistant available outside of the cluster via HTTPS.
Kafka Installation
We will begin by setting up Kafka, which is used by Rasa Pro and Rasa Studio to communicate with each other, as well as for internal purposes. You can run the following script to deploy Kafka with an autogenerated random password for authentication. When we setup the assistant in the next step, it will automatically fetch this password and save it in a Kubernetes secret so that other Rasa components can connect to Kafka. You will see some warnings about authentication failures until everything is up and running and it should eventually succeed.rasa and rasa-events-dlq have been created. This means that you have now successfully deployed Kafka into the cluster.
Assistant Setup
Now that we’ve set up Kafka, we can set up the Rasa assistant using the Rasa Helm Chart. You can run our script to perform the initial setup for the Assistant, and then we’ll walk you through the setup that it’s most important to understand.Values File
Thevalues.yaml file will contain all of the configuration that gets applied to your assistant by Helm. You can read about all of the available configuration options here, and you can fully customise your setup to meet your organisation’s needs and security policies. For simplicity, we’ve provided a file in the playbook repo gcp/rasa/assistant/values.template.yaml that sets all of the key values we need to integrate Rasa with the GCP infrastructure we’ve already deployed, leaving placeholder values for things we want to inject as environment variables. You can set these values manually and add any others you require, but we recommend you begin by automatically creating a version with all the environment variables set from the previous sections:
Deploy Rasa
Now that all the configuration is done, you can deploy Rasa using all of the configuration that you’ve set:RUNNING by running:
Configure Ingress & TLS Certificate
Finally, we can deploy a Kubernetes Ingress and a TLS certificate for the Rasa Pro deployment. This will allow us to interact with the bot from outside the cluster. We’ll create a certificate and deploy an ingress with another script:https://assistant.$DOMAIN. For example, if the value you used for $DOMAIN was example.com, you could visit your assistant on https://assistant.example.com If you receive “Hello from Rasa” response, you have successfully deployed Rasa Pro. If you receive an error, there may just be a delay in issuing the certificate or having the DNS records propagate - wait a few minutes and try again!