Git Product home page Git Product logo

airflow-api's Introduction

The Airflow API

This is a package for enabling access to an Airflow (https://airflow.apache.org/) service via a RESTful interface. It is currently only functional with a LocalExecutor.

Integration with an Existing Airflow Service

In order to integrate this package with an existing Airflow service you can either:

  1. Copy the entirety of the source code at airflowapi and the plugins.py file into a folder at $AIRFLOW_HOME/plugins in the airflow service.

    mkdir -p $AIRFLOW_HOME/plugins && cp -r airflowapi $AIRFLOW_HOME/plugins && cp plugins.py $AIRFLOW_HOME/plugins
    
  2. Pip install the airflowapi package into the same python distribution that is running the airflow service and copy the plugins.py file into a folder at $AIRFLOW_HOME/plugins in the airflow service

    pip install . && mkdir -p $AIRFLOW_HOME/plugins && cp plugins.py $AIRFLOW_HOME/plugins
    

The api's documentation can be found at the api/v1/doc route of the airflow service.

Development

In order to do development you will need a python 3.6 environment set up as your base python installation.

We encourage developers to understand and leverage either of the following to create a clean environment for development:

Running Unit Tests

To run all tests simply run the following command:

./bin/run_tests.sh

Running Integration Tests

This assumes you are developing on Mac OSX System. Development on other systems is currently not tested or documented.

You will need docker installed on your system in order to run these tests.

You will first need to build the base image used in testing. This helps speed up development by establishing system values which aren't often changed. You can do so by running the following command:

docker build -f AirflowTestEnvDockerfile -t "airflow-api:base-image" .

You will need to add the following to your /etc/hosts file:

127.0.0.1       airflow-webserver

This can be done easily bu running the following command:

sudo echo "127.0.0.1 airflow-webserver" >> /etc/hosts 

To run all tests simply run the following command:

./bin/run_integration_tests.sh

If you would like to run tests in debug mode you can run the following to spin up the docker images needed:

./docker-compose-wrapper.sh up

When you are done with the images you can spin them down with this command:

./docker-compose-wrapper.sh down

Tested Application Configurations

The following are the tested application configurations which are confirmed to work:

Package Version Airflow Version sql_alchemy_conn Protocol worker_class Type Executor
1.1.0 1.10.1 postgresql+psycopg2 sync LocalExecutor

airflow-api's People

Contributors

zack3241 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

airflow-api's Issues

swagger screenshot

I think should should get a sweet screenshot of the swagger for the running app (bonus points for a GIF with a sample request) in the README!

READMEs with images are the most legit.

repo description and tags

This repo should have a short description and tags (must be done by the repo admin) to help people discover it!

See uptasticsearch for an example:

image

Integrate Project with Build System for CI

The current project has the scaffolding for testing the code but this is not automated in any way. We should integrate the code with Travis in order to execute these tests to make contributing easier.

Add CODEOWNERS file

I learned about this cool thing over in fRanz. GitHub allows you to add a CODEOWNERS file that will be used to set default reviewers when PRs are opened.

This has to be done by a repo admin, so assigning to you @zack3241

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.