Creating Python Project and Installing Airflow
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Airflow require a python version above 3.6
check python3 version > python3 --version
python environment > python3 -m view py_env
& source the python environment
Go to Airflow website
The installation command is in there .....
https://github.com/apache/airflow
pip install 'apache-airflow==2.7.0' \--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.7.0/constraints-3.8.txt"after successful installation we must ,
we are going to initialize the database for Airflow.
Initilizing the db for Airflow
This command will create a SQLLite database , a log folder and some configuration files.
Next start Airflow web server :
> airflow webserver -p 8080
You can use any port you wish 8082, 83 as you wish, this will show up a link -- lets open the link on a browser .
It asks for the user credentials to log in.
go back to your terminal stop the airflow webserver
> airflow user -help
> airflow user --username admin --firstname firstname --lastname lastname --role Admin --email admin@admin.com
By setting the password we start the airflow webserver again.
In order to start the Dags we need to start the Airflow schedule.
We open another terminal first we export export AIRFLOW=.





Comments
Post a Comment