Hi community! Do you have best practice of deployi...
# ask-community
r
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
a
infact a cookie-cutter template for a general dagster repo setup
v
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 0.0.0.0 -p 8080
• dagster-daemon - entrypoint
dagster-daemon run
• user code as gRPC repositories - entrypoint
dagster api grpc -h 0.0.0.0 -p <port> -f foo.py
Both dagit and dagster-daemon should have the
DAGSTER_HOME
variable defined and pointing to the same path (here I’m unsure if they have to share this folder or if only the
dagster.yaml
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
workspace.yaml
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.
p
@Dagster Bot issue Add an example ansible template for basic dagit/daemon/user code set up
d
a
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