Follow the below steps to set up the airflow from scratch without Docker.
1. python3 -m venv venv
2. source venv/bin/activate
3. Setup the airflow home path
export AIRFLOW_HOME=/Users/piyush/workspace/airflow_demo_atrium
4. Setup Postgres database, first create one database and then change the below connection string with your Postgres database connection
export AIRFLOW__CORE__SQL_ALCHEMY_CONN=”postgresql+psycopg2://postgres:root%[email protected]:5432/airflow_demo”
5. Install below python packages.
pip3 install apache-airflow
pip3 install psycopg2-binary
6. airflow db init
7. airflow users create -r Admin -u admin -e [email protected] -f piyush -l singhal -p admin123
8. airflow webserver -p 8080
9. Open http://localhost:8080 in the browser and enter the credentials, we defined in step 7.
10. Open a new terminal and go to the same folder where you created the virtual environment in the first step and rerun the below commands one more time.
source venv/bin/activate
export AIRFLOW_HOME=/Users/piyush/workspace/airflow_demo_atrium
export AIRFLOW__CORE__SQL_ALCHEMY_CONN=”postgresql+psycopg2://postgres:root%[email protected]:5432/airflow_demo”
11. Run the below command in the new terminal.
airflow scheduler
Leave a Reply