Deploying Your Rasa Assistant
These docs are for version 1.x of Rasa Open Source.
Deploying Your Rasa Assistant
This page explains when and how to deploy an assistant built with Rasa.
It will allow you to make your assistant available to users and set you up with a production-ready environment.
When to Deploy Your Assistant
The best time to deploy your assistant and make it available to test users is once it can handle the most
important happy paths or is what we call a minimum viable assistant.
The recommended deployment methods described below make it easy to share your assistant
with test users via the share your assistant feature in Rasa X.
Then, when you’re ready to make your assistant available via one or more Messaging and Voice Channels,
you can easily add them to your existing deployment set up.
Recommended Deployment Methods
The recommended way to deploy an assistant is using either the Server Quick-Install or Helm Chart
options we support. Both deploy Rasa X and your assistant. They are the easiest ways to deploy your assistant,
allow you to use Rasa X to view conversations and turn them into training data, and are production-ready.
For more details on deployment methods see the Rasa X Installation Guide.
Server Quick-Install
The Server Quick-Install script is the easiest way to deploy Rasa X and your assistant. It installs a Kubernetes
cluster on your machine with sensible defaults, getting you up and running in one command.
- Default: Make sure you meet the OS Requirements,
then run:curl -s get-rasa-x.rasa.com | sudo bash
- Custom: See Customizing the Script
and the Server Quick-Install docs docs.
Helm Chart
For assistants that will receive a lot of user traffic, setting up a Kubernetes or Openshift deployment via
our Helm charts is the best option. This provides a scalable architecture that is also straightforward to deploy.
However, you can also customize the Helm charts if you have specific requirements.
Default: Read the Helm Chart Installation docs.
Custom: Read the above, as well as the Advanced Configuration
documentation, and customize the open source Helm charts to your needs.
Alternative Deployment Methods
Docker Compose
You can also run Rasa X in a Docker Compose setup, without the cluster environment. We have an install script
for doing so, as well as manual instructions for any custom setups.
Default: Read the Docker Compose Install Script docs or watch the Masterclass Video on deploying Rasa X.
Custom: Read the Docker Compose Manual Install documentation for full customization options.
Rasa Open Source Only Deployment
It is also possible to deploy a Rasa assistant without Rasa X using Docker Compose. To do so, you can build your
Rasa Assistant locally or in Docker. Then you can deploy your model in Docker Compose.
- Building a Rasa Assistant Locally
- Building a Rasa Assistant in Docker
- Deploying a Rasa Open Source Assistant in Docker Compose
Deploying Your Action Server
Building an Action Server Image
If you build an image that includes your action code and store it in a container registry, you can run it
as part of your deployment, without having to move code between servers.
In addition, you can add any additional dependencies of systems or Python libraries
that are part of your action code but not included in the base rasa/rasa-sdk image.
To create your image:
- Move your actions code to a folder
actionsin your project directory.
Make sure to also add an emptyactions/__init__.pyfile:mkdir actions mv actions.py actions/actions.py touch actions/__init__.py # the init file indicates actions.py is a python moduleThe
rasa/rasa-sdkimage will automatically look for the actions inactions/actions.py.
You can then build the image via the following command:
docker build . -t <account_username>/<repository_name>:<custom_image_tag>
Using your Custom Action Server Image
If you’re building this image to make it available from another server,
for example a Rasa X or Rasa Enterprise deployment, you should push the image to a cloud repository.
You can push the image to DockerHub via:
docker login --username <account_username> --password <account_password> docker push <account_username>/<repository_name>:<custom_image_tag>
How you reference the custom action image will depend on your deployment. Pick the relevant documentation for
your deployment:
👋 I can help you get started with Rasa and answer your technical questions.