Skip to content

Commit

Permalink
add environement variables reference
Browse files Browse the repository at this point in the history
  • Loading branch information
m-vdb committed Oct 4, 2023
1 parent 0db6a69 commit 92d5506
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 17 deletions.
7 changes: 7 additions & 0 deletions docs/docs/deploy/deploy-action-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -378,3 +378,10 @@ b. Upgrade the Rasa deployment
helm upgrade -n <namespace> --reuse-values -f rasa-values.yaml \
<release name> rasa/rasa
```

:::info Configuration through environment variables

The Rasa Action Server docker container supports configuration through
[several environment variables](./environment-variables.mdx#rasa-sdk).

:::
20 changes: 4 additions & 16 deletions docs/docs/deploy/deploy-rasa-pro-services.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,24 +108,12 @@ These different services need to be run and configured to be able to communicate
For production deployments, we recommend to us
[Amazon Elastic Container Service](https://docs.docker.com/cloud/ecs-integration/).

### Docker Container Configuration (Reference)
:::info Configuration through environment variables

The Rasa Pro Services docker container supports configuration through
several environment variables. The following table lists the available
environment variables:

| Environment Variable | Description | Default |
| :------------------------ | :-------------------------------------------------------------------------------------------------------------------- | :----------------- |
| `RASA_PRO_LICENSE` | **Required**. The license key for Rasa Pro Services. | |
| `KAFKA_BROKER_ADDRESS` | **Required**. The address of the Kafka broker. | |
| `KAFKA_TOPIC` | **Required**. The topic Rasa Plus publishes events to and Rasa Pro consumes from. | `rasa_core_events` |
| `LOGGING_LEVEL` | Set the log level of the application. Valid levels are DEBUG, INFO, WARNING, ERROR, CRITICAL. (Available from 3.0.2) | `INFO` |
| `RASA_ANALYTICS_DB_URL` | The URL of the data lake to store analytics data in. | |
| `KAFKA_SASL_MECHANISM` | The SASL mechanism to use for authentication. Valid mechanisms are | `PLAIN` |
| `KAFKA_SASL_USERNAME` | The username for SASL authentication. | |
| `KAFKA_SASL_PASSWORD` | The password for SASL authentication. | |
| `KAFKA_SECURITY_PROTOCOL` | The security protocol to use for communication with Kafka. Supported mechanisms are `PLAINTEXT` and `SASL_PLAINTEXT`. | `PLAINTEXT` |
| `KAFKA_SSL_CA_LOCATION` | The filepath for SSL CA Certificate that will be used to connect with Kafka (Available from `3.1.0b1`) | |
[several environment variables](./environment-variables.mdx#rasa-pro-services).

:::

### Healthcheck Endpoint

Expand Down
9 changes: 8 additions & 1 deletion docs/docs/deploy/deploy-rasa.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ the image name. You will also need to pass your license in an env var
and [specify a pull secret for the image](#step-1-image-pull-secret).

#### Security Patch Releases
Beginning with Rasa Plus 3.4.0, we release a new Docker image for supported versions each day at 0800 UTC. These images have OS security patches applied and include the date of generation in their tag in the format `YYYYMMDD`.
Beginning with Rasa Plus 3.4.0, we release a new Docker image for supported versions each day at 0800 UTC. These images have OS security patches applied and include the date of generation in their tag in the format `YYYYMMDD`.
For example, to use the 3.4.2 image generated on the 1st of February 2023, use the tag `3.4.2-20230201`. These images can optionally be used as a drop-in replacement for the same version of Rasa Plus, but with all OS security updates up to that date applied.

#### Step 1: image pull secret
Expand Down Expand Up @@ -265,6 +265,13 @@ Step c: Remove the file on disk, for example:

#### Step 3: update `values.yml`

:::info Configuration through environment variables

The Rasa Pro docker container supports configuration through
[several environment variables](./environment-variables.mdx#rasa-pro-and-rasa-open-source).

:::

For the [Rasa Helm Chart](https://github.com/RasaHQ/helm-charts/tree/main/charts/rasa), update as follows:

```yaml
Expand Down
131 changes: 131 additions & 0 deletions docs/docs/deploy/environment-variables.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
---
id: environment-variables
title: Adding Environment Variables
abstract: |
Rasa offers advanced configuration through environment variables.
Find the full reference here.
---

import RasaProLabel from "@theme/RasaProLabel";

To add extra environment variables to your containers, add the
environment variable to an `extraEnvs` array on the service in your `values.yml`. These
values can be provided directly or refer to [secrets](../production/secrets-managers.mdx).
The `extraEnvs` parameter is available for all services.
For example:

```yaml
# rasa: Settings common for all Rasa containers
rasa:
# other configured parameters
# ...
extraEnvs:
- name: "LOG_LEVEL"
value: "warning"
```
## Rasa Pro and Rasa Open Source
When running Rasa Pro, the `RASA_PRO_LICENSE` environement variable needs to contain

Check warning on line 29 in docs/docs/deploy/environment-variables.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

environement

"environement" is a typo. Did you mean "environment"?
the Rasa Pro license key.

### Backing services

| Environment Variable | Description | Default |
| :-------------------------------- | :-------------------------------------------------------------------------------------------------------------------- | :----------------- |
| `POSTGRESQL_SCHEMA` | The postgres schema for the [`SQLTrackerStore`](../production/tracker-stores.mdx#sqltrackerstore). | `"public"` |

Check warning on line 36 in docs/docs/deploy/environment-variables.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

sqltrackerstore

"sqltrackerstore" is a typo. Did you mean "ultraconservative"?
| `POSTGRESQL_POOL_SIZE` | The limit of the number of open connections for the [`SQLTrackerStore`](../production/tracker-stores.mdx#sqltrackerstore). | `50` |

Check warning on line 37 in docs/docs/deploy/environment-variables.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

sqltrackerstore

"sqltrackerstore" is a typo. Did you mean "ultraconservative"?
| `POSTGRESQL_MAX_OVERFLOW` | The [maximum overflow](https://docs.sqlalchemy.org/en/13/core/pooling.html#sqlalchemy.pool.QueuePool.params.max_overflow) of pool size for the [`SQLTrackerStore`](../production/tracker-stores.mdx#sqltrackerstore). | `100` |

Check warning on line 38 in docs/docs/deploy/environment-variables.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

sqltrackerstore

"sqltrackerstore" is a typo. Did you mean "ultraconservative"?
| `RABBITMQ_SSL_CLIENT_CERTIFICATE` | The path to the SSL client certificate for the [`PikaEventBroker`](../production/event-brokers.mdx#pika-event-broker). | |
| `RABBITMQ_SSL_CLIENT_KEY` | The path to the SSL client key for the [`PikaEventBroker`](../production/event-brokers.mdx#pika-event-broker). | |
| `RASA_ENVIRONMENT` | The Rasa environement for the [`PikaEventBroker`](../production/event-brokers.mdx#pika-event-broker) and the [`KafkaEventBroker`](../production/event-brokers.mdx#kafka-event-broker). | |

Check warning on line 41 in docs/docs/deploy/environment-variables.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

environement

"environement" is a typo. Did you mean "environment"?
| `SECRET_MANAGER` | <RasaProLabel /> The type of [secret manager](../production/secrets-managers.mdx). | `"vault"` |
| `TICKET_LOCK_LIFETIME` | The lifetime of ticket locks, in seconds. It configures the [lock store](../production/lock-stores.mdx). | `60` |
| `VAULT_URL` | <RasaProLabel /> The URl of the [HashiCorp Vault](../production/secrets-managers.mdx#hashicorp-vault-secrets-manager). | |

Check warning on line 44 in docs/docs/deploy/environment-variables.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

HashiCorp

"HashiCorp" is a typo. Did you mean "HashCorp"?
| `VAULT_TOKEN` | <RasaProLabel /> The token to authenticate to the [HashiCorp Vault](../production/secrets-managers.mdx#hashicorp-vault-secrets-manager). | |

Check warning on line 45 in docs/docs/deploy/environment-variables.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

HashiCorp

"HashiCorp" is a typo. Did you mean "HashCorp"?
| `VAULT_NAMESPACE` | <RasaProLabel /> The namespace of the [HashiCorp Vault](../production/secrets-managers.mdx#hashicorp-vault-secrets-manager). | |

Check warning on line 46 in docs/docs/deploy/environment-variables.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

HashiCorp

"HashiCorp" is a typo. Did you mean "HashCorp"?
| `VAULT_RASA_SECRETS_PATH` | <RasaProLabel /> The path to Rasa secrets in the [HashiCorp Vault](../production/secrets-managers.mdx#hashicorp-vault-secrets-manager). | `"rasa-secrets"` |

Check warning on line 47 in docs/docs/deploy/environment-variables.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

HashiCorp

"HashiCorp" is a typo. Did you mean "HashCorp"?
| `VAULT_TRANSIT_MOUNT_POINT` | <RasaProLabel /> The mount point of the [HashiCorp Vault](../production/secrets-managers.mdx#hashicorp-vault-secrets-manager). | |

Check warning on line 48 in docs/docs/deploy/environment-variables.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

HashiCorp

"HashiCorp" is a typo. Did you mean "HashCorp"?

### Model Storage

Environment variables that configure model storage on cloud providers are described in the following sections:
- [Amazon S3 Storage](../production/model-storage.mdx#amazon-s3-storage)
- [Google Cloud Storage](../production/model-storage.mdx#google-cloud-storage)
- [Azure Storage](../production/model-storage.mdx#azure-storage)

### Dialogue Management

| Environment Variable | Description | Default |
| :------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------- |
| `RASA_DUCKLING_HTTP_URL` | The URL of the Duckling service powering the [`DucklingEntityExtractor`](../nlu-based-assistants/components.mdx#ducklingentityextractor). | |
| `MAX_NUMBER_OF_PREDICTIONS` | The maximum of predictions after each user message. See [Action Selection](../concepts/policies.mdx#action-selection). | `10` |
| `TF_GPU_MEMORY_ALLOC` | GPU configuration for TensorFlow. See [Configuring TensorFlow](../nlu-based-assistants/tuning-your-model.mdx#configuring-tensorflow). | |
| `TF_INTER_OP_PARALLELISM_THREADS` | The number of threads used for parallelism between independent operations in TensorFlow. See [Configuring TensorFlow](../nlu-based-assistants/tuning-your-model.mdx#configuring-tensorflow). | |
| `TF_INTRA_OP_PARALLELISM_THREADS` | The number of threads used within an individual TensorFlow operation for parallelism. See [Configuring TensorFlow](../nlu-based-assistants/tuning-your-model.mdx#configuring-tensorflow). | |
| `TF_DETERMINISTIC_OPS` | Configures TensorFlow ops to run deterministically. See [Configuring TensorFlow](../nlu-based-assistants/tuning-your-model.mdx#configuring-tensorflow). | `false` |

### Observability

| Environment Variable | Description | Default |
| :--------------------------- | :---------------------------------------------------------------------------------------------------------------- | :-------- |
| `LOG_LEVEL` | The log level for Rasa and Rasa Pro. | `"INFO"` |
| `LOG_LEVEL_LIBRARIES` | The log level for 3rd-party libraries. More info [here](../command-line-interface.mdx#log-level). | `"ERROR"` |
| `LOG_LEVEL_KAFKA` | The log level for `kafka` library. More info [here](../command-line-interface.mdx#log-level). | `"ERROR"` |
| `LOG_LEVEL_RABBITMQ` | The log level for `rabbitmq` library. More info [here](../command-line-interface.mdx#log-level). | `"ERROR"` |
| `LOG_LEVEL_FAKER` | The log level for `faker` library. More info [here](../command-line-interface.mdx#log-level). | `"ERROR"` |
| `LOG_LEVEL_PRESIDIO` | <RasaProLabel /> The log level for `presidio` library. More info [here](../command-line-interface.mdx#log-level). | `"ERROR"` |
| `RASA_TELEMETRY_ENABLED` | Toggle telemetry reporting. More info [here](../telemetry/telemetry.mdx) | `true` |
| `RASA_TELEMETRY_DEBUG` | Toggle debug information for telemetry reporting. | `false` |
| `RASA_PRO_TELEMETRY_ENABLED` | <RasaProLabel /> Toggle telemetry reporting. More info [here](../telemetry/telemetry.mdx) | `true` |
| `RASA_PRO_TELEMETRY_DEBUG` | <RasaProLabel /> Toggle debug information for telemetry reporting. | `false` |
| `TRACING_SERVICE_NAME` | <RasaProLabel /> The top-level service name when sending traces. More info [here](../operating/tracing.mdx) | `"rasa"` |

### Studio

| Environment Variable | Description | Default |
| :------------------------------- | :-------------------------- | :-------- |
| `RASA_STUDIO_AUTH_SERVER_URL` | <RasaProLabel /> TBD | |
| `RASA_STUDIO_CLI_STUDIO_URL` | <RasaProLabel /> TBD | |
| `RASA_STUDIO_CLI_REALM_NAME_KEY` | <RasaProLabel /> TBD | |
| `RASA_STUDIO_CLI_CLIENT_ID_KEY` | <RasaProLabel /> TBD | |

### Advanced configuration
| Environment Variable | Description | Default |
| :--------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------- |
| `RASA_MAX_CACHE_SIZE` | The maximum size of the training cache, in MB. | `1000` |
| `RASA_CACHE_NAME` | The filename of the training cache. | `"cache.db"` |
| `RASA_CACHE_DIRECTORY` | The directory for the training cache. | `".rasa/cache/"` |
| `RASA_SHELL_STREAM_READING_TIMEOUT_IN_SECONDS` | The stream reading timeout for [`rasa shell`](../command-line-interface.mdx#rasa-shell), in seconds. | `10` |
| `SANIC_BACKLOG` | The number of unaccepted connections that the [HTTP server](../production/http-api.mdx) and [NLG server](../production/nlg.mdx) will allow before refusing new connections. | `100` |
| `SANIC_WORKERS` | The number of HTTP workers when enabling the [HTTP server](../production/http-api.mdx). | `1` |

## Rasa Pro Services

The Rasa Pro Services docker container supports configuration through
several environment variables. The following table lists the available
environment variables:

| Environment Variable | Description | Default |
| :------------------------ | :-------------------------------------------------------------------------------------------------------------------- | :----------------- |
| `RASA_PRO_LICENSE` | **Required**. The license key for Rasa Pro Services. | |
| `KAFKA_BROKER_ADDRESS` | **Required**. The address of the Kafka broker. | |
| `KAFKA_TOPIC` | **Required**. The topic Rasa Plus publishes events to and Rasa Pro consumes from. | `rasa_core_events` |
| `LOGGING_LEVEL` | Set the log level of the application. Valid levels are DEBUG, INFO, WARNING, ERROR, CRITICAL. (Available from 3.0.2) | `INFO` |
| `RASA_ANALYTICS_DB_URL` | The URL of the data lake to store analytics data in. | |
| `KAFKA_SASL_MECHANISM` | The SASL mechanism to use for authentication. Valid mechanisms are | `PLAIN` |
| `KAFKA_SASL_USERNAME` | The username for SASL authentication. | |
| `KAFKA_SASL_PASSWORD` | The password for SASL authentication. | |
| `KAFKA_SECURITY_PROTOCOL` | The security protocol to use for communication with Kafka. Supported mechanisms are `PLAINTEXT` and `SASL_PLAINTEXT`. | `PLAINTEXT` |
| `KAFKA_SSL_CA_LOCATION` | The filepath for SSL CA Certificate that will be used to connect with Kafka (Available from `3.1.0b1`) | |

## Rasa SDK

The Rasa SDK docker container supports configuration through
several environment variables. The following table lists the available
environment variables:

| Environment Variable | Description | Default |
| :---------------------------- | :-------------------------------------------------------------------------------------------------------------------- | :------ |
| `ACTION_SERVER_SANIC_WORKERS` | The number of Sanic HTTP workers in the Action server. | `1` |
| `LOG_LEVEL_LIBRARIES` | The log level of third-party libraries. See [Log level configuration](../command-line-interface.mdx#log-level). | `ERROR` |
1 change: 1 addition & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ module.exports = {
"deploy/deploy-rasa",
"deploy/deploy-action-server",
"deploy/deploy-rasa-pro-services",
"deploy/environment-variables",
],
},
"production/load-testing-guidelines",
Expand Down

0 comments on commit 92d5506

Please sign in to comment.