Search
  • Manas Mohanty

Deploying a server for Rasa X chatbot

How to Create a server for Rasa X

To serve users through Rasa X ,You need a online server which is feasible through Virtual machines.

Virtual machines are like your desktop or laptops with an operating Sytem ,It may be ubuntu,windows.

You can create virtual machines in Azure,Google cloud ,IBM etc.In this tutorial , I have explained how to create Virtual machine in Google cloud.

Configuring Google cloud

1.Go to https://cloud.google.com/ and log in with your gmail account.

2.Go to console and Enable billing to use cloud services worth 300$ valid for 1 year

3.Clicking on Billing will ask you a credit card verification and incur only 2 rs to user for verification.

4.After billing is done, You can choose Compute Engine from menu.

5.Type a name for your virtual machine at top. Select Zone nearest to your place.

(When I choose Asia south east –mumbai ,it did work saying not having enough facilitiy,So I choose Asia south east –Singapore)

6.Select N1 ,2 cpu for 7.5 Gb ram and select Ubunutu 18 or 19 as per your local machine configuration.

(I tried Ubunutu 16 as per Video instruction ,Training and model upload did not work)

7.Choose http and https traffic incoming and Hit and Create.

8.It will take some minutes to create the VM with a External IP address.

(attach images of billing , selecting an os ,zone selection)

9.I also used to putty gen to create SSH keys to access through




Configuring installation on Virtual Machine

1. I followed this article “https://rasa.com/docs/rasa-x/installation-and-setup/docker-compose-script/” for installing Rasa x in Virtual machine through Docker-compose

2. Download and run the install script of Rasa X on the server

curl -sSL -o install.sh https://storage.googleapis.com/rasa-x-  releases/0.28.4/install.sh
(downloads the Rasa –X repo)

sudo bash ./install.sh

(install the Repo with root permission)

3. Start Rasa X

cd /etc/rasa
sudo docker-compose up –d
(pulls the docker container which has necessary setup instructions for installing database and other requirments)

4. Set your Admin Password

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

(password is necessary to accessing the external ip address)

Connecting and Training the Rasa X server through Remote Github Repo

1.Once the Server is Ready ,Click on the external Ip and Remove “S” from “https://< external ip adress> “ to “http:<external ip address>” to access the rasa x server.

2.Click on Connect to remote repository icon . It will ask your Github URL containing Rasa Assisant files.

And branch .Paste the SSH-Key in Deploy key section of Settings with a name and commit for changes.

3.Click on Verification in interface which showed your Github Url and mention branch as “master” if you don’t have multiple branches of Github file.

4.Once Synced with your Github project , You need to import models too. You can import directly from your computer ( It takes time for larger files )

5.Train and modify and save the changes in github repository too.

6.If you are using custom actions , Go to article mentioned above further details.

Notes

Server was jumping and needed to refresh three times when I shared it to others for testing purpose.

We are planning to deploy in kubernetes cluster as it has load balancing features and it does not crash due to multiple container.

Here is my Github link

https://github.com/coeaimrm/cetchatbot




56 views