diff --git a/docs/docs/installation/rasa-pro/installation.mdx b/docs/docs/installation/rasa-pro/installation.mdx index afb86e5497d9..34df14d6a966 100644 --- a/docs/docs/installation/rasa-pro/installation.mdx +++ b/docs/docs/installation/rasa-pro/installation.mdx @@ -34,28 +34,44 @@ Installing Rasa Pro instead of Rasa Open Source will not break any existing scri ### Python Package Installation -The Rasa Pro python package is named `rasa-plus`. The `rasa-plus` python packages as well as the docker containers are hosted on our GCP artifact registry. +The Rasa Pro python package is named `rasa-plus`. The `rasa-plus` python packages as well as the Docker containers are hosted on our GCP Artifact Registry. As a prerequisite, you will need: -- to [install](https://cloud.google.com/sdk/docs/install) and [initialize](https://cloud.google.com/sdk/docs/initializing) the Google Cloud CLI. +- to [install](https://cloud.google.com/sdk/docs/install) the Google Cloud CLI. - to verify that the user or service account you are using has the required permissions to access the repository. #### Authentication Set-Up +To authenticate you need use a service account key file provided by Rasa to authenticate with Google Cloud. -In order for the package manager of choice (e.g, `pip` or `poetry`) to have the necessary credentials to authenticate with the registry, follow the steps in the [Google documentation](https://cloud.google.com/artifact-registry/docs/python/authentication#keyring). +Authenticate with GCP using the service account key. -Where required, input the following parameters: +```sh +gcloud auth activate-service-account --key-file=service-account.json +``` + +Set up keyring to allow Pip to authenticate with GCP Artifact Registry by installing keyring and then the backend that supports GCP Artifact Registry ```sh -gcloud artifacts print-settings python \ - --project=rasa-releases \ - --repository=rasa-plus-py \ - --location=europe-west3 +pip install keyring +pip install keyrings.google-artifactregistry-auth +``` + +Verify that the backends have been installed correctly + +```sh +keyring --list-backends ``` +The results should include `ChainerBackend` and `GooglePythonAuth`. + + #### Installing with `pip` -Enter the following settings to the `.pypirc` file: +Enter the following settings to the `.pypirc` file. This can be found: + +- Linux and MacOS: `$HOME/.pypirc` +- Windows: `%USERPROFILE%\.pypirc` + ``` [distutils] @@ -67,7 +83,19 @@ repository: https://europe-west3-python.pkg.dev/rasa-releases/rasa-plus-py/ ``` -Next, add these specific settings to the pip configuration file as instructed in the [GCP authentication documentation](https://cloud.google.com/artifact-registry/docs/python/authentication#keyring-setup): +Next, add these specific settings to the pip configuration file. The location for this depends on whether you want to update the per-user file or the file specific to a virtual environment that you are using. + +For the file associated with your operating system user: + +- Linux: `$HOME/.config/pip/pip.conf` or `$HOME/.pip/pip.conf` +- MacOS: `/Library/Application Support/pip/pip.conf` or `$HOME/.config/pip/pip.conf` +- Windows: `%APPDATA%\pip\pip.ini` or `%USERPROFILE%\pip\pip.ini` + +For virtual environments: + +- Linux and macOS: `$VIRTUAL_ENV/pip.conf` +- Windows: `%VIRTUAL_ENV%\pip.ini` + ``` [global] @@ -79,7 +107,7 @@ Finally, you should be able to run `pip install rasa-plus`. #### Installing with `poetry` -To install `rasa-plus` with `poetry`, you will need to associate the artifact registry URL with `rasa-plus` before installing it. +To install `rasa-plus` with `poetry`, you will need to associate the Artifact Registry URL with `rasa-plus` before installing it. Note that you must upgrade poetry to the latest minor (`1.2.0`) in order for `poetry` to work with the GCP authentication set-up. Proceed with the following steps: @@ -100,20 +128,40 @@ secondary = true ### Docker Image Installation -The Rasa Pro docker image is named `rasa-plus`. The docker images are hosted on our GCP artifact registry. +The Rasa Pro Docker image is named `rasa-plus`. The Docker images are hosted on our GCP Artifact Registry. As a prerequisite, you will need: -- to [install](https://cloud.google.com/sdk/docs/install) and [initialize](https://cloud.google.com/sdk/docs/initializing) the Google Cloud CLI. +- to [install](https://cloud.google.com/sdk/docs/install) the Google Cloud CLI. - to verify that the user or service account you are using has the required permissions to access the repository. -To be able to pull the docker image you need use a key file provided by Rasa to authenticate with google cloud. +To authenticate you need use a service account key file provided by Rasa to authenticate with Google Cloud. ```bash gcloud auth activate-service-account --key-file=${KEYFILE} -gcloud auth list +gcloud auth configure-docker europe-west3-docker.pkg.dev docker pull europe-west3-docker.pkg.dev/rasa-releases/rasa-plus/rasa-plus ``` +### Using An Intermediate Repository +If you are using your own intermediate repository to cache libraries or dependencies (such as Artifactory or Nexus Repository Manager), you may need to generate a set of static credentials that allow you to authenticate with GCP Artifact Registry. + +As a prerequisite, you will need: + +- to [install](https://cloud.google.com/sdk/docs/install) the Google Cloud CLI. +- to verify that the user or service account you are using has the required permissions to access the repository. + +To generate your credentials, run: + +```sh +gcloud artifacts print-settings python \ + --project=rasa-releases \ + --repository=rasa-plus-py \ + --location=europe-west3 \ + --json-key=service-account.json +``` + +Your credentials can be found in the output. The username will be `_json_key_base64` and the password will be a long, base64 encoded string. + ### Runtime Configuration Rasa Pro will look for your license in the env var `RASA_PRO_LICENSE`. diff --git a/docs/docs/installation/rasa-pro/rasa-pro-artifacts.mdx b/docs/docs/installation/rasa-pro/rasa-pro-artifacts.mdx index af779bd4c076..51618122f1f0 100644 --- a/docs/docs/installation/rasa-pro/rasa-pro-artifacts.mdx +++ b/docs/docs/installation/rasa-pro/rasa-pro-artifacts.mdx @@ -12,7 +12,7 @@ import RasaProBanner from "@theme/RasaProBanner"; -- **Rasa Pro**, a drop-in replacement for Rasa Open Source enterprise +- **Rasa Pro**, a drop-in replacement for Rasa Open Source - **Rasa Pro Services**, flexible infrastructure and APIs on top of Rasa Open Source. Rasa Pro Services should be deployed alongside, but separately from your production assistant.