Hey Dagster team, We’re using hybrid deployments a...
# ask-community
o
Hey Dagster team, We’re using hybrid deployments and deploying to kubernetes EKS on AWS. We have separate AWS accounts for prod and staging. We’d like to have branch deployments go to our staging EKS and our prod deployments to go to our production EKS. Is this possible with standard dagster or do we need enterprise? CC: @Alan Hutcheson @Reid Falconer
helpwanted 1
🙏 1
j
Hey @Oliver Gate ! In terms of configuring different resources to store/load data or interact with external services, you can totally use different accounts for different environments. I think you should also be able to deploy dagster in different EKS accounts, but i’m less versed in deploying to EKS so i’m not 100% sure on that. However, i dont know of any reason that wouldn’t be possible As for configuring resources with different credentials, we typically recommend setting an environment variable in each deployment environment and using that to determine which credentials to you. for example. you could do something like this
Copy code
def 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_deployments
o
Hey @jamie thanks for the response. I think the main concern for us is deploying code meant for our staging environment in our production EKS cluster. We wanted here to understand if “branch” deployments, i.e. using the
Copy code
dagster-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!
1
j
ah i see. So more of a deployment question vs a resources config question. I’ll need to loop in another engineer who knows more about the deployment options
❤️ 1
🌈 1
r
That would be great thanks @jamie. Please let us know if we should follow up with anyone in particular daggy cowboy