OVERVIEW
In this blog and in our next few blogs, you will learn,
- How to create a VM instance on Microsoft Azure?
- How to deploy rasa x to Microsoft Azure?
- How to install rasa x on VM instance on Microsoft Azure?
- How to create an inbound ports for the VM instance on Microsoft Azure?
- How to link the git repository of rasa chatbot to rasa x on VM instance on Microsoft Azure?
- How to link the action server to the rasa x on VM instance on Microsoft Azure?
- How to install the custom dependencies for action server on Vm instance of Microsoft azure?
Like in our previous blog, you must have learnt that how you can create your VM instance on Microsoft Azure. In my case I have created a VM instance with Ubuntu 18.04 as my operating system. Now let’s start the second step to install rasa x on Vm instance.
install rasa x on VM instance
To install Rasa x on VM instance,firstly open your VM instance remotely as shown in the previous blog.
Now, that we have the remote access to the VM instance, now we can start installing Rasa x. Now type the first command to download and save install.sh script for latest version of rasa x on the current directory,
curl -sSL -o install.sh https://storage.googleapis.com/rasa-x-releases/0.39.3/install.sh
With this command you will download and save install.sh for rasa 0.39.3. Now you can check it on your current directory and start installing rasa x,
ls sudo bash ./install.sh
Now this script will install all the files and directories of rasa chatbot into the default directory, i.e., /etc/rasa. You can also modify this path, if you want to set the rasa home path to some other path then run the given commands instead,
export RASA_HOME=~/rasa/dir sudo -E bash ./install.sh # -E will preserve the environment variable you set
Now, change the directory to the rasa home and start up Rasa X with with the docker-compose command,
cd /etc/rasa sudo docker-compose up -d # here -d is to run in detach mode or in background
Now it will start to pull all the images to setup Rasa X. Now , wait for it to finish as it will take some time to install and start all the containers in background. Once all the containers are up and running now you can start and check the Rasa X with the public IP address of VM instance. If you want to stop all the services which is up and running then you can run the given command to stop them,
sudo docker-compose down
Now, you will be prompt to enter password to login to Rasa X on VM instance but currently we haven’t set any password. So, let’s setup the password to login to Rasa X.
cd /etc/rasa sudo python3 rasa_x_commands.py create --update admin me <password>
Note
If the above command generates an error saying the user doesn’t exist then run the given commands instead,
cd /etc/rasa
sudo docker-compose exec rasa-x bash -c “python3 /app/scripts/manage_users.py create me <password> admin –update”
For more clarification check out this video,
Now you can open Rasa X in the browser with the ip-address in this format,
http://<ip-address>:80/
Now you will get the output like this,
If you are not getting Rasa X opened then most probably you have not add any rule for inbound port for HTTP. To set it up, go to your VM instance on Azure account, then go to Networking > Add inbound security rule. Here, select HTTP from services drop down menu and let other options as it is. Click on Add to add the inbound port rule.
You have successfully added the Inbound port, now open the public IP address of Rasa X on VM instance with the above format again,
http://<ip-address>:80/
Now, you will be able to open Rasa X and to create a new chatbot or add the existing one. Now the next step is to create a new chatbot on rasa X or to connect the existing chatbot to the Rasa X on VM instance. All this we will learn in our next blog.
Time to wrap up now. Hope you liked our content on How to install Rasa X on VM instance on Microsoft Azure. See you in our next blog, thanks for reading our blog and do leave a comment below to help us improve the content to serve you all of our experience with you. Stay tuned with us for more rasa chatbot contents.
Also check out our other playlist Rasa Chatbot, Internet of things, Docker, Python Programming, etc.
Become a member of our social family on youtube here.