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

Create a documentation package for Docker image #14765

Merged
merged 5 commits into from
Mar 17, 2021

Conversation

mik-laj
Copy link
Member

@mik-laj mik-laj commented Mar 13, 2021

Depends on: #14762
Close: #14644 (comment)

I am extracting documentation for Docker image as a new documentation package to clearly separate documentation for apache-airflow pip package I Docker Image. Even though it is related, it is not the same. Docker Image is built on top of the apache-aiirflow package. Like the Helm Chart it is built on top of Docker Image.

This package has no versioning as its content is applicable to both Airflow 1.10 and Airflow 2.0.

For now, I have tried to limit the changes to the content to make sure everything was successfully migrated to the new package.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
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.

The variables that control the "execution" behaviour start with ``_AIRFLOW`` to distinguish them
from the variables used to build the image starting with ``AIRFLOW``.

The image entrypoint works as follows:
Copy link
Member Author

Choose a reason for hiding this comment

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

This section seems to have a lot of repetition with the following sections but I will update that in the next PR.


* The working directory is ``/opt/airflow`` by default.

* If ``AIRFLOW__CORE__SQL_ALCHEMY_CONN`` variable is passed to the container and it is either mysql or postgres
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not true for the image for Airflow 2.0. For Airflow 2.o, we use airflow db check command.

* ``redis://`` - default port 6379
* ``postgres://`` - default port 5432
* ``mysql://`` - default port 3306
* ``sqlite://``
Copy link
Member Author

Choose a reason for hiding this comment

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

It is not supported.

@mik-laj mik-laj requested a review from potiuk March 13, 2021 23:44

Here just a few examples are presented which should give you general understanding of what you can customize.

This builds production image in version 3.6 with default extras from the local sources (master version
Copy link
Member Author

Choose a reason for hiding this comment

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

We had these examples repeated twice in the documentation - once in the "Customizing the image" section and the second time under the tables in the "Production image build arguments" section. Some examples were common and some were different. Now we have one place with examples.

specific language governing permissions and limitations
under the License.

Entrypoint
Copy link
Member Author

Choose a reason for hiding this comment

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

This page contains a combination of content from several sections, incl., Using the production image, Actions executed at image start. It's not the best idea, but seems sufficient for now. I would like to write the "Using the production image" section a little differently so that the user can actually run Airflow after reading this page and that there would not be so much duplicate information.

@mik-laj mik-laj changed the title Docker image docs Create a documentation package for Docker image Mar 13, 2021
@github-actions
Copy link

The PR is likely ready to be merged. No tests are needed as no important environment files, nor python files were modified by it. However, committers might decide that full test matrix is needed and add the 'full tests needed' label. Then you should rebase it to the latest master or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Mar 16, 2021
Copy link
Member

@kaxil kaxil left a comment

Choose a reason for hiding this comment

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

This looks good, thanks @mik-laj -- some minor suggestions added

@mik-laj mik-laj merged commit 03d3c7d into apache:master Mar 17, 2021
potiuk added a commit to potiuk/airflow that referenced this pull request Mar 18, 2021
potiuk added a commit that referenced this pull request Mar 18, 2021
mik-laj added a commit to mik-laj/airflow that referenced this pull request Mar 20, 2021
@jwitz
Copy link
Contributor

jwitz commented Apr 6, 2021

@mik-laj Is this published on the web yet? I can't seem to find it.

@kaxil
Copy link
Member

kaxil commented Apr 6, 2021

@mik-laj Is this published on the web yet? I can't seem to find it.

It is at http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/docker-stack/index.html

You can find the latest docs (docs from Master) at s.apache.org/airflow-docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:documentation okay to merge It's ok to merge this PR as it does not require more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hard-to-find documentation for a Docker image
4 participants