Setup airflow in linux

prerequisite: python3 should be installed on your ubuntu/Mac machine.

  1. Setup the environment.

  • ?create a directory
  • ??mkdir airflow
  • ??cd airflow/
  • ??I am setting env here in this folder.
  • ??python3 -m venv .
  • ??Activate the environment.
  • ??source bin/activate

2.????Install apache-airflow using the below command.

  • sudo pip3 install apache-airflow

3.????.Setup backend DB using below command; this command will setup SQLlite DB.

  • ?airflow db init

4.????Now lets bring up the web url to access the airflow

  • ?airflow.cfg file contains the port number to access the weburl.
  • You can change the port number in the line number 433 of this file airflow.cfg, I have given port 8085 since my port 8080 is used by some other application.

No alt text provided for this image


  • Lets bring up the webserver GUI by running the below command, -D is to run in detached mode.
  • airflow webserver -p 8085 -D
  • Now our GUI should be up and running, try accessing the airflow GUI on the below url, use the userid and password created in the step 5.

https://localhost:8085/home

No alt text provided for this image


5.????Create userid and password for the GUI.

airflow users create --role Admin --username admin --password admin --email XXX@gmail.com --firstname fname --lastname lname

6. Login with admin user id and password.

No alt text provided for this image

要查看或添加评论,请登录

社区洞察

其他会员也浏览了