When to Deploy
As emphasized in the guide to sharing your assistant, it’s important to give your prototype to users to test as early as possible. To do so, you need to deploy your assistant to one or more channels.
Share Your Bot Deployment
Share your bot is one of two built-in channels in Rasa X, the other being Talk to your Bot. You should deploy your bot to guest testers using the Share your bot feature in Rasa X as soon as you have a minimum viable assistant (a basic assistant that can handle the most important happy path stories).
Share your bot makes it easy to share your assistant without having any external channels connected. It therefore makes sense to deploy your assistant via the Share your bot feature before sharing it on any other channel.
External Channel Deployment
You should deploy your assistant to external text or voice channels once you’ve done a first round of testing using Rasa-X’s built in channels. An external channel introduces some additional complexity, which is easier to troubleshoot and test once you have some idea of how your assistant behaves.
Before You Deploy
The most successful product teams using Rasa apply software engineering best practices to developing their assistants, including:
Versioning training data and action code in Git
Reviewing changes before they go into production
Running automated tests on proposed changes
If you already have a running Rasa Open Source deployment and you just want to connect it to Rasa X, see the Connect an Existing Deployment.
Integrated Version Control
Integrated Version Control encourages best practices by integrating itself into your existing development workflows. It lets you automate data synchronization with your Git repository, annotate new data and push those changes with Git.
In order to connect Rasa X with your assistant’s Git repository, you will need two things:
A Rasa X instance running in server mode (local mode does not support Integrated Version Control)
A Git repository containing a project in the default Rasa Open Source project layout
When you connect your remote Git repository to Rasa X it will overwrite the training data which is currently stored in Rasa X. Please use a fresh Rasa X instance or export your training data if you want to keep the old training data.
For Rasa X to correctly visualize and modify your AI assistant’s data, your project needs to follow the default Rasa Open Source project layout created by rasa init:
Connect a Git Repository
You can connect your Git repository via the Rasa X UI. Rasa X currently only supports the GitHub, GitLab, and Bitbucket git platforms.
If you prefer to provide your own SSH keys, please see Integrated Version Control: Connecting a Repository via the API.
To connect your Git repository, click on the branch icon and click Connect to a repository.
Configure the repository connection.
Rasa X can connect to a git repository via an SSH URL. Rasa Enterprise can connect over either SSH or HTTPS, and supports two-factor authentication for HTTPS connections.
Add your SSH URL for repository in the input field.
- HTTPS (Enterprise only)
Configure your credentials.
Add the provided public SSH key to your Git server. This allows Rasa X to authenticate with the Git server using its private SSH key. Please make sure to only give the key access to one specific repository instead of giving it global access to all of your Git repositories. For instructions specific to your Git platform, see below.
- HTTPS (Enterprise only)
Add the generated public SSH key as a
Deploy keyto your GitHub repository. See the GitHub docs for more information on how to do so.
Add the generated public SSH key as a
Deploy keyto your GitLab repository. See the GitLab docs for more information on how to do so.
Add the generated public SSH key as an
Access keyto your Bitbucket repository. See the Bitbucket docs for more information on how to do so.
Configure the repository branch.
Target branch: The target branch is the branch that Rasa X will:
Use to show the initial data.
Branch off from when you make new changes.
Return to after you discard or push changes.
By default users can choose if they want to push their changes directly to the target branch or to a new branch. If want to disable pushing changes directly to the target branch, select Require users to add changes to a new branch.
Once you have configured the repository credentials and the branch options, hit the
Verify Connectionbutton. Rasa X will now show that it is connected to your repository.
Set Up Initial CI/CD
When improving your assistant, you’ll make different kinds of fixes to your bot. To automate the testing and integration of these improvements into your deployed assistant, you should set up a CI/CD (Continuous Integration/Continuous Deployment) pipeline on your connected git repository.
For example, you could add a step in your pipeline that pushes a newly trained model to Rasa X everytime a change is merged into your main branch. For more information on setting up a CI/CD pipeline, check out the Rasa Open Source user guide on CI/CD.
Here are a few examples of CI/CD pipelines in Github Actions to get you started:
The rasa-demo CI/CD pipeline includes the following steps; some are conditional:
Lints and type-tests the action code
Validates the data
Runs NLU cross-validation
Trains a model
Tests the model on test conversations
Builds and tags an action image
Pushes the action image to a private Google Cloud Container Registry
This example includes some of the steps above, but with fewer conditions:
This example includes the steps above, but also includes steps to create an AWS EKS cluster and deploy the bot there:
How to Deploy
To deploy your assistant using Rasa X you need to:
Train or upload a trained model and tag it as active/production
Connect your custom action server if you’re using any custom actions
Set up your external channels when you want to make them available
If you already have a running Rasa Open Source deployment and you just want to connect it to Rasa X, see the guide on connecting Rasa Open Source to Rasa X / Enterprise.
Deploy Rasa Open Source and connect it with Rasa X
You will need to connect your deployment to a Rasa Open Source server to deploy your assistant.
If you deployed Rasa X / Enterprise using the Rasa Ephemeral Installer, you have the option to connect a locally running Rasa Open Source server to a Rasa X / Enterprise deployment on the same machine. This option is intended only for testing your assistant locally and is not a production set up.
To set up a production environment, please see the Rasa Open Source docs for deployment instructions. Once you have a production-ready Rasa Open Source server deployed, see the instructions for connecting a Rasa Open Source server to Rasa X / Enterprise.
Train/Upload a Model
You can upload a model to Rasa X either using the UI,
using the HTTP API, or
If you have Integrated Version Control set up, you can also train a model from within Rasa X.
To deploy your trained model, you need to tag it as
active (Rasa X) or
production (Rasa Enterprise).
Once you have a model available on the Models screen, you can either tag the model using the UI,
tag it via the HTTP API, or use
Note that for both Rasa X and Rasa Enterprise, you need to use the
production tag when tagging via the HTTP API.
In the long term, you should consider automating training, uploading, and tagging a model as part of a CI/CD pipeline.
Connect Your Custom Action Server
If you have written any custom actions, you need to connect your action server to your Rasa X deployment. Follow the instructions for the installation method you used:
Connect External Channels
For details on setting up external channels, see the Rasa Open Source docs.
Once set up, connecting an external channel is a matter of adding the credentials in the right place. See the instructions for adding channel credentials for details.