How to set up and install Apache Airflow 3.*
# Create directory
mkdir -p ~/airflow
# Move to directory
cd ~/airflow
# Create virtual environemnt
python3 -m venv airflow_venv
# Activate virtual environment
source airflow_venv/bin/activate
pip install "apache-airflow=={AIRFLOW VERSION}" --constraint "<https://raw.githubusercontent.com/apache/airflow/constraints->{AIRFLOW VERSION}/constraints-{PYTHON VERSION}.txt"
export AIRFLOW_HOME=~/airflow
# Confirm installation
airflow version
airflow standalone
airflow standalone is only used in devolopment, to initialze a production instance, follow the steps belowNavigate to ~/airflow/airflow.cfg and find:
[database]
sql_alchemy_conn = my_conn_string
Replace 'my_conn_string' with your preferred database's connection string. Ensure the database and user exist in the database.