Giter Site home page Giter Site logo

abhishekbhakat / turbine Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 59 KB

Simple python script for easy local airflow deployment with docker. Packed with additional components. Will be adding more going forward.

License: MIT License

Python 100.00%
airflow airflow-docker marquez openlineage opensearch postgresql vault

turbine's Introduction

Turbine

Simple python script for local airflow deployment with docker. Added components are

  • elasticsearch logging
  • smtp server for email alerts
  • hashicorp vault for secrets backend
  • vscode server for ide
  • marquez for lineage
  • minio for S3 bucket store
  • oittaa/gcp-storage-emulator for GCS
  • azurite for blob storage

Will be adding more going forward.

NOTE: Not for Windows! But can work in WSL liunx.

NOTE: Dev branch is for aarch64 architecture.

NOTE: Code is commented for Astro.

NOTE: Turbine astro needs Astro-CLI installed.

Usage

python Turbine.py

Sample output

Creating new cache__φ(。。)
Creating new farm__φ(。。)
New farm created using network as 172.27.0.1/16! ( ̄▽ ̄)ノ
Airflow type:
 1. Astro [default]
 2. OSS 
 3. OSS Main branch
-> 1
Project name: abcd
Enable remote logging [yN]: 
Enable vault [yN]: 
Enable code server [yN]: 
Using port 8080 for webserver, 5555 for flower, 7000 for IDE and 0 for redis
Using network: 172.27.2.1
Initializing Astro project
Pulling Airflow development files from Astro Runtime 9.1.0
Initialized empty Astro project in /Users/abhishekbhakat/Codes/Turbine/farm/abcd-astro-airflow
Cache updated! ( ̄▽ ̄)ノ

Start Airflow

Change directory inside the folder created. And run start.sh.

Sample output

Deploying...
Cleaning older deployment...
Building image...
Preping db...
Deployed:
Airflow: http://localhost:8082
Airflow Swagger: http://localhost:8082/api/v1/ui/
Flower: http://localhost:5557
Vault: http://localhost:8200
Opensearch: http://localhost:5601/app/home#/
Marquez: http://localhost:3000/

Logs for deployment are collected in start.log.

Vault

For vault to work, we have to manually create a keys to unseal the vault and root_token will be auto generated. After that, the root_token needs to be updated on the Dockerfile with AIRFLOW__SECRETS__BACKEND_KWARGS.

Sample command to add secrets from vault shell

vault secrets enable -path=airflow/ kv-v2
vault kv put airflow/variables/my_var value=hello

turbine's People

Contributors

abhishekbhakat avatar

Stargazers

 avatar  avatar

Watchers

 avatar

turbine's Issues

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.