Rasa X

Rasa X Install

Posted by Greg Stephens on August 12, 2019 · 3 mins read

Rasa X

Rasa X provides a compelling bot platform based on the open source Rasa 1.0. There’s a great in-depth video by Justina Petraitytė.

The Rasa docs describe two approaches to running Rasa X. A simple setup described here and a “Server” setup described here. As of this writing, I find the server setup to be convoluted with many python related pitfalls. Hopefully, this will improve with a more straightforward Docker driven process.

I have some existing bots that I now want to use with Rasa X. But, let’s start with the install.

Rasa X “Server” Setup

I’m going to use the server install because I want this setup to run under Docker. Follow the instructions described in the link. You will download and run an install.sh script. The install script does the following:

  • Install python & pip
  • Install ansible
  • Setup docker role
  • Run ansible playbook for Rasa X

It then runs an ansible playbook does a bunch of steps:

  • Set RASA_HOME to /etc/rasa if not already set
  • Create /etc/rasa and subdirectories for log, scripts, etc.
  • Create environments.yml, credentials.yml, endpoints.yml
  • Download docker-compose files, rasa_x_commands.py

I want Rasa X to install in a specific directory, so I’m going to set RASA_HOME before running install. Here are the steps in a nutshell.

export RASA_HOME=/home/greg/rasax
curl -sSL -o install.sh https://storage.googleapis.com/rasa-x-releases/stable/install.sh
sudo -E bash ./install.sh

After the script completes, you should find a directory structure like this in RASA_HOME:

├── auth
├── certs
├── credentials
├── credentials.yml
├── db
├── docker-compose.yml
├── endpoints.yml
├── environments.yml
├── logs
├── models
├── rasa_x_commands.py
├── scripts
└── terms

Rasa X Startup

With Rasa X installed in RASA_HOME (/etc/rasa by default), use the following command to start it:

cd $RASA_HOME
sudo docker-compose up -d

On first time execution, set the admin user password:

sudo python rasa_x_commands.py create --update admin me PASSWORD

You should now be able to connect to http://localhost:80

I have had the following issue with the Rabbit MQ container failing on subsequent starts.

/librabbitmq.sh: line 181: /opt/bitnami/rabbitmq/.rabbitmq/.erlang.cookie: Permission denied
rasa_rabbit_1 exited with code 1

Removing the container has gotten around the issue

docker container rm rasa_rabbit_1

In a follow-up post I will describe the process to migrate an existing bot to Rasa X.