You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/08/19 23:08:08 UTC

[GitHub] [airflow] atsalolikhin-spokeo commented on issue #10389: Documentation is missing instructions for preparing database for Airflow (during installation)

atsalolikhin-spokeo commented on issue #10389:
URL: https://github.com/apache/airflow/issues/10389#issuecomment-676801487


   Hello,
   
   I was unable to commit my change.  The pre-commit hook test suite failed on:
   
   ```
   Check if image build is needed....................................................................................................Failed
   ```
   
   I had a look at your Contributing document, and the bar is a bit high -- Breeze, Docker, virtualenv -- I tried following the instructions but `breeze` did not start:
   
   ```
   [~/git/airflow] fix/10389(+19/-0) ± ./breeze
   [~/git/airflow] fix/10389(+19/-0) 1 ± echo $?
   1
   [~/git/airflow] fix/10389(+19/-0) ±
   ```
   
   Here is the patch I was going to send in:
   
   ```
   diff --git a/docs/howto/initialize-database.rst b/docs/howto/initialize-database.rst
   index aabee9434..b3129286d 100644
   --- a/docs/howto/initialize-database.rst
   +++ b/docs/howto/initialize-database.rst
   @@ -48,12 +48,31 @@ SqlAlchemy backend. We recommend using **MySQL** or **Postgres**.
       want to set a default schema for your role with a
       command similar to ``ALTER ROLE username SET search_path = airflow, foobar;``
    
   +Setup your database to host Airflow
   +-----------------------------------
   +
   +Create a database called ``airflow`` and a database user that Airflow
   +will use to access this database.
   +
   +Example, for **MySQL**:
   +
   +.. code-block:: sql
   +   CREATE DATABASE airflow CHARACTER SET utf8 COLLATE utf8_unicode_ci;
   +   CREATE USER 'airflow' IDENTIFIED BY 'airflow';
   +   GRANT ALL PRIVILEGES ON airflow.* TO 'airflow';
   +
   +Configure Airflow's database connection string
   +----------------------------------------------
   +
    Once you've setup your database to host Airflow, you'll need to alter the
    SqlAlchemy connection string located in your configuration file
    ``$AIRFLOW_HOME/airflow.cfg``. You should then also change the "executor"
    setting to use "LocalExecutor", an executor that can parallelize task
    instances locally.
    
   +Initialize the database
   +-----------------------
   +
    .. code-block:: bash
    
        # initialize the database
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org