Coder Social home page Coder Social logo

soggycactus / airflow-repo-template Goto Github PK

View Code? Open in Web Editor NEW
236.0 236.0 40.0 171 KB

The easiest way to run Airflow locally, with linting & tests for valid DAGs and Plugins.

License: MIT License

Dockerfile 6.33% Python 72.27% Makefile 21.40%

airflow-repo-template's People

Contributors

soggycactus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

airflow-repo-template's Issues

Upgrading Airflow minor versions

Hi @soggycactus ,
thanks for providing this useful template!

One question: I'm just starting off and noticed Airflow 2.0.1 is already out - should I simply adjust AIRFLOW_VERSION in the Makefile to use it or are there other prerequisites to take care of?

Thanks!

Upgrade to Airflow 2.2.5

Hello!

Lately, I've been trying to kickstart with my personal Airflow instance using your template, but had to upgrade it to 2.2.5. Successfully, I've succeeded doing so by modifying Dockerfile, that I'm sharing below. Maybe that will be useful when you'd decide to upgrade template

FROM apache/airflow:2.2.5

#Install Make pre-requisites
USER root
RUN apt-get update \
  && apt-get install -y --no-install-recommends build-essential
USER airflow

#Install additional dependencies
COPY Makefile Makefile
COPY airflow.requirements.txt airflow.requirements.txt

RUN make internal-install-airflow
RUN make internal-install-deps

Personally, I've found a little bit difficult to understand code behind make internal-install-airflow component, so I'm putting additional Airflow modules into airflow.requirements.txt file, but I'm pretty sure that this will work too after providing appropriate airflow and python version in Makefile.

Run airflow not form `root`

Hello!

Thank you for this template.

--

I try to run airflow not from the root user:

For this I change the dockerfile:

From

# Install Airflow and any additonal dependencies
WORKDIR /root

To

# Install Airflow and any additonal dependencies
WORKDIR /app

And then create user airflow and give him all the rights to the /app directory

After that I change all occurencies of /root in docker-compose file, so the volumes point to the /app dir now

--

I expect that when I boot up airflow I'd get my DAGs up and running, but instead it seems like DAGs have not been imported at all

Could you please point me in a way why this might happen? I did not find a way to specify DAGs loading folder in the code :(

Psycopg2-binary Error: Service 'initdb' failed to build

Hello, I am currently attempting to run make start-airflow and am getting hit with the following error:

executor failed running [/bin/sh -c make internal-install-airflow]: exit code: 2
ERROR: Service 'initdb' failed to build
make: *** [start-db] Error 1

I've traced this back to the makefile attempting to pip install pyycopg2-binary, which then throws the following error:

#12 12.55     Error: pg_config executable not found.
#12 12.55     
#12 12.55     pg_config is required to build psycopg2 from source.  Please add the directory
#12 12.55     containing pg_config to the $PATH or specify the full executable path with the
#12 12.55     option:
#12 12.55     
#12 12.55         python setup.py build_ext --pg-config /path/to/pg_config build ...
#12 12.55     
#12 12.55     or with the pg_config option in 'setup.cfg'.
#12 12.55     
#12 12.55     If you prefer to avoid building psycopg2 from source, please install the PyPI
#12 12.55     'psycopg2-binary' package instead.
#12 12.55     
#12 12.55     For further information please check the 'doc/src/install.rst' file (also at
#12 12.55     <https://www.psycopg.org/docs/install.html>).
#12 12.55     
#12 12.55     ----------------------------------------

It's funny, since I thought the whole point to pip installing psycopg2-binary was to avoid having to deal with all of these executable files. When I attempt to install psycopg2-binary on its own in a fresh conda environment, the library installs just fine.

I ended up finding this post on the psycopg2 issues page, where someone said that adding libpq-dev to the list of dependencies in the dockerfile solves this issue. I tried it and now I am able to run make start-airflow without any errors. I'm not sure if this is a completely safe fix for this issue, I just wanted to point this issue out in case anyone else runs into it.

Thanks!

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.