Installation
You are viewing documentation for a legacy Rasa product. If you want to get started building assistants with Rasa please check out our latest documentation here.
This page contains detailed instructions for installing Rasa Enterprise in a scalable cluster environment using OpenShift or Kubernetes (K8S).
Rasa Enterprise is available as a Helm Chart for a cluster setup. If you are not using Helm in your cluster, you can still use the following instructions to generate the Kubernetes or OpenShift object configurations via the Helm command-line interface, and install those configurations manually.
Installation
note
The support for the Rasa Open Source server deployment in the Rasa Enterprise Helm chart will be dropped in the future.
It's recommended to use the Rasa Helm chart to deploy Rasa Open Source, more info you can find in the docs.
1. Create Namespace
We recommend installing Rasa Enterprise in a separate namespace to avoid interfering with existing cluster deployments. To create a new namespace run the following command:
- Kubernetes
- OpenShift
kubectl create namespace <your namespace>
```
### 2. Create Values File
Prepare an empty file called `values.yml` which will include all your custom configuration for the installation with Helm.
### 3. Configure Credentials
To configure the credentials, copy the section below into the `values.yml` file and replace each `<safe credential>` marker with a different alphanumeric string. Please use safe credentials to avoid data breaches.
```yaml
# rasax specific settings
rasax:
# initialUser is the user which is created upon the initial start of Rasa Enterprise
initialUser:
# username specifies a name of this user - defaults to "admin"
username: "<username>"
# password for the Rasa Enterprise user
password: "<safe credential>"
# passwordSalt Rasa Enterprise uses to salt the user passwords
passwordSalt: "<safe credential>"
# token Rasa Enterprise accepts as authentication token from other Rasa services
token: "<safe credential>"
# jwtSecret which is used to sign the jwtTokens of the users
jwtSecret: "<safe credential>"
rasa:
# token Rasa accepts as authentication token from other Rasa services
token: "<safe credential>"
rabbitmq:
# rabbitmq specific settings of the subchart
auth:
# password which is used for the authentication
password: "<safe credential>"
global:
postgresql:
# postgresql: global settings of the postgresql subchart
postgresqlPassword: "<safe credential>"
redis:
# password to use in case there no external secret was provided
password: "<safe credential>"
4. Specify Rasa Enterprise and Rasa Open Source Versions
You can install the latest stable Rasa Enterprise version and the latest Rasa Open Source version by specifying the following in your values.yml:
# rasax specific settings
rasax:
# Rasa Enterprise configuration you did in previous steps
# ...
tag: "1.2.2"
rasa:
# Rasa Open Source configuration you did in previous steps
# ...
# tag refers to the Rasa image tag
tag: "undefined-full"
To install the latest edge release of Rasa Enterprise instead, set the latest tag for Rasa Enterprise:
# rasax specific settings
rasax:
# Rasa Enterprise configuration you did in previous steps
# ...
tag: "latest"
rasa:
# Rasa Open Source configuration you did in previous steps
# ...
# tag refers to the Rasa image tag
tag: "undefined-full"
You can also choose any compatible Rasa Enterprise and Rasa Open Source versions according to the Compatibility Matrix.
5. Optional: Configure Custom Action Server
See these instructions to configure a custom action server.
note
If you are following the Using Helm to Generate Object Configurations guide, stop here and continue with them.
6. Deploy Rasa Enterprise
Run the following commands:
# Add the repository which contains the Rasa Enterprise Helm chart
helm repo add rasa-x https://rasahq.github.io/rasa-x-helm
# Deploy Rasa Enterprise
helm install \
--generate-name \
--namespace <your namespace> \
--values values.yml \
rasa-x/rasa-x
note
OpenShift only: OpenShift requires additional settings related to the security context, in the Rasa Enterprise Helm chart repository, you can find an example values file with settings for OpenShift.
Then wait until the deployment is ready. If you want to check on its status, the following command will block until the Rasa Enterprise deployment is ready:
- Kubernetes
- OpenShift
kubectl --namespace <your namespace> \
wait \
--for=condition=available \
--timeout=20m \
--selector app.kubernetes.io/component=rasa-x \
deployment
```
Alternatively you can also [monitor the pods directly](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/1.2.x/installation-and-setup/install/helm-chart-installation/installation/#accessing-logs). Note that the deployment process can involve containers restarting until everything is ready (e.g. if the database container is not ready yet).
### 7. Access Rasa Enterprise
By default, the Rasa Enterprise deployment is exposed via the `nginx` service. You can get the IP address using this command:
- Kubernetes
- OpenShift
```bash
kubectl --namespace <your namespace> \
get service \
-l app.kubernetes.io/component=nginx \
-o jsonpath="{.status.loadBalancer.ingress[0].ip}"
```
You can then access the deployment on `http://<ip>:8000`
**Note:** Depending on the used cluster / cloud provider this might not work. Please refer to the cloud provider’s documentation / administrator what the recommended way for exposing the `nginx` service is or reach out to your Customer Success Engineer.
### 8. Activate Rasa Enterprise
You need to upload a valid license. To learn how to do this, please visit the [Product Activation](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/1.2.x/installation-and-setup/installation-and-setup/activation) section.
## Reference
### Accessing Secrets
This section describes how to retrieve secrets from your running deployment. You have the option to retrieve the following secrets:
| description | default secret name |
| --- | --- |
| PostgreSQL database password | `postgresql` |
| Redis lock store and cache password | `redis` |
| RabbitMQ event broker password | `rabbit` |
Run the following command, replacing `<secret name>` with one of the values in the table, and `<your namespace>` and `<your release name>` with your namespace and the name of your release:
- Kubernetes
- OpenShift
```bash
secret=<secret name>
namespace=<your namespace>
release_name=<your release name>
kubectl --namespace ${namespace} \
get secret ${release_name}-${secret} -o yaml | \
awk -F ': ' '/password/{print $2}' | base64 -d ;echo
```
##### note
If you’re not sure what namespace or release name your deployment runs under, you can use the following commands to find out. To list the available namespaces, run:
```bash
kubectl get namespaces
And to list the releases under a particular namespace namespace, run:
helm list --namespace <your namespace>
Accessing Logs
This section describes how to get logs from the running containers.
- Get the name of the pod which you want to get the logs of.
- Kubernetes
- OpenShift
kubectl --namespace <your namespace> \
get pods
# The output should be similar to this:
# NAME READY STATUS RESTARTS AGE
# rasa-app-58d476497-ktkqn 1/1 Running 0 45m
# rasa-duckling-7696b7f474-km6dx 1/1 Running 0 45m
# rasa-event-service-7657b6b489-96drn 1/1 Running 1 45m
# rasa-nginx-64b6b464f6-p9bmb 1/1 Running 0 45m
# rasa-postgresql-0 1/1 Running 0 45m
# rasa-rabbit-0 1/1 Running 0 45m
# rasa-rasa-production-c86fbf7f7-q9pp5 1/1 Running 0 45m
# rasa-rasa-worker-5d49485976-6z2kj 1/1 Running 0 45m
# rasa-rasa-x-5788cddbb7-5zf86 1/1 Running 0 45m
# rasa-redis-master-0 1/1 Running 0 45m
`rasa-rasa-x-5788cddbb7-5zf86` is for example the name of the Rasa Enterprise container.
```
2. To get the logs of the container run:
- Kubernetes
- OpenShift
```bash
kubectl --namespace <your namespace> \
logs <name of the pod>
```
### Using Helm to Generate Object Configurations
If you don’t want or cannot use Helm to install Rasa Enterprise in your cluster, you can still use Helm to generate the Kubernetes / OpenShift resource files.
1. Follow the [installation instructions](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/1.2.x/installation-and-setup/install/helm-chart-installation/installation/#installation) until the deployment part.
2. Run the following command to generate the Kubernetes / OpenShift resource files and write them in a file `rasa-x-deployment.yml`:
- Locally
- Using Docker
```bash
helm repo add rasa-x https://rasahq.github.io/rasa-x-helm
helm repo update
helm template \
--namespace <your namespace> \
--values values.yml \
<your release name> \
rasa-x/rasa-x > rasa-x-deployment.yml
```
3. You can then deploy these manually by running:
- Kubernetes
- OpenShift
```bash
kubectl --namespace <your namespace> \
create -f rasa-x-deployment.yml
```
## Next Steps
- [Connect a Custom Action Server](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/1.2.x/installation-and-setup/configure/add-action-server) if you are using custom actions.
- [Set up Integrated Version Control](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/1.2.x/installation-and-setup/post-deploy-steps/set-up-ivc) to connect your Rasa Enterprise instance to a remote Git repository.
- [Set up a CI/CD pipeline](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/1.2.x/installation-and-setup/post-deploy-steps/set-up-ci-cd) using Rasa Enterprise.
- [Deploy a model](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/1.2.x/installation-and-setup/post-deploy-steps/train-upload-model) using Rasa Enterprise.
- [Configure SSL](https://legacy-docs-enterprise.rasa.com/docs/rasa-enterprise/1.2.x/installation-and-setup/configure/tls) if you’d like to run your Rasa Enterprise server on HTTPS.