-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstraints
31 lines (21 loc) · 1.1 KB
/
constraints
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
29
30
31
1. # -------constraints file--------
AIRFLOW_VERSION=2.6.3
# Extract the version of Python you have installed. If you're currently using Python 3.11 you may want to set this manually as noted above, Python 3.11 is not yet supported.
PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)"
CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt"
# For example this would install 2.6.3 with python 3.7: https://raw.githubusercontent.com/apache/airflow/constraints-2.6.3/constraints-3.7.txt
pip install "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}"
2. # ------------seting up airflow directory------------------
`export AIRFLOW_HOME=/airflow`
3. # -----------running individual components----------------
airflow db init
airflow users create \
--username admin \
--firstname admin \
--lastname admin \
--role Admin \
--email [email protected]
airflow webserver --port 8080
airflow scheduler
4. # ---------- DAGS----------------------
create a dags folder in the airflow to store dags