Airflow详细搭建过程(亲测+总结)
官网:Apache airflow
Airflow是社区创建的一个平台,用于以编程方式编写,安排和监视工作流。
半个月前搭了一次,现在做一个记录,不逼逼,开始搭建了,全程多图:
环境准备
系统: cent os 7
conda版本: 4.8.2
airflow版本 1.10.11
开始搭建
我这边会用一个conda
创建一个apache airflow
的环境:
conda create -n airflow_env python=3.7
切换到当前的这个环境:
conda activate airflow_env
搭建airflow
搭建airflow的话,官网有一套详细的文档Airflow 搭建
接下来就按照这个方式来
# airflow needs a home, ~/airflow is the default,
# but you can lay foundation somewhere else if you prefer
# (optional)
export AIRFLOW_HOME=~/airflow
# install from pypi using pip
pip install apache-airflow
# initialize the database
airflow initdb
# start the web server, default port is 8080
# airflow webserver -p 8080 这里做个修改,后面加上-D参数让它后台运行
airflow webserver -p 8080 -D
# start the scheduler
airflow scheduler
# visit localhost:8080 in the browser and enable the example dag in the home page
经过上述的步骤的话,可以在浏览器中打开这个页面:
搭建到这里,可以看到一个基础的样子&#x