2014-10-13 09:05:34 +04:00
|
|
|
|
|
|
|
Installation
|
|
|
|
------------
|
|
|
|
Installation should be quick and straightforwad.
|
|
|
|
|
|
|
|
Debian packages
|
|
|
|
'''''''''''''''
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
sudo apt-get install virtualenv python-dev
|
|
|
|
sudo apt-get install libmysqlclient-dev mysql-server
|
|
|
|
sudo apt-get g++
|
|
|
|
|
2014-10-15 01:55:41 +04:00
|
|
|
Mac setup
|
|
|
|
'''''''''''''''
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
# Install mysql
|
|
|
|
brew install mysql
|
|
|
|
# Start mysql
|
|
|
|
mysql.server start
|
|
|
|
|
|
|
|
# Install python package managers
|
|
|
|
sudo easy_install pip
|
|
|
|
sudo pip install virtualenv
|
|
|
|
|
|
|
|
|
|
|
|
Required environment variable, add this to your .bashrc or .bash_profile
|
|
|
|
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
2014-10-13 09:05:34 +04:00
|
|
|
|
|
|
|
::
|
|
|
|
|
2014-10-15 05:28:29 +04:00
|
|
|
export AIRFLOW_HOME=~/Airflow
|
|
|
|
export PATH=$PATH:$AIRFLOW_HOME/airflow/bin
|
2014-10-15 01:55:41 +04:00
|
|
|
# also run it, or source it, or start a new shell
|
|
|
|
source ~/.bashrc
|
2014-10-13 09:05:34 +04:00
|
|
|
|
|
|
|
Create a python virtualenv
|
|
|
|
''''''''''''''''''''''''''
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
virtualenv env # creates the environment
|
|
|
|
source init.sh # activates the environment
|
|
|
|
|
2014-10-15 05:28:29 +04:00
|
|
|
Use pip to install the python packages required by Airflow
|
|
|
|
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
2014-10-13 09:05:34 +04:00
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
pip install -r requirements.txt
|
|
|
|
|
|
|
|
Setup the metdata database
|
|
|
|
''''''''''''''''''''''''''
|
|
|
|
|
|
|
|
Here are steps to get started using MySQL as a backend for the metadata
|
|
|
|
database, though any backend supported by SqlAlquemy should work just
|
|
|
|
fine.
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
$ mysql -u root -p
|
2014-10-15 01:55:41 +04:00
|
|
|
mysql>
|
2014-10-15 05:28:29 +04:00
|
|
|
CREATE DATABASE airflow;
|
|
|
|
CREATE USER 'airflow'@'localhost' IDENTIFIED BY 'airflow';
|
|
|
|
GRANT ALL PRIVILEGES ON airflow.* TO 'airflow'@'localhost';
|
2014-10-13 09:05:34 +04:00
|
|
|
|
2014-10-14 19:18:15 +04:00
|
|
|
Get things started
|
2014-10-13 09:05:34 +04:00
|
|
|
''''''''''''''''''''
|
|
|
|
|
|
|
|
::
|
2014-10-15 05:28:29 +04:00
|
|
|
|
2014-10-14 19:18:15 +04:00
|
|
|
# Creating the necessary tables in the database
|
2014-10-15 05:28:29 +04:00
|
|
|
airflow initdb
|
2014-10-13 09:05:34 +04:00
|
|
|
|
2014-10-14 19:18:15 +04:00
|
|
|
# Start the web server!
|
2014-10-15 05:28:29 +04:00
|
|
|
airflow webserver --port 8080
|