2023-06-21 16:02:12 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -xe
|
|
|
|
|
|
|
|
sudo chown airflow:airflow airflow
|
2023-06-26 10:04:53 +02:00
|
|
|
sudo chown airflow:airflow /dbt/logs /dbt/target
|
2023-06-21 16:02:12 +02:00
|
|
|
airflow db init
|
|
|
|
|
|
|
|
# Allow non-authenticated access to UI for Airflow 2.*
|
|
|
|
sed -i.bak -E 's/^(# )?(AUTH_ROLE_PUBLIC) = .*$/\2 = "Admin"/' /home/airflow/airflow/webserver_config.py
|
2023-06-23 15:20:40 +02:00
|
|
|
|
|
|
|
# Allow unauthenticated API access for terraform
|
|
|
|
sed -i.bak -E 's/^(auth_backends) = .*$/\1 = airflow.api.auth.backend.default/' /home/airflow/airflow/airflow.cfg
|