# ask-community

Renkai Ge

07/05/2022, 3:20 AM
Hi community! Do you have best practice of deploying Dagster service with Ansible? I'm not an Ansible expert, but my company want me deploy everything with Ansible. It would be excellent if there is already a template.
👍 1

Alexander Whillas

07/05/2022, 5:25 AM
infact a cookie-cutter template for a general dagster repo setup


07/05/2022, 6:30 AM
While I’ve never worked with Ansible, I support what Alexander is asking for, this could have saved me a bit of time in the past. In a very simplified way, this is what you need: • dagit - entrypoint
dagit -h -p 8080
• dagster-daemon - entrypoint
dagster-daemon run
• user code as gRPC repositories - entrypoint
dagster api grpc -h -p <port> -f
Both dagit and dagster-daemon should have the
variable defined and pointing to the same path (here I’m unsure if they have to share this folder or if only the
file needs to be configured the same, maybe someone from the team can specify that; in my deployments, both always run in the same containers since they’re so lightweight). The deployments will then pull the paths in your
file, which need to be reachable. These can be python packages, but it’s usually recommended to use the gRPC functionality, so the way you reach them varies depending on where you’re deploying.


07/05/2022, 5:37 PM
@Dagster Bot issue Add an example ansible template for basic dagit/daemon/user code set up

Dagster Bot

07/05/2022, 5:37 PM

Alexander Whillas

07/11/2022, 9:03 PM
As @Vinnie mentioned, cookiecutter template might be the way to go. Its also instructive as to the ideal structure of a git repo setup. I've used Ansible but can't see it as being that useful since your usually deploying Dagster as a container and all the orchestration would be handled with something like Kubernetes or Docker Compose which all just want a container image. I'd only use Ansible for on premise systems setup and even then I'd run k3s to manage all the container jobs