Oliver Gate
05/19/2023, 9:52 AMjamie
05/19/2023, 4:54 PMdef get_resources_for_env():
if os.getenv("DAGSTER_DEPLOYMENT") == "PRODUCTION":
return {
"s3": S3Resource(<prod credentials),
# other prod resources
}
elif os.getenv("DAGSTER_DEPLOYMENT") == "STAGING":
return {
"s3": S3Resource(<staging credentials),
# other staging resources
}
else: # local development
return {
# local resources
}
these two guides use Snowflake as an example of these concepts, but the general ideas should transfer to what you’re trying to do
https://docs.dagster.io/guides/dagster/transitioning-data-pipelines-from-development-to-production
https://docs.dagster.io/guides/dagster/branch_deploymentsOliver Gate
05/22/2023, 12:43 PMdagster-cloud-action/actions/hybrid_branch_deploy
action and using a separate agent would us to separate concerns. But unless I’m mistaken, branch deployments don’t have an effect, but only mock effects.
Perhaps if I frame our problem differently?
What options do we have open to us to allow for separation of staging and production environments. We’d like, if possible to separate staging and production entirely. Thanks!jamie
05/22/2023, 1:39 PMReid Falconer
05/22/2023, 9:06 PM