potiuk commented on code in PR #30820: URL: https://github.com/apache/airflow/pull/30820#discussion_r1174619962
########## docs/apache-airflow/start.rst: ########## @@ -40,28 +40,41 @@ This quick start guide will help you bootstrap an Airflow standalone instance on The installation of Airflow is painless if you follow the instructions below. Airflow uses constraint files to enable reproducible installation, so using ``pip`` and constraint files is recommended. -.. code-block:: bash - :substitutions: - - # Airflow needs a home. `~/airflow` is the default, but you can put it - # somewhere else if you prefer (optional) - export AIRFLOW_HOME=~/airflow - - # Install Airflow using the constraints file - AIRFLOW_VERSION=|version| - PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)" - # For example: 3.7 - CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt" - # For example: https://raw.githubusercontent.com/apache/airflow/constraints-|version|/constraints-3.7.txt - pip install "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}" - - # The Standalone command will initialise the database, make a user, - # and start all components for you. - airflow standalone - - # Visit localhost:8080 in the browser and use the admin account details - # shown on the terminal to login. - # Enable the example_bash_operator DAG in the home page +1. Set Airflow Home (optional): + + Airflow requires a home directory, and uses `~/airflow` by default, but you can set a different location if you prefer. The `AIRFLOW_HOME` environment variable is used to inform Airflow of the desired location. This step of setting the environment variable should be done before installing Airflow so that the installation process knows where to store the necessary files. + + .. code-block:: bash + + export AIRFLOW_HOME=~/airflow + +2. Install Airflow using the constraints file, which is determined based on the URL we pass: + + .. code-block:: bash + :substitutions: + + + AIRFLOW_VERSION=|version| + + # 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 |version| with python 3.7: https://raw.githubusercontent.com/apache/airflow/constraints-|version|/constraints-3.7.txt + + pip install "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}" + +3. Run Airflow Standalone: + + The `airflow standalone` command initializes the database, creates a user, and starts all components. Review Comment: ```suggestion The ``airflow standalone`` command initializes the database, creates a user, and starts all components. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
