Skip to content

Commit

Permalink
Update installation page (#15737)
Browse files Browse the repository at this point in the history
The installation page is updated with:

* updated Python/Kubernetes support policies
* added download information to installation page
  • Loading branch information
potiuk authored May 17, 2021
1 parent ed35818 commit 31894fa
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 18 deletions.
48 changes: 36 additions & 12 deletions docs/apache-airflow/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -263,22 +263,46 @@ If you don't want to install any extra providers, initially you can use the comm
pip install "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}"
Python versions support
'''''''''''''''''''''''
Support for Python and Kubernetes versions
''''''''''''''''''''''''''''''''''''''''''

As of Airflow 2.0 we agreed to certain rules we follow for Python support. They are based on the official
release schedule of Python, nicely summarized in the
`Python Developer's Guide <https://devguide.python.org/#status-of-python-branches>`_
As of Airflow 2.0 we agreed to certain rules we follow for Python and Kubernetes support.
They are based on the official release schedule of Python and Kubernetes, nicely summarized in the
`Python Developer's Guide <https://devguide.python.org/#status-of-python-branches>`_ and
`Kubernetes version skew policy <https://kubernetes.io/docs/setup/release/version-skew-policy>`_.

1. We end support for Python versions when they reach EOL (For Python 3.6 it means that we will stop supporting it
on 23.12.2021).
1. We drop support for Python and Kubernetes versions when they reach EOL. We drop support for those
EOL versions in master right after EOL date, and it is effectively removed when we release the
first new MINOR (Or MAJOR if there is no new MINOR version) of Airflow
For example for Python 3.6 it means that we drop support in master right after 23.12.2021, and the first
MAJOR or MINOR version of Airflow released after will not have it.

2. The "oldest" supported version of Python is the default one. "Default" is only meaningful in terms of
"smoke tests" in CI PRs which are run using this default version.
2. The "oldest" supported version of Python/Kubernetes is the default one. "Default" is only meaningful
in terms of "smoke tests" in CI PRs which are run using this default version and default reference
image available in DockerHub. Currently ``apache/airflow:latest`` and ``apache/airflow:2.0.2`` images
are both Python 3.6 images, however the first MINOR/MAJOR release of Airflow release after 23.12.2021 will
become Python 3.7 images.

3. We support a new version of Python/Kubernetes in master after they are officially released, as soon as we
make them work in our CI pipeline (which might not be immediate due to dependencies catching up with
new versions of Python mostly) we release a new images/support in Airflow based on the working CI setup.

Installing Airflow From Released Sources and packages
'''''''''''''''''''''''''''''''''''''''''''''''''''''

You can also install Airflow using the official sources and packages. Those sources and packages
released are the "official" sources of installation that you can use if you want to verify the
origin of the packages and want to verify checksums and signatures of the packages.

The packages are available at the
`Official Apache Software Foundations Downloads page <https://downloads.apache.org/airflow/>`_

The |version| downloads are available at:

* `Apache Airflow |version| sdist package <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-bin.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-bin.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-bin.tar.gz.sha512>`__)
* `Apache Airflow |version| wheel package <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-py3-none-any.whl.sha512>`__)
* `Apache Airflow |version| sources <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-source.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-source.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-source.tar.gz.sha512>`__)

3. We support a new version of Python after it is officially released, as soon as we manage to make
it works in our CI pipeline (which might not be immediate) and release a new version of Airflow
(non-Patch version) based on this CI set-up.

Set up a database
'''''''''''''''''
Expand Down
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,12 @@ def _get_rst_filepath_from_path(filepath: str):
html_extra_path = [
f"{ROOT_DIR}/docs/apache-airflow/start/airflow.sh",
]
html_extra_with_substituions = [
html_extra_with_substitutions = [
f"{ROOT_DIR}/docs/apache-airflow/start/docker-compose.yaml",
]
manual_substitutions_in_generated_html = [
"installation.html",
]

# -- Theme configuration -------------------------------------------------------
# Custom sidebar templates, maps document names to template names.
Expand Down
19 changes: 14 additions & 5 deletions docs/exts/extra_files_with_substitutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,28 @@ def copy_docker_compose(app, exception):
if exception or not isinstance(app.builder, builders.StandaloneHTMLBuilder):
return

# Replace `|version|` in the docker-compose.yaml that we produce in the built docs
for path in app.config.html_extra_with_substituions:
# Replace `|version|` in the docker-compose.yaml that requires manual substitutions
for path in app.config.html_extra_with_substitutions:
with open(path) as file:
with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output:
with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output_file:
for line in file:
output.write(line.replace('|version|', app.config.version))
output_file.write(line.replace('|version|', app.config.version))

# Replace `|version|` in the installation.html that requires manual substitutions (in links)
for path in app.config.manual_substitutions_in_generated_html:
with open(os.path.join(app.outdir, os.path.basename(path))) as input_file:
content = input_file.readlines()
with open(os.path.join(app.outdir, os.path.basename(path)), "wt") as output_file:
for line in content:
output_file.write(line.replace('|version|', app.config.version))


def setup(app):
"""Setup plugin"""
app.connect("build-finished", copy_docker_compose)

app.add_config_value("html_extra_with_substituions", [], '[str]')
app.add_config_value("html_extra_with_substitutions", [], '[str]')
app.add_config_value("manual_substitutions_in_generated_html", [], '[str]')

return {
'parallel_write_safe': True,
Expand Down
1 change: 1 addition & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ cgroupspy
changelog
charset
checklicence
checksums
chmod
chown
ci
Expand Down

0 comments on commit 31894fa

Please sign in to comment.