rasactl is a command line interface tool (CLI) tool for deploying and managing Rasa X / Enterprise deployments.
note
rasactl is open-source and available in the rasactl repository. Please create an issue in this repository if you discover bugs or have suggestions for improvements.
You can use rasactl to:
Deploy Rasa X / Enterprise.
Upgrade or change the configuration of a Rasa X / Enterprise deployment.
Manage the lifecycle of a running Rasa X / Enterprise deployment.
You can start, stop or delete any Rasa X deployments managed by rasactl.
In addition, for deployments on a KIND cluster (see REI) you can:
Connect a local Rasa Open Source server to Rasa X / Enterprise;
rasactl will prepare configuration for Rasa Open Source and Rasa X and run the Rasa Open Source server on local machine.
This feature requires that a compatible version of Rasa Open Source is installed locally.
Use a local Rasa project with a Rasa X / Enterprise deployment;
You can connect to a local Rasa project instead of to a Git repository.
This setup was previously referred to as "local mode" in older Rasa X versions.
Using a local Rasa project requires Rasa X ≥ 1.0.0.
Below you can find several things that are good to know and keep in mind when you use rasactl.
It is possible to configure multiple deployments with rasactl. A rasactl command will always execute an operation on a single deployment. Here is the order in which rasactl determines which deployment to use:
A DEPLOYMENT-NAME passed as an argument in CLI, e.g. rasactl status deployment-name, you can use rasactl help command to see usage example for a given command.
rasactl checks if a .rasactl file exists in the current working directory. If so, the deployment defined in the file is used. This .rasactl file is created automatically when the rasactl start --project command is executed.
rasactl checks if a default deployment is configured in the rasactl.yaml configuration file, if yes, then the default deployment is used. The default deployment can be set by using the rasactl config use-deployment command.
If there is only one deployment, then it's used.
You can use the rasactl list command to check which deployment is used as the current one.
The rasactl delete command requires explicitly passing a DEPLOYMENT-NAME as an argument.
rasactl uses the Rasa X Helm chart to deploy Rasa X / Enterprise.
rasactl deploys Rasa X / Enterprise without a Rasa Open Source server. It's up to you to connect Rasa Open Source with Rasa X / Enterprise deployment.
rasactl uses the current Kubernetes context from the kubeconfig file. If you want to switch Kubernetes clusters you have to use kubectl or use the --kube-context flag to switch used context.
# Create a Rasa X deployment with a defined password.
$ rasactl start --rasa-x-password mypassword
# Create a Rasa X deployment that uses a local Rasa project.
# The command is executed in a Rasa project directory.
$ rasactl start --project
Flags:
--create create a new deployment. If --project or --project-path is set, or there is no existing deployment, the flag is not required to create a new deployment
-h, --help help for start
-p, --project use the current working directory as a project directory, the flag is ignored if --project-path is used
--project-path string absolute path to the project directory mounted in kind
--rasa-x-chart-version string a helm chart version to use
--rasa-x-edge-release use the latest edge release of Rasa X
--rasa-x-password string Rasa X password (default "rasaxlocal")
--rasa-x-password-stdin read the Rasa X password from stdin
--rasa-x-release-name string a helm release name to manage (default "rasa-x")
--values-file string absolute path to the values file
--wait-timeout duration time to wait for Rasa X to be ready (default 10m0s)
The delete command deletes a Rasa X / Enterprise deployment.
You can use the --prune flag to remove a namespace where Rasa X deployment is located.
Notice: If you want to free resources, or temporarily you don't need to run Rasa X deployment, you can stop a Rasa X / Enterprise deployment instead of deleting it. Stopping the Rasa X deployment will free resources, but keep the current configuration.
Usage:
rasactl delete DEPLOYMENT-NAME [flags]
Aliases:
delete, del
Examples:
# Delete the 'my-example' deployment.
$ rasactl delete my-example
# Prune the 'my-example' deployment, execute the command with the --prune flag deletes the whole namespace.
$ rasactl delete my-example --prune
Flags:
--force if true, delete resources and ignore errors
-h, --help help for delete
--prune if true, delete a namespace with a project
The * in the CURRENT field indicates a deployment that is used as default. It means that every time when you execute rasactl command without defining the deployment name, the deployment marked with * is used.
A deployment is marked as CURRENT if:
there is a .rasactl file that includes a deployment name in your current working directory. The file is automatically created if you run the rasactl start command with the --project or --project-path flag
there is only one deployment
you set the current deployment by using the rasactl config use-deployment command
Rasa Enterprise allows multiple versions of an assistant to be run simultaneously and served to different users. By default, two environments are defined:
production
worker
If you want to activate a model you have to tag it as 'production'. Learn more here.
Usage:
rasactl model tag [DEPLOYMENT-NAME] MODEL-NAME TAG [flags]
Examples:
# Tag the 'my-model' model as 'production' (use the currently active deployment)
$ rasactl model tag my-model production
# Tag the 'my-model' with the 'test' tag within the 'my-deployment' deployment.