Giter Site home page Giter Site logo

dagster-celery-test's Introduction

Dagster with celery and docker

This is an example of a simple parallel pipeline packaged in docker that runs with celery through a simple docker-compose up command. It uses:

  • docker to deploy database, rabbitmq, dagster-dagit and dagster-celery workers
  • celery as execution backend
  • s3 as intermediate storage backend

This example is meant to illustrate how the components in a simple scalable dagster deployment are connected and configured. For instance, one particular aspect that is a little untouched in the documentation is how to use a custom broker connection string and what could be the contents of the yaml passed to the dagster-celery worker initialization.

Run example

Prerequisites:

  • s3 bucket and an account with write and read permissions on the bucket

Steps:

  • setup the aws s3 environment variables of the account, these are used in the docker-compose and passed to the dagster instances

    • AWS_ACCESS_KEY_ID
    • AWS_SECRET_ACCESS_KEY
    • AWS_DEFAULT_REGION
  • change the configuration file in app/celery_execution.yaml to the appropriate bucket name

  1. build the image with
$ docker build . -t dagster_test

The code is copied directly into the image

  • then deploy the nodes with docker-compose
$ docker-compose up

There could be some issues with rabbitmq. In theory, the configuration inside .docker/rabbitmq/etc/rabbitmq.conf should create a vhost called dagster that could be accesed with credentials rabbitmq:rabbitmq(user:pass). If this is not the case access the web management server in localhost:15672 and create the vhost.

  • The compose spins up a dagit server and a dagster worker. they use the same image but different entrypoints. Test the pipeline by going to localhost:2001 select the parallel_pipeline and the preset celery in the playground

dagster-celery-test's People

Stargazers

Henry avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

nikkij

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.