- Install Python 3.
- Install MySQL.
- Install libmysqlclient-dev.
- Create virtual env:
$ virtualenv -p $LOCAL/bin/python3 $LOCAL/python-envs/AIRFLOW-ENV
- Install airflow with MySQL support, and useful packages.
$ source $LOCAL/python-envs/AIRFLOW-ENV/bin/activate
$ pip install cryptography apache-airflow[mysql]
- Set
AIRFLOW_HOME
.
$ export AIRFLOW_HOME=$LOCAL/apps/airflow
- Try starting airflow so
airflow.cfg
gets created.
- Edit
airflow.cfg
to configure executor, MySQL, SMTP, and example dags.
$ emacs $AIRFLOW_HOME/airflow.cfg
...
load_examples = False
...
executor = LocalExecutor
...
#sql_alchemy_conn = sqlite:////Users/dnikolov/Local/apps/airflow/airflow.db
sql_alchemy_conn = mysql://airflow:<enter password>@localhost/airflowdb?unix_socket=/tmp/mysql.sock
...
...
[smtp]
smtp_host = mail-relay.iu.edu
smtp_starttls = True
smtp_ssl = False
smtp_user = dnikolov
smtp_password = <enter password>
smtp_port = 587
smtp_mail_from = [email protected]
...
- Init db
- Start the scheduler and webserver
$ airflow scheduler
$ ariflow webserver
- Access the Web UI at https://localhost:8080