airflow: Documentation is missing instructions for preparing database for Airflow (during installation)
Apache Airflow version: 1.10.11
Kubernetes version (if you are using kubernetes) (use kubectl version
): N/A
Environment:
- Cloud provider or hardware configuration: AWS
- OS (e.g. from /etc/os-release): Amazon Linux 2
- Kernel (e.g.
uname -a
): N/A - Install tools: N/A
- Others: N/A
What happened: Airflow documentation is missing a step – preparing the database for Airflow initdb.
This includes creating the “airflow” database, and the “airflow” user.
There are multiple different instructions for it outside the documentation, e.g.:
https://medium.com/@srivathsankr7/apache-airflow-a-practical-guide-5164ff19d18b says:
mysql -u root -p
mysql> CREATE DATABASE airflow CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysql> create user 'airflow'@'localhost' identified by 'airflow';
mysql> grant all privileges on * . * to 'airflow'@'localhost';
mysql> flush privileges;
http://site.clairvoyantsoft.com/installing-and-configuring-apache-airflow/ says:
CREATE DATABASE airflow CHARACTER SET utf8 COLLATE utf8_unicode_ci;
grant all on airflow.* TO ‘USERNAME'@'%' IDENTIFIED BY ‘{password}';
https://airflow-tutorial.readthedocs.io/en/latest/first-airflow.html says:
MySQL -u root -p
mysql> CREATE DATABASE airflow CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysql> GRANT ALL PRIVILEGES ON airflow.* To 'airflow'@'localhost';
mysql> FLUSH PRIVILEGES;
(This last one seems to be missing the step of creating the airflow
user.)
What you expected to happen:
I would expect https://airflow.apache.org/docs/stable/howto/initialize-database.html to contain complete instructions for preparing the database backend for initialization.
How to reproduce it:
Try to install Airflow with a MySQL backend with no prior knowledge by following the Airflow documentation.
Anything else we need to know:
Airflow rocks!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 22 (21 by maintainers)
Commits related to this issue
- Add documentation for preparing database for Airflow Closes #10389 — committed to atsalolikhin-spokeo/airflow by atsalolikhin-spokeo 4 years ago
Thanks for your feedback. Wouldn’t you like to contribute this documentation change? You can do it even using Github UI. https://docs.github.com/en/github/managing-files-in-a-repository/editing-files-in-your-repository I am very happy to help with the review of this change.
pre-commit is optional. For small changes to the documentation, I very often post the changes without pre-commit to the CI. When an error occurs, I apply the correction locally and send the change again to CI. This is also the reason why I recommended editing the documentation via Github UI.
Yeah. The best contributions in docs are from those who suffered from lack of it. You can write it in the way that will be usable for other newcomers so I encourage you to contribute it @atsalolikhin-spokeo 😃