apache-airflow-providers-edge3 1.0.0rc1__tar.gz → 1.1.0rc1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/PKG-INFO +29 -17
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/README.rst +24 -11
- apache_airflow_providers_edge3-1.1.0rc1/docs/architecture.rst +189 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/docs/changelog.rst +32 -349
- apache_airflow_providers_edge3-1.1.0rc1/docs/commits.rst +47 -0
- apache_airflow_providers_edge3-1.1.0rc1/docs/deployment.rst +185 -0
- apache_airflow_providers_edge3-1.1.0rc1/docs/edge_executor.rst +107 -0
- apache_airflow_providers_edge3-1.1.0rc1/docs/img/distributed_architecture.svg +4 -0
- apache_airflow_providers_edge3-1.1.0rc1/docs/img/edge_package.svg +4 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/docs/index.rst +36 -12
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/docs/install_on_windows.rst +10 -16
- apache_airflow_providers_edge3-1.1.0rc1/docs/ui_plugin.rst +66 -0
- apache_airflow_providers_edge3-1.1.0rc1/docs/why_edge.rst +53 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/provider.yaml +31 -3
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/pyproject.toml +5 -11
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/__init__.py +1 -1
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/cli/api_client.py +2 -3
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/cli/edge_command.py +235 -10
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/example_dags/integration_test.py +23 -9
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/executors/edge_executor.py +16 -2
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/get_provider_info.py +8 -1
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/models/edge_worker.py +53 -2
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/version_compat.py +0 -1
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/worker_api/auth.py +2 -3
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/worker_api/routes/worker.py +15 -2
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/cli/test_edge_command.py +57 -2
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/worker_api/routes/test_worker.py +18 -0
- apache_airflow_providers_edge3-1.0.0rc1/docs/commits.rst +0 -163
- apache_airflow_providers_edge3-1.0.0rc1/docs/edge_executor.rst +0 -330
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/docs/cli-ref.rst +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/docs/conf.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/docs/configurations-ref.rst +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/docs/img/worker_hosts.png +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/docs/img/worker_maintenance.png +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/docs/installing-providers-from-sources.rst +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/docs/security.rst +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/LICENSE +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/cli/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/cli/dataclasses.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/example_dags/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/example_dags/win_notepad.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/example_dags/win_test.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/executors/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/models/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/models/edge_job.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/models/edge_logs.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/openapi/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/openapi/edge_worker_api_v1.yaml +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/plugins/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/plugins/edge_executor_plugin.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/plugins/templates/edge_worker_hosts.html +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/plugins/templates/edge_worker_jobs.html +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/worker_api/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/worker_api/app.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/worker_api/datamodels.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/worker_api/routes/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/worker_api/routes/_v2_compat.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/worker_api/routes/_v2_routes.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/worker_api/routes/health.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/worker_api/routes/jobs.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/src/airflow/providers/edge3/worker_api/routes/logs.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/conftest.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/cli/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/cli/test_api_client.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/cli/test_dataclasses.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/executors/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/executors/test_edge_executor.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/models/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/plugins/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/plugins/test_edge_executor_plugin.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/worker_api/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/worker_api/routes/__init__.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/worker_api/routes/test_health.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/worker_api/routes/test_jobs.py +0 -0
- {apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/tests/unit/edge3/worker_api/routes/test_logs.py +0 -0
{apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: apache-airflow-providers-edge3
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.1.0rc1
|
4
4
|
Summary: Provider package apache-airflow-providers-edge3 for Apache Airflow
|
5
5
|
Keywords: airflow-provider,edge3,airflow,integration
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
@@ -20,18 +20,17 @@ Classifier: Programming Language :: Python :: 3.10
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
22
22
|
Classifier: Topic :: System :: Monitoring
|
23
|
-
Requires-Dist: apache-airflow>=2.10.
|
23
|
+
Requires-Dist: apache-airflow>=2.10.0rc1
|
24
|
+
Requires-Dist: apache-airflow-providers-fab>=1.5.3rc1
|
24
25
|
Requires-Dist: pydantic>=2.11.0
|
25
26
|
Requires-Dist: retryhttp>=1.2.0,!=1.3.0
|
26
|
-
Requires-Dist: apache-airflow-providers-fab ; extra == "fab"
|
27
27
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
28
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-edge3/1.
|
29
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-edge3/1.
|
28
|
+
Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-edge3/1.1.0/changelog.html
|
29
|
+
Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-edge3/1.1.0
|
30
30
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
31
31
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
32
32
|
Project-URL: Source Code, https://github.com/apache/airflow
|
33
33
|
Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
34
|
-
Provides-Extra: fab
|
35
34
|
|
36
35
|
|
37
36
|
.. Licensed to the Apache Software Foundation (ASF) under one
|
@@ -58,10 +57,22 @@ Provides-Extra: fab
|
|
58
57
|
|
59
58
|
Package ``apache-airflow-providers-edge3``
|
60
59
|
|
61
|
-
Release: ``1.
|
60
|
+
Release: ``1.1.0``
|
62
61
|
|
63
62
|
|
64
|
-
Handle edge workers on remote sites via HTTP(s) connection and orchestrates work over distributed sites
|
63
|
+
Handle edge workers on remote sites via HTTP(s) connection and orchestrates work over distributed sites.
|
64
|
+
|
65
|
+
When tasks need to be executed on remote sites where the connection need to pass through
|
66
|
+
firewalls or other network restrictions, the Edge Worker can be deployed. The Edge Worker
|
67
|
+
is a lightweight process with reduced dependencies. The worker only needs to be able to
|
68
|
+
communicate with the central Airflow site via HTTPS.
|
69
|
+
|
70
|
+
In the central Airflow site the EdgeExecutor is used to orchestrate the work. The EdgeExecutor
|
71
|
+
is a custom executor which is used to schedule tasks on the edge workers. The EdgeExecutor can co-exist
|
72
|
+
with other executors (for example CeleryExecutor or KubernetesExecutor) in the same Airflow site.
|
73
|
+
|
74
|
+
Additional REST API endpoints are provided to distribute tasks and manage the edge workers. The endpoints
|
75
|
+
are provided by the API server.
|
65
76
|
|
66
77
|
|
67
78
|
Provider package
|
@@ -71,7 +82,7 @@ This is a provider package for ``edge3`` provider. All classes for this provider
|
|
71
82
|
are in ``airflow.providers.edge3`` python package.
|
72
83
|
|
73
84
|
You can find package information and changelog for the provider
|
74
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-edge3/1.
|
85
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-edge3/1.1.0/>`_.
|
75
86
|
|
76
87
|
Installation
|
77
88
|
------------
|
@@ -85,13 +96,14 @@ The package supports the following python versions: 3.9,3.10,3.11,3.12
|
|
85
96
|
Requirements
|
86
97
|
------------
|
87
98
|
|
88
|
-
|
89
|
-
PIP package
|
90
|
-
|
91
|
-
``apache-airflow``
|
92
|
-
``
|
93
|
-
``
|
94
|
-
|
99
|
+
================================ ===================
|
100
|
+
PIP package Version required
|
101
|
+
================================ ===================
|
102
|
+
``apache-airflow`` ``>=2.10.0``
|
103
|
+
``apache-airflow-providers-fab`` ``>=1.5.3``
|
104
|
+
``pydantic`` ``>=2.11.0``
|
105
|
+
``retryhttp`` ``>=1.2.0,!=1.3.0``
|
106
|
+
================================ ===================
|
95
107
|
|
96
108
|
Cross provider package dependencies
|
97
109
|
-----------------------------------
|
@@ -113,5 +125,5 @@ Dependent package
|
|
113
125
|
============================================================================================== =======
|
114
126
|
|
115
127
|
The changelog for the provider package can be found in the
|
116
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-edge3/1.
|
128
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-edge3/1.1.0/changelog.html>`_.
|
117
129
|
|
{apache_airflow_providers_edge3-1.0.0rc1 → apache_airflow_providers_edge3-1.1.0rc1}/README.rst
RENAMED
@@ -23,10 +23,22 @@
|
|
23
23
|
|
24
24
|
Package ``apache-airflow-providers-edge3``
|
25
25
|
|
26
|
-
Release: ``1.
|
26
|
+
Release: ``1.1.0``
|
27
27
|
|
28
28
|
|
29
|
-
Handle edge workers on remote sites via HTTP(s) connection and orchestrates work over distributed sites
|
29
|
+
Handle edge workers on remote sites via HTTP(s) connection and orchestrates work over distributed sites.
|
30
|
+
|
31
|
+
When tasks need to be executed on remote sites where the connection need to pass through
|
32
|
+
firewalls or other network restrictions, the Edge Worker can be deployed. The Edge Worker
|
33
|
+
is a lightweight process with reduced dependencies. The worker only needs to be able to
|
34
|
+
communicate with the central Airflow site via HTTPS.
|
35
|
+
|
36
|
+
In the central Airflow site the EdgeExecutor is used to orchestrate the work. The EdgeExecutor
|
37
|
+
is a custom executor which is used to schedule tasks on the edge workers. The EdgeExecutor can co-exist
|
38
|
+
with other executors (for example CeleryExecutor or KubernetesExecutor) in the same Airflow site.
|
39
|
+
|
40
|
+
Additional REST API endpoints are provided to distribute tasks and manage the edge workers. The endpoints
|
41
|
+
are provided by the API server.
|
30
42
|
|
31
43
|
|
32
44
|
Provider package
|
@@ -36,7 +48,7 @@ This is a provider package for ``edge3`` provider. All classes for this provider
|
|
36
48
|
are in ``airflow.providers.edge3`` python package.
|
37
49
|
|
38
50
|
You can find package information and changelog for the provider
|
39
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-edge3/1.
|
51
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-edge3/1.1.0/>`_.
|
40
52
|
|
41
53
|
Installation
|
42
54
|
------------
|
@@ -50,13 +62,14 @@ The package supports the following python versions: 3.9,3.10,3.11,3.12
|
|
50
62
|
Requirements
|
51
63
|
------------
|
52
64
|
|
53
|
-
|
54
|
-
PIP package
|
55
|
-
|
56
|
-
``apache-airflow``
|
57
|
-
``
|
58
|
-
``
|
59
|
-
|
65
|
+
================================ ===================
|
66
|
+
PIP package Version required
|
67
|
+
================================ ===================
|
68
|
+
``apache-airflow`` ``>=2.10.0``
|
69
|
+
``apache-airflow-providers-fab`` ``>=1.5.3``
|
70
|
+
``pydantic`` ``>=2.11.0``
|
71
|
+
``retryhttp`` ``>=1.2.0,!=1.3.0``
|
72
|
+
================================ ===================
|
60
73
|
|
61
74
|
Cross provider package dependencies
|
62
75
|
-----------------------------------
|
@@ -78,4 +91,4 @@ Dependent package
|
|
78
91
|
============================================================================================== =======
|
79
92
|
|
80
93
|
The changelog for the provider package can be found in the
|
81
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-edge3/1.
|
94
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-edge3/1.1.0/changelog.html>`_.
|
@@ -0,0 +1,189 @@
|
|
1
|
+
.. Licensed to the Apache Software Foundation (ASF) under one
|
2
|
+
or more contributor license agreements. See the NOTICE file
|
3
|
+
distributed with this work for additional information
|
4
|
+
regarding copyright ownership. The ASF licenses this file
|
5
|
+
to you under the Apache License, Version 2.0 (the
|
6
|
+
"License"); you may not use this file except in compliance
|
7
|
+
with the License. You may obtain a copy of the License at
|
8
|
+
|
9
|
+
.. http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
.. Unless required by applicable law or agreed to in writing,
|
12
|
+
software distributed under the License is distributed on an
|
13
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
KIND, either express or implied. See the License for the
|
15
|
+
specific language governing permissions and limitations
|
16
|
+
under the License.
|
17
|
+
|
18
|
+
Edge Provider Architecture
|
19
|
+
==========================
|
20
|
+
|
21
|
+
Airflow consist of several components which are connected like in the following diagram. The Edge Worker which is
|
22
|
+
deployed outside of the central Airflow cluster is connected via HTTP(s) to the API server of the Airflow cluster:
|
23
|
+
|
24
|
+
.. graphviz::
|
25
|
+
|
26
|
+
digraph A{
|
27
|
+
rankdir="TB"
|
28
|
+
node[shape="rectangle", style="rounded"]
|
29
|
+
|
30
|
+
|
31
|
+
subgraph cluster {
|
32
|
+
label="Cluster";
|
33
|
+
{rank = same; dag; database}
|
34
|
+
{rank = same; workers; scheduler; api}
|
35
|
+
|
36
|
+
workers[label="(Central) Workers"]
|
37
|
+
scheduler[label="Scheduler"]
|
38
|
+
api[label="API server"]
|
39
|
+
database[label="Database"]
|
40
|
+
dag[label="DAG files"]
|
41
|
+
|
42
|
+
api->workers
|
43
|
+
api->database
|
44
|
+
|
45
|
+
workers->dag
|
46
|
+
workers->database
|
47
|
+
|
48
|
+
scheduler->database
|
49
|
+
}
|
50
|
+
|
51
|
+
subgraph edge_worker_subgraph {
|
52
|
+
label="Edge site";
|
53
|
+
{rank = same; edge_worker; edge_dag}
|
54
|
+
edge_worker[label="Edge Worker"]
|
55
|
+
edge_dag[label="DAG files (Remote copy)"]
|
56
|
+
|
57
|
+
edge_worker->edge_dag
|
58
|
+
}
|
59
|
+
|
60
|
+
edge_worker->api[label="HTTP(s)"]
|
61
|
+
}
|
62
|
+
|
63
|
+
* **Workers** - Execute the assigned tasks - most standard setup has local or centralized workers, e.g. via Celery
|
64
|
+
* **Edge Workers** - Special workers which pull tasks via HTTP(s) as provided as feature via this provider package
|
65
|
+
* **Scheduler** - Responsible for adding the necessary tasks to the queue. The EdgeExecutor is running as a module inside the scheduler.
|
66
|
+
* **API server** - HTTP REST API Server provides access to DAG/task status information. The required end-points are
|
67
|
+
provided by the Edge provider plugin. The Edge Worker uses this API to pull tasks and send back the results.
|
68
|
+
* **Database** - Contains information about the status of tasks, Dags, Variables, connections, etc.
|
69
|
+
|
70
|
+
In detail the parts of the Edge provider are deployed as follows:
|
71
|
+
|
72
|
+
.. image:: img/edge_package.svg
|
73
|
+
:alt: Overview and communication of Edge Provider modules
|
74
|
+
|
75
|
+
* **EdgeExecutor** - The EdgeExecutor is running inside the core Airflow scheduler. It is responsible for
|
76
|
+
scheduling tasks and sending them to the Edge job queue in the database. The EdgeExecutor is a subclass of the
|
77
|
+
``airflow.executors.base_executor.BaseExecutor`` class. To activate the EdgeExecutor, you need to set the
|
78
|
+
``executor`` configuration option in the ``airflow.cfg`` file to
|
79
|
+
``airflow.providers.edge3.executors.EdgeExecutor``. For more details see :doc:`edge_executor`. Note that also
|
80
|
+
multiple executors can be used in parallel together with the EdgeExecutor.
|
81
|
+
* **API server** - The API server is providing REST endpoints to the web UI as well as serves static files. The
|
82
|
+
Edge provider adds a plugin that provides additional REST API for the Edge Worker as well as UI elements to
|
83
|
+
manage workers (currently Airflow 2.10 only).
|
84
|
+
The API server is responsible for handling requests from the Edge Worker and sending back the results. To
|
85
|
+
activate the API server, you need to set the ``api_enabled`` configuration option in ``edge`` section in the
|
86
|
+
``airflow.cfg`` file to ``True``. The API endpoints for edge is not started by default.
|
87
|
+
Fr more details see :doc:`ui_plugin`.
|
88
|
+
* **Database** - The Airflow meta database is used to store the status of tasks, Dags, Variables, connections
|
89
|
+
etc. The Edge provider uses the database to store the status of the Edge Worker instances and the tasks that
|
90
|
+
are assigned to it. The database is also used to store the results of the tasks that are executed by the
|
91
|
+
Edge Worker. Setup of needed tables and migration is done automatically when the provider package is deployed.
|
92
|
+
* **Edge Worker** - The Edge Worker is a lightweight process that runs on the edge device. It is responsible for
|
93
|
+
pulling tasks from the API server and executing them. The Edge Worker is a standalone process that can be
|
94
|
+
deployed on any machine that has access to the API server. It is designed to be lightweight and easy to
|
95
|
+
deploy. The Edge Worker is implemented as a command line tool that can be started with the ``airflow edge worker``
|
96
|
+
command. For more details see :doc:`deployment`.
|
97
|
+
|
98
|
+
Edge Worker State Model
|
99
|
+
-----------------------
|
100
|
+
|
101
|
+
Each Edge Worker is tracked from the API server such that it is known which worker is currently active. This is
|
102
|
+
for monitoring as well as administrators as else it is assumed a distributed monitoring and tracking is hard to
|
103
|
+
achieve. This also allows central management for administrative maintenance.
|
104
|
+
|
105
|
+
Workers send regular heartbeats to the API server to indicate that they are still alive. The heartbeats are used to
|
106
|
+
determine the state of the worker.
|
107
|
+
|
108
|
+
The following states are used to track the worker:
|
109
|
+
|
110
|
+
.. graphviz::
|
111
|
+
|
112
|
+
digraph edge_worker_state {
|
113
|
+
node [shape=circle];
|
114
|
+
|
115
|
+
STARTING[label="starting"];
|
116
|
+
IDLE[label="idle"];
|
117
|
+
RUNNING[label="running"];
|
118
|
+
TERMINATING[label="terminating"];
|
119
|
+
OFFLINE[label="offline"];
|
120
|
+
UNKNOWN[label="unknown"];
|
121
|
+
MAINTENANCE_REQUEST[label="maintenance request"];
|
122
|
+
MAINTENANCE_PENDING[label="maintenance pending"];
|
123
|
+
MAINTENANCE_MODE[label="maintenance mode"];
|
124
|
+
MAINTENANCE_EXIT[label="maintenance exit"];
|
125
|
+
OFFLINE_MAINTENANCE[label="offline maintenance"];
|
126
|
+
|
127
|
+
STARTING->IDLE[label="initialization"];
|
128
|
+
IDLE->RUNNING[label="new task"];
|
129
|
+
RUNNING->IDLE[label="all tasks completed"];
|
130
|
+
IDLE->MAINTENANCE_REQUEST[label="triggered by admin"];
|
131
|
+
RUNNING->MAINTENANCE_REQUEST[label="triggered by admin"];
|
132
|
+
MAINTENANCE_REQUEST->MAINTENANCE_PENDING[label="if running tasks > 0"];
|
133
|
+
MAINTENANCE_REQUEST->MAINTENANCE_MODE[label="if running tasks = 0"];
|
134
|
+
MAINTENANCE_PENDING->MAINTENANCE_MODE[label="running tasks = 0"];
|
135
|
+
MAINTENANCE_PENDING->MAINTENANCE_EXIT[label="triggered by admin"];
|
136
|
+
MAINTENANCE_MODE->MAINTENANCE_EXIT[label="triggered by admin"];
|
137
|
+
MAINTENANCE_EXIT->RUNNING[label="if running tasks > 0"];
|
138
|
+
MAINTENANCE_EXIT->IDLE[label="if running tasks = 0"];
|
139
|
+
IDLE->OFFLINE[label="on clean shutdown"];
|
140
|
+
RUNNING->TERMINATING[label="on clean shutdown if running tasks > 0"];
|
141
|
+
TERMINATING->OFFLINE[label="on clean shutdown if running tasks = 0"];
|
142
|
+
}
|
143
|
+
|
144
|
+
See also https://github.com/apache/airflow/blob/main/providers/edge3/src/airflow/providers/edge3/models/edge_worker.py#L45
|
145
|
+
for a documentation of details of all states of the Edge Worker.
|
146
|
+
|
147
|
+
Feature Backlog Edge Provider
|
148
|
+
-----------------------------
|
149
|
+
|
150
|
+
The current version of the EdgeExecutor is released with known limitations. It will mature over time.
|
151
|
+
|
152
|
+
The following features are known missing and will be implemented in increments:
|
153
|
+
|
154
|
+
- API token per worker: Today there is a global API token available only
|
155
|
+
- Edge Worker Plugin
|
156
|
+
|
157
|
+
- Make plugin working on Airflow 3.0, depending on AIP-68
|
158
|
+
- Overview about queues / jobs per queue
|
159
|
+
- Allow starting Edge Worker REST API separate to api-server
|
160
|
+
- Add some hints how to setup an additional worker
|
161
|
+
|
162
|
+
- Edge Worker CLI
|
163
|
+
|
164
|
+
- Use WebSockets instead of HTTP calls for communication
|
165
|
+
- Send logs also to TaskFileHandler if external logging services are used
|
166
|
+
- Integration into telemetry to send metrics from remote site
|
167
|
+
- Publish system metrics with heartbeats (CPU, Disk space, RAM, Load)
|
168
|
+
- Be more liberal e.g. on patch version. Currently requires exact version match
|
169
|
+
(In current state if versions do not match, the worker will gracefully shut
|
170
|
+
down when jobs are completed, no new jobs will be started)
|
171
|
+
|
172
|
+
- Tests
|
173
|
+
|
174
|
+
- System tests in Github, test the deployment of the worker with a Dag execution
|
175
|
+
- Test/Support on Windows for Edge Worker
|
176
|
+
|
177
|
+
- Scaling test - Check and define boundaries of workers/jobs. Today it is known to
|
178
|
+
scale into a range of 50 workers. This is not a hard limit but just an experience reported.
|
179
|
+
- Load tests - impact of scaled execution and code optimization
|
180
|
+
- Incremental logs during task execution can be served w/o shared log disk on api-server
|
181
|
+
- Reduce dependencies during execution: Today the worker depends on the airflow core with a lot
|
182
|
+
of transitive dependencies. Target is to reduce the dependencies to a minimum like TaskSDK
|
183
|
+
and providers only.
|
184
|
+
|
185
|
+
- Documentation
|
186
|
+
|
187
|
+
- Provide scripts and guides to install edge components as service (systemd)
|
188
|
+
- Extend Helm-Chart for needed support
|
189
|
+
- Provide an example docker compose for worker setup
|