You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2020/10/07 20:45:30 UTC
[airflow] branch master updated: Add environment variables
documentation to cli-ref.rst. (#10970)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new b4baa2b Add environment variables documentation to cli-ref.rst. (#10970)
b4baa2b is described below
commit b4baa2b04b3e13dacbcea4e11b69d784af8400e4
Author: Fai <46...@users.noreply.github.com>
AuthorDate: Wed Oct 7 13:43:48 2020 -0700
Add environment variables documentation to cli-ref.rst. (#10970)
Co-authored-by: Fai Hegberg <fa...@Fais-MacBook-Pro.local>
---
.github/boring-cyborg.yml | 2 +-
docs/cli-and-env-variables-ref.rst | 85 ++++++++++++++++++++++++++++++++++++++
docs/cli-ref.rst | 37 -----------------
docs/howto/variable.rst | 2 +
docs/index.rst | 2 +-
docs/redirects.txt | 4 ++
docs/usage-cli.rst | 2 +-
7 files changed, 94 insertions(+), 40 deletions(-)
diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml
index bcd0393..c08e034 100644
--- a/.github/boring-cyborg.yml
+++ b/.github/boring-cyborg.yml
@@ -130,7 +130,7 @@ labelPRBasedOnFilePath:
- airflow/bin/cli.py
- airflow/cli/**/*.py
- tests/cli/**/*.py
- - docs/cli-ref.rst
+ - docs/cli-and-env-variables-ref.rst
- docs/usage-cli.rst
area:Lineage:
diff --git a/docs/cli-and-env-variables-ref.rst b/docs/cli-and-env-variables-ref.rst
new file mode 100644
index 0000000..bdc51e4
--- /dev/null
+++ b/docs/cli-and-env-variables-ref.rst
@@ -0,0 +1,85 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ .. http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+.. _cli:
+
+Command Line Interface and Environment Variables Reference
+==========================================================
+
+Command Line Interface
+''''''''''''''''''''''
+
+Airflow has a very rich command line interface that allows for
+many types of operation on a DAG, starting services, and supporting
+development and testing.
+
+.. note::
+ For more information on usage CLI, see :doc:`usage-cli`
+
+.. contents:: Content
+ :local:
+ :depth: 2
+
+.. argparse::
+ :module: airflow.cli.cli_parser
+ :func: get_parser
+ :prog: airflow
+
+Environment Variables
+'''''''''''''''''''''
+
+.. envvar:: AIRFLOW__{SECTION}__{KEY}
+
+ Sets options in the Airflow configuration. This takes priority over the value in the ``airflow.cfg`` file.
+
+ Replace the ``{SECTION}`` placeholder with any section
+ and the ``{KEY}`` placeholder with any key in that specified section.
+
+ For example, if you want to set the ``dags_folder`` options in ``[core]`` section,
+ then you should set the ``AIRFLOW__CORE__DAGS_FOLDER`` environment variable.
+
+ For more information, see: :doc:`/howto/set-config`.
+
+.. envvar:: AIRFLOW__{SECTION}__{KEY}_CMD
+
+ For any specific key in a section in Airflow, execute the command the key is pointing to.
+ The result of the command is used as a value of the ``AIRFLOW__{SECTION}__{KEY}`` environment variable.
+
+.. envvar:: AIRFLOW_CONFIG
+
+ The path to the Airflow configuration file.
+
+.. envvar:: AIRFLOW_CONN_{CONN_ID}
+
+ Defines a new connection with the name ``{CONN_ID}`` using the URI value.
+
+ For example, if you want to create a connection named ``PROXY_POSTGRES_TCP``, you can create
+ a key ``AIRFLOW_CONN_PROXY_POSTGRES_TCP`` with the connection URI as the value.
+
+ For more information, see: :ref:`environment_variables_secrets_backend`.
+
+.. envvar:: AIRFLOW_HOME
+
+ The root directory for the Airflow content.
+ This is the default parent directory for Airflow assets such as DAGs and logs.
+
+.. envvar:: AIRFLOW_VAR_{KEY}
+
+ Defines an Airflow variable.
+ Replace the ``{KEY}`` placeholder with the variable name.
+
+ For more information, see: :ref:`managing_variables`.
diff --git a/docs/cli-ref.rst b/docs/cli-ref.rst
deleted file mode 100644
index 1a998eb..0000000
--- a/docs/cli-ref.rst
+++ /dev/null
@@ -1,37 +0,0 @@
- .. Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- .. http://www.apache.org/licenses/LICENSE-2.0
-
- .. Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
-.. _cli:
-
-Command Line Interface Reference
-================================
-
-Airflow has a very rich command line interface that allows for
-many types of operation on a DAG, starting services, and supporting
-development and testing.
-
-.. note::
- For more information on usage CLI, see :doc:`usage-cli`
-
-.. contents:: Content
- :local:
- :depth: 2
-
-.. argparse::
- :module: airflow.cli.cli_parser
- :func: get_parser
- :prog: airflow
diff --git a/docs/howto/variable.rst b/docs/howto/variable.rst
index 14d1046..1d30bed 100644
--- a/docs/howto/variable.rst
+++ b/docs/howto/variable.rst
@@ -15,6 +15,8 @@
specific language governing permissions and limitations
under the License.
+.. _managing_variables:
+
Managing Variables
==================
diff --git a/docs/index.rst b/docs/index.rst
index 2451c0a..47d649a 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -108,7 +108,7 @@ Content
:caption: References
Operators and hooks <operators-and-hooks-ref>
- CLI <cli-ref>
+ CLI <cli-and-env-variables-ref>
Macros <macros-ref>
Python API <_api/index>
Experimental REST API <rest-api-ref>
diff --git a/docs/redirects.txt b/docs/redirects.txt
index 3a60462..9c51d39 100644
--- a/docs/redirects.txt
+++ b/docs/redirects.txt
@@ -62,6 +62,10 @@ howto/operator/gcp/translate.rst howto/operator/google/cloud/translate.rst
howto/operator/gcp/translate_speech.rst howto/operator/google/cloud/translate_speech.rst
howto/operator/gcp/video_intelligence.rst howto/operator/google/cloud/video_intelligence.rst
howto/operator/gcp/vision.rst howto/operator/google/cloud/vision.rst
+
+# New URLs for CLI references
+cli-ref.rst cli-and-env-variables-ref.rst
+
# Departments without a separate index yet
howto/operator/google/suite/index.rst howto/operator/google/index.rst
howto/operator/google/firebase/index.rst howto/operator/google/index.rst
diff --git a/docs/usage-cli.rst b/docs/usage-cli.rst
index 3dc068d..a090d7a 100644
--- a/docs/usage-cli.rst
+++ b/docs/usage-cli.rst
@@ -22,7 +22,7 @@ Using the Command Line Interface
This document is meant to give an overview of all common tasks while using the CLI.
.. note::
- For more information on CLI commands, see :doc:`cli-ref`
+ For more information on CLI commands, see :doc:`cli-and-env-variables-ref`
.. _cli-remote: