Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIRFLOW-8605] Added docker compose #8689

Closed
wants to merge 1 commit into from
Closed

[AIRFLOW-8605] Added docker compose #8689

wants to merge 1 commit into from

Conversation

habibdhif
Copy link

This adds a docker compose example to run Airflow installation.

The Compose defines multiple services to run Airflow. There is an init service which is an ephemeral container to initialize the database and creates a user if necessary. The init service command tries to run airflow list_users and if it fails it initializes the database and creates a user. Different approaches were considered but this one is simple enough and only involves airflow commands (no database-specific commands).

Extension fields are used for airflow environment variables to reduce code duplication.

I added some lines of documentation on IMAGES.rst but maybe there is a better place for that.

Issues: #8605 #8606

Make sure to mark the boxes below before creating PR: [x]

  • Description above provides context of the change
  • Unit tests coverage for changes (not needed for documentation changes)
  • Target Github ISSUE in description if exists
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions.
  • I will engage committers as explained in Contribution Workflow Example.

In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

@boring-cyborg
Copy link

boring-cyborg bot commented May 3, 2020

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, pylint and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://apache-airflow-slack.herokuapp.com/

@habibdhif habibdhif marked this pull request as draft May 3, 2020 14:00
@habibdhif habibdhif marked this pull request as ready for review May 3, 2020 14:02
@@ -416,3 +416,22 @@ signals). This entrypoint works as follows:

* If first argument is equal to "bash" - you are dropped in bash shell.
* If there are any arguments they are passed to "airflow" command

Docker Compose
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add this documentation to docs/*.rst? Otherwise this documentation will not be available to end users.

@BasPH
Copy link
Contributor

BasPH commented May 3, 2020

Note there's another PR for a docker-compose file: #8621

@habibdhif
Copy link
Author

Note there's another PR for a docker-compose file: #8621

Thanks for notifying me, closing the PR and moving this example under the #8605 issue.

@habibdhif habibdhif closed this May 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants