Code Monkey home page Code Monkey logo

airflow-template's Introduction

Airflow Production docker-compose setup

Acknowledgments

This repo is a culmination of the ideas and code from the following:

Introduction

Production grade airflow docker-compose setup:

  • celery backend
  • rabbitmq (with dashboard)
  • scalable number of nodes
  • postgresql (needs external db, but you can configure a service for a local instance)

You can just copy paste the worker definition (in docker-compose.yml) as many times as you want, everything else should automagically work, provided you've follwed the steps below.

Setup

  • First, copy the env.example and populate it with the relevant values.
cp -rv env.example .env # populate .env
  • Then just run the docker-compose stack
docker-compose up --build -d

UI

  • Airflow Dashboard: /airflow/
  • Flower UI: /flower/
  • RabbitMQ Management Dashboard: / (currently there's an error with mounting to url prefix)

Issues

RabbitMQ

Sometimes the workers and other nodes are not able to connect to the rabbitmq instance inspite of the exact same credentials. In such a situation, just reset the password for the user you've created and you should be good to go.

docker exec -it <rabbitmq_container_id> rabbitmqctl change_password $RABBIT_USER $RABBIT_PASSWORD
# verify once
docker exec -it <rabbitmq_container_id> rabbitmqctl authenticate_user $RABBIT_USER $RABBIT_PASSWORD

airflow.exceptions.AirflowTaskTimeout error

WIP (I think changing the timeout config should help, please submit a PR if you've been able to fix this!)

airflow-template's People

Contributors

pk13055 avatar

Watchers

 avatar

airflow-template's Issues

[Update] Restructuring of repo

Ideally the file system should have separate folders for the worker and master nodes respectively, allowing for custom, only node packages to be installed while keeping the master image light. Having master/Dockerfile and worker/Dockerfile would be a good start, but would require either a single context: $BUILD_CONTEXT or separate contexts with some way to share common files.

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.