hey all โ€“ we've trying to deploy dagster on ECS, b...
# deployment-ecs
r
hey all โ€“ we've trying to deploy dagster on ECS, but we've struggled to find a recent enough template to go off of. the guide from the dagster repo (link) says "_Once you're done experimenting with this reference deployment, you should destroy the AWS resources it creates._", so i can't whether this is meant to be used in production. are there any good recent deployment templates that you'd recommend following?
m
My team is using a slightly customized deployment we built using this reference in production. I think that the "_should destroy"_ language there is not really accurate
thank you box 1
j
That docker compose example is our current recommendation.
Once youโ€™re done experimenting with this reference deployment, you should destroy the AWS resources it creates.
is just to try to avoid someone getting charges by accidentally leaving a demo deployment up ๐Ÿ™‚
๐Ÿ‘ 1
r
@johann so does that mean that this is or isn't meant to be used in production? i couldn't quite tell now haha
sounds like it definitely usable in production, but that text is just reminding people to tear it down if they were only temporarily using a given deployment as a demo?
โ˜๏ธ 1
๐Ÿ‘ 1
j
Yes you can use it in production
r
love it, thanks!
and thanks for all the many questions you've answered for me, johann! excited to have a solid working setup soon blob clap
a
Hi Roberto, we are also (partly) using docker-compose solution in production. However, do consider changing to CloudFormation when the infrastructure is fully built, as this gives you more flexibility in terms of configuration! :)
m
Hey @johann - sorry to piggy back on this thread but I am trying to deploy dagster on AWS and looking at the example I am sort of confused but my understanding of devops is basic at best. Should all this code live in the same repo as the user code? Our setup is; develop in a devcontainer locally, push changes to GitHub where we have an actions workflow that builds our container (user code) and stores in GHCR Would the ECS example code be in a separate repo or the same as the user code? I'm not sure how to adapt the example basically.
m
fwiw my team has two separate git repos (we are self-hosting dagster) - one git repo for dagster services (daemon and dagit) that has IaS (terraform), docker compose, dagster config, etc. Then we have another git repo for our workspace/pipeline service code (actual jobs/graphs/etc, also terraform)
The latter is where all the business logic lives and gets many deployments via CI/CD regularly. The dagster git repo we only upgrade and deploy roughly 1x or 2x a quarter
In total there are 3 services in our ECS environment: dagster daemon, dagster dagit, and our (ETL / biz logic) pipeline code service
m
Thanks Mike - so your business logic repo, that builds a container and tags it something like <biz logic name>:latest and that's referenced in your services repo at this point?
m
@martin o leary yes, well, sort of; we aren't including dagit... let me share a gist of the rough Dockerfile
m
Thanks for putting that together. i'm assuming that your user code (all your jobs / assets) is under the
pipeline
dir in your example?
๐Ÿ‘Œ 1
๐Ÿ‘ 1
OK I'm very confused ๐Ÿ˜‚ I think I need to go deploy some stuff on ECS outside of dagster because that is new also
m
Ah, yeah, at least this Dockerfile would be fine for k8s or ECS
๐Ÿ™ 1
We are using the ECS service discovery (includes automatic private route53 entry creation) feature so that the dagster config can resolve the user code service
That's part of the docker-compose example, but it's opaque since it triggers a cloudformation job to establish the discovery routes. On my team we redid this as terraform instead...
๐Ÿ‘ 1