-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.sh
28 lines (22 loc) · 1.06 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
WORKFLOW_BASE="${HOME}"/Documents/LLR/FPGAs/cmssw_chain
MY_AIRFLOW_BASE=/airflow
export AIRFLOW_HOME="${WORKFLOW_BASE}${MY_AIRFLOW_BASE}"
export AIRFLOW__CORE__DAGS_FOLDER="${WORKFLOW_BASE}${MY_AIRFLOW_BASE}"
export AIRFLOW__CORE__SQL_ALCHEMY_CONN=sqlite:///"${WORKFLOW_BASE}${MY_AIRFLOW_BASE}"/airflow.db
export AIRFLOW__CORE__PLUGINS_FOLDER="${WORKFLOW_BASE}${MY_AIRFLOW_BASE}"/plugins
export AIRFLOW__SCHEDULER__CHILD_PROCESS_LOG_DIRECTORY="${WORKFLOW_BASE}${MY_AIRFLOW_BASE}"/logs/scheduler
export AIRFLOW__LOGGING__BASE_LOG_FOLDER="${WORKFLOW_BASE}${MY_AIRFLOW_BASE}"/logs
export AIRFLOW__CORE__SQL_ALCHEMY_CONN="mysql+mysqlconnector://root:1234@localhost//home/bruno/Documents/LLR/FPGAs/cmssw_chain/airflow/airflow.db"
export PYTHONPATH="${PYTHONPATH}":"${WORKFLOW_BASE}"
if [ ! -f "airflow/airflow.db" ]; then
airflow db upgrade
airflow users create \
--username admin \
--firstname Bruno \
--lastname Alves \
--role Admin \
--email bruno.alves@cern.ch
fi
airflow webserver --port ${1:-8080} &
airflow scheduler &
# airflow dags trigger <dag_id>