Airflow學習筆記 --- airflow安裝

楊鑫newlfe發表於2017-04-27

首先安裝命令為:
pip install airflow


也可以:
pip install airflow[引數]


引數如下:

subpackage install command enables
all pip install airflow[all] All Airflow features known to man
all_dbs pip install airflow[all_dbs] All databases integrations
async pip install airflow[async] Async worker classes for gunicorn
devel pip install airflow[devel] Minimum dev tools requirements
devel_hadoop pip install airflow[devel_hadoop] Airflow + dependencies on the Hadoop stack
celery pip install airflow[celery] CeleryExecutor
crypto pip install airflow[crypto] Encrypt connection passwords in metadata db
druid pip install airflow[druid] Druid.io related operators & hooks
gcp_api pip install airflow[gcp_api] Google Cloud Platform hooks and operators (using google-api-python-client)
jdbc pip install airflow[jdbc] JDBC hooks and operators
hdfs pip install airflow[hdfs] HDFS hooks and operators
hive pip install airflow[hive] All Hive related operators
kerberos pip install airflow[kerberos] kerberos integration for kerberized hadoop
ldap pip install airflow[ldap] ldap authentication for users
mssql pip install airflow[mssql] Microsoft SQL operators and hook, support as an Airflow backend
mysql pip install airflow[mysql] MySQL operators and hook, support as an Airflow backend
password pip install airflow[password] Password Authentication for users
postgres pip install airflow[postgres] Postgres operators and hook, support as an Airflow backend
qds pip install airflow[qds] Enable QDS (qubole data services) support
rabbitmq pip install airflow[rabbitmq] Rabbitmq support as a Celery backend
s3 pip install airflow[s3] S3KeySensorS3PrefixSensor
samba pip install airflow[samba] Hive2SambaOperator
slack pip install airflow[slack] SlackAPIPostOperator
vertica pip install airflow[vertica] Vertica hook support as an Airflow backend
cloudant pip install airflow[cloudant] Cloudant hook

可以直接使用:

 pip install airflow[all]

這樣就可以安裝所有依賴的東西,


配置環境變數:
export AIRFLOW_HOME=~/airflow


配置mysql資料庫儲存airflow資訊:

sql_alchemy_conn = mysql://user:password@ip:port/airflow


初始化資料庫:
airflow initdb


啟動Web Server,指定埠:
airflow webserver –p 18080


安裝成功介面:




後臺顯示:





OK,在預設的配置下可以玩了,如果需要將airflow的資料儲存到資料庫的話,就可以配置一下儲存到資料庫。


相關文章