Skip to main content

Setup

Prerequisites

Before you begin, you will need to have access to a Google Cloud Platform project - you can use an existing one but we recommend creating a new project to ensure there's no resource conflicts and you can easily track billing and access controls.

Within the project, your user will need to have the following roles, which you can check in the Google Cloud console under IAM & Admin > IAM:

  • Compute Admin
  • Service Networking Admin
  • Kubernetes Engine Admin
  • Cloud SQL Admin
  • Cloud Memorystore Redis Admin
  • DNS Administrator
  • Service Usage Admin

Alternatively, you can grant yourself the Owner or Editor role on the project which will be sufficient.

Your GCP project must be linked to a billing account to ensure that you can pay for the resources you deploy.

Finally, you must have a valid Rasa license key with entitlements for Rasa Pro and Rasa Studio.

Install Tools

Next, you'll need to install some tools on your local machine. If you already have these tools installed, please ensure they are updated to the latest version.

  • gcloud CLI allows you to interact with GCP to deploy the infrastructure. Installation instructions are here.
  • kubectl allows you to interact with the Kubernetes cluster you deploy to configure it. Installation instructions are here.
  • The gke-cloud-auth-plugin allows you to authenticate with your Google Kubernetes Engine cluster and interact with it using kubectl. Install if after you've set up gcloud with gcloud components install gke-gcloud-auth-plugin.
  • helm which allows you to deploy the Rasa products onto your cluster. Installation instructions are here.
  • envsubst which allows us to easily inject the values of environment variables into our deployment commands. This is included with most Linux distros and can be installed on MacOS with brew install gettext. Windows users can utilise it via Git Bash.

Once you've installed these tools, you should authenticate with GCP:

gcloud auth login

Specify Input Parameters

You'll need to configure some values which the rest of the deployment process will use. We'll configure these as environment variables - make sure you change these to values that are correct for your situation:

Begin by cloning our deployment-playbooks repo locally with:

git clone https://github.com/RasaHQ/rasa-deployment-playbooks.git

Next, open the file gcp/setup/environment-variables.sh and follow the instructions to edit the required values inside. Once you're happy with the values you've set, let's ensure these values are available for you to use in your shell throughout the rest of the playbook. Be especially sure to set all of the values in the first section to ensure you can proceed with the rest of the playbook. A valid Rasa Pro license key must also be set in here or the deployment steps will not work.

source gcp/setup/environment-variables.sh

Set Up gcloud CLI

Finally, let's set up the gcloud CLI for the rest of the deployment process:

gcloud config set project $PROJECT_ID
gcloud config set disable_prompts True

You can safely ignore a warning that says Your active project does not match the quota project in your local Application Default Credentials file. This might result in unexpected quota issues..

You can then validate your configuration with:

gcloud auth list
gcloud config list

You should see here that the active account is your Google user and that you're working in the correct project you expect.