Giter Club home page Giter Club logo

airflow-local-dev-5-min's Introduction

airflow-local-dev-5-min

Set up airflow local dev env in 5 minutes - This is not an official instruction. This is only for Chinese mainland developers who have network issues when installing python and js dependencies.

2024-05-06

version

  • main (dev branch)
  • 2.9.0
  • Airflow uses hatch to manage local dev env since 2.8.1

backend

  1. go to the airflow project root path
  2. run hatch python install 3.10, from the error output, find the path of hatch venv.
  3. source <hatch-venv-path>/bin/activate
  4. pip install httpx[socks]
  5. open vpn and set network proxy in terminal
export http_proxy=<your-proxy-address>
export https_proxy=<your-proxy-address>
  1. hatch env show
  2. find a env and run hatch env create airflow-310
  3. close vpn and unset proxy in terminal
  4. hatch env find airflow-310
  5. run hatch -e airflow-310 shell or source the airflow-310 venv
  6. run pip install -e ".[devel]" - before running pip install, run pip config list -v and make sure the registry is set to domestic registry
  7. (optional) set the alias in ~/.zshrc a="xxxxx/bin/airflow" (default airflow is not the one installed), if path contains blank, use '' outside "", e.g. - alias a='"/Users/alibaba/Library/Application Support/hatch/env/virtual/apache-airflow/Hq9asqcX/airflow-310/bin/airflow"' and source ~/.zshrc
  8. run hatch -e airflow-310 shell or source the airflow-310 venv to get into venv, and run a standalone, run a db reset if there is existing standalone db file

front-end

  1. run yarn config set registry https://registry.npmmirror.com, change the registry to domestic registry
  2. delete yarn.lock, otherwise the registry will not take effect
  3. delete all yarn / npm proxies -
yarn config delete proxy
yarn config delete https-proxy
npm config delete proxy
npm config delete https-proxy
  1. run yarn config list to make sure all proxies deleted
  2. run pre-commit run --hook-stage manual compile-www-assets --all-files to compile front-end assets

airflow-local-dev-5-min's People

Contributors

ericgao888 avatar

Watchers

 avatar

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.