From c5d1627bcc18ed983db8e20945360326cb8c96c0 Mon Sep 17 00:00:00 2001 From: Colton Padden Date: Fri, 13 Dec 2024 14:02:20 -0500 Subject: [PATCH] replace sub-pages --- .../environment-variables/agent-config.md | 103 +++++++++++++++++- 1 file changed, 100 insertions(+), 3 deletions(-) diff --git a/docs/docs-beta/docs/dagster-plus/deployment/management/environment-variables/agent-config.md b/docs/docs-beta/docs/dagster-plus/deployment/management/environment-variables/agent-config.md index e059f15950a57..687bba7e826cf 100644 --- a/docs/docs-beta/docs/dagster-plus/deployment/management/environment-variables/agent-config.md +++ b/docs/docs-beta/docs/dagster-plus/deployment/management/environment-variables/agent-config.md @@ -53,7 +53,55 @@ How `container_context` is configured depends on the agent type. Click the tab f ### Amazon ECS agents - +Using the `container_context.ecs.env_vars` and `container_context.ecs.secrets` properties, you can configure environment variables and secrets for a specific code location. + +```yaml +# dagster_cloud.yaml + +locations: + - location_name: cloud-examples + image: dagster/dagster-cloud-examples:latest + code_source: + package_name: dagster_cloud_examples + container_context: + ecs: + env_vars: + - DATABASE_NAME=testing + - DATABASE_PASSWORD + secrets: + - name: "MY_API_TOKEN" + valueFrom: "arn:aws:secretsmanager:us-east-1:123456789012:secret:FOO-AbCdEf:token::" + - name: "MY_PASSWORD" + valueFrom: "arn:aws:secretsmanager:us-east-1:123456789012:secret:FOO-AbCdEf:password::" + secrets_tags: + - "my_tag_name" +``` + + + + + + + + + + + + + + + + + + + + + + + + + + After you've modified `dagster_cloud.yaml`, redeploy the code location in Dagster+ to apply the changes: @@ -72,7 +120,23 @@ After you've modified `dagster_cloud.yaml`, redeploy the code location in Dagste ### Docker agents - +Using the `container_context.docker.env_vars` property, you can include environment variables and secrets in the Docker container associated with a specific code location. For example: + +```yaml +# dagster_cloud.yaml +locations: + - location_name: cloud-examples + image: dagster/dagster-cloud-examples:latest + code_source: + package_name: dagster_cloud_examples + container_context: + docker: + env_vars: + - DATABASE_NAME + - DATABASE_USERNAME=hooli_testing +``` + +The `container_context.docker.env_vars` property is a list, where each item can be either `KEY` or `KEY=VALUE`. If only `KEY` is specified, the value will be pulled from the local environment. After you've modified `dagster_cloud.yaml`, redeploy the code location in Dagster+ to apply the changes: @@ -90,7 +154,40 @@ After you've modified `dagster_cloud.yaml`, redeploy the code location in Dagste ### Kubernetes agents - +Using the `container_context.k8s.env_vars` and `container_context.k8s.env_secrets` properties, you can specify environment variables and secrets for a specific code location. For example: + +```yaml +# dagster_cloud.yaml + +locations: + - location_name: cloud-examples + image: dagster/dagster-cloud-examples:latest + code_source: + package_name: dagster_cloud_examples + container_context: + k8s: + env_vars: + - database_name # value pulled from agent's environment + - database_username=hooli_testing + env_secrets: + - database_password +``` + + + + + + + + + + + + + + + + After you've modified `dagster_cloud.yaml`, redeploy the code location in Dagster+ to apply the changes: