apache airflow configuration is empty and dags && plugins missing

Viewed 4285

I have installed apache airflow on Ubuntu 18.4 using this link https://airflow.apache.org/docs/apache-airflow/stable/start/local.html now when i run airflow with

airflow webserver --port 8080

and the Admin/Configurtion is empty and there is this message:

"Your Airflow administrator chose not to expose the configuration, most likely for security reasons." enter image description here

What i did wrong? More information that me be helpfull is that i created an user[airflow] and do all installtion with sudo , so my airflow info is :

Paths info                                                                                                                                                               
airflow_home    | /home/airflow/airflow                                                                                                                                  
system_path     | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin                                                     
python_path     | /usr/local/bin:/usr/lib/python36.zip:/usr/lib/python3.6:/usr/lib/python3.6/lib-dynload:/usr/local/lib/python3.6/dist-packages:/usr/lib/python3/dist-pac
                | kages:/home/airflow/airflow/dags:/home/airflow/airflow/config:/home/airflow/airflow/plugins                                                            
airflow_on_path | True                                                                                                                                                   
                                                                                                                                                                         
Config info                                                                                                                                                                   
executor             | LocalExecutor                                                                                                                                          
task_logging_handler | airflow.utils.log.file_task_handler.FileTaskHandler                                                                                                    
sql_alchemy_conn     | postgresql+psycopg2://airflow:airflow@localhost:5432/airflow                                                                                           
dags_folder          | /home/airflow/airflow/dags                                                                                                                             
plugins_folder       | /home/airflow/airflow/plugins                                                                                                                          
base_log_folder      | /home/airflow/airflow/logs  

However these folder does not exists also :/home/airflow/airflow/dags && /home/airflow/airflow/plugins

5 Answers

You will probably need to set expose_config = True in airflow.cfg and restart the web-server.

If You are running airflow inside the docker using the YAML file then please go to the docker-compose.YAML file and add this is a line under the env tag: AIRFLOW__WEBSERVER__EXPOSE_CONFIG: 'true'

This should fix the issue

I'm deploy airflow with helm chart, but it should help.

First, you need content file values, command (helm chart)

helm show values apache-airflow/airflow > values.yaml

Find in file values: extraEnv, put the value below and save.

extraEnv: |
  - name: AIRFLOW__WEBSERVER__EXPOSE_CONFIG
  value: 'TRUE'

now, run changes with command below

helm upgrade  --install airflow apache-airflow/airflow -n airflow -f values.yaml --debug

I just wanted to add that for "Azure bitnami Airflow multi-tier" implementation.

expose_config = True

in airflow.cfg and restart the web-server did the trick

Related