Skip to main content

Simplified Airflow CLI Tool for Lauching CeleryExecutor Deployment

Project description

Airflow Run

Python tool for deploying Airflow Multi-Node Cluster.

Requirements

  • Python >=3.6 (tested)

Goal

To provide a quick way to setup Airflow Multi-Node Cluster (a.k.a. Celery Executor Setup).

Steps

  1. Generate config yaml file.

  2. Run commands to start Rabbitmq, Postgresql and other Airflow services:

Generate config file:

afr --generate_config

Running the tool in the same directory as config file:

afr --run postgresql
afr --run initdb
afr --run rabbitmq
afr --run webserver
afr --run scheduler
afr --run worker --queue {queue name}
afr --run flower

Or, running the tool specifying config path:

afr --run postgresql --config /path/config.yaml

Default Config yaml file:

private_registry: False
registry_url: registry.hub.docker.com
username: ""
password: ""
repository: pkuong/airflow-run
image: airflow-run
tag: latest
local_dir: {local directory where you want to mount /dags and /logs folder}
webserver_port: 8000
flower_port: 5555
airflow_cfg:
  AIRFLOW__CORE__EXECUTOR: CeleryExecutor
  AIRFLOW__CORE__LOAD_EXAMPLES: "False"
  AIRFLOW__CORE__DAGS_FOLDER: /usr/local/airflow/airflow/dags
  AIRFLOW__CORE__LOGS_FOLDER: /usr/local/airflow/airflow/logs
  AIRFLOW_HOME: /usr/local/airflow
rabbitmq:
  name: rabbitmq
  username: {username}
  password: {password}
  host: {IP}
  virtual_host: /
  image: rabbitmq:3-management
  home: /var/lib/rabbitmq
  ui_port: 15672
  port: 5672
  env:
    RABBITMQ_DEFAULT_USER: {username}
    RABBITMQ_DEFAULT_PASS: {password}
postgresql:
  name: postgresql
  username: {username}
  password: {password}
  host: {host}
  image: postgres
  data: /var/lib/postgresql/data
  port: 5432
  env:
    PGDATA: /var/lib/postgresql/data/pgdata
    POSTGRES_USER: {username}
    POSTGRES_PASSWORD: {password}

Docker image

This tool is using the following public docker image by default.
https://hub.docker.com/repository/docker/pkuong/airflow-run

Building the image:

If you want to build your own image, you can run the following:
afd --build --config_path={absolute path to config.yaml} --dockerfile_path={absolute path to directory which contains Dockerfile}

Contributors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

airflow-run-0.0.7.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

airflow_run-0.0.7-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file airflow-run-0.0.7.tar.gz.

File metadata

  • Download URL: airflow-run-0.0.7.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for airflow-run-0.0.7.tar.gz
Algorithm Hash digest
SHA256 c25d263d512e1d0870a1c8d57e89bea2b91e10bea3c78167ce4b39c34514d18f
MD5 2161ba454bd82f8ea67665f888d1fdd0
BLAKE2b-256 c1944f07a1574d1256b0ebeaeaa2ac41d6b64c97ae0e0c254a3b35bdcbae4af3

See more details on using hashes here.

Provenance

File details

Details for the file airflow_run-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: airflow_run-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for airflow_run-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ceada80e2abfc3c4832f51f82d1a6af55e17674e4a256e008892fb619785b5a2
MD5 9037e69242d2b0c342494f5412c7feac
BLAKE2b-256 3e765f4f6b03da5da61f42018d912a3198b6fc571e41119ff4d2948c25e80b93

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page