-
If I am running Dagster in production in Docker, K8s, or ECS, how do I set different environment variables / secrets / volumes / task definitions / other deployment-related configuration for different code locations? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
In Kubernetes: (The Helm chart uses the same In ECS:
In Docker: For example:
|
Beta Was this translation helpful? Give feedback.
-
Sorry to reopen this discussion but I'm having trouble making my environment variables accessible to runs kicked off with the docker launcher using the I get the following error thrown from the daemon:
I'm confused by this for 2 reasons - 1, I have the
The content of the FC_DAGSTER_CONTAINER_CONTEXT={"docker": {"env_vars": ["ENV=DEV", "PG_HOST=__HIDDEN__", "PG_DATABASE=__HIDDEN__", "PG_PORT=__HIDDEN__", "PG_USER=__HIDDEN__", "PG_PASSWORD=__HIDDEN__", "PG_SCHEMA=__HIDDEN__", "PG_INTERMEDIATE_SCHEMA=__HIDDEN__", "FC_STORAGE_BUCKET=__HIDDEN__", "FC_LOCAL_BASE_PATH=__HIDDEN__", "SLACK_BOT_TOKEN=__HIDDEN__", "SLACK_ALERT_CHANNEL=__HIDDEN__", "DAGSTER_HOST=__HIDDEN__", "DBT_TARGET_PATH=__HIDDEN__", "DBT_PROJECT_DIR=__HIDDEN__", "DBT_PROFILES_DIR=__HIDDEN__"], "container_kwargs": {"auto_remove": true}}} 2.My understanding was that the environment variables needed to be set in the user code container on launch but this seems to show that the environment variables are set on the daemon?? I feel like I'm missing something here right? |
Beta Was this translation helpful? Give feedback.
In Kubernetes:
Individual code locations can be configured in the Helm chart in the "dagster-user-deployments" part of the Helm chart, and that configuration will be automatically passed through to any launched runs as well - see https://docs.dagster.io/deployment/guides/kubernetes/deploying-with-helm#step-61-configure-the-deployment for an example.
(The Helm chart uses the same
DAGSTER_CONTAINER_CONTEXT
environment variable under the hood)In ECS:
Similar to the Docker example above, you can set the DAGSTER_CONTAINER_CONTEXT environment variable with an "ecs" key to configure ECS-specific configuration for launched runs from the gRPC server's code location. For example, to say that all r…