为 Google 云数据流部署和管理 Python SDK Apache Beam 管道执行的便捷方法是什么

What is a convenient way to deploy and manage execution of a Python SDK Apache Beam pipeline for Google cloud Dataflow

一旦使用 Python SDK 和 DataflowRunner 在 Google 的云数据流中设计和测试了 Apache Beam 管道, 它在 Google 云中并管理其执行?

为 Google Cloud Dataflow 部署和管理 Python SDK Apache Beam 管道执行的简便方法是什么?

是否应该以某种方式打包?上传到 Google 存储?创建数据流模板?除了开发人员从其开发环境执行它之外,如何安排它的执行?

更新

最好不需要第 3 方工具,或者不需要额外的管理 tools/infrastructure,尤其是 Google 云和 Dataflow。

我想最方便的方法是使用 Airflow. This allows you to author, schedule, and monitor workflows. The Dataflow Operator can start your designed data pipeline. Airflow can be started either on a small VM, or by using Cloud Composer,这是 Google 云平台上的一个工具。

还有更多选项可以使您的工作流程自动化,例如 Jenkins, Azkaban, Rundeck,甚至 运行 一个简单的 cronjob(我不鼓励您使用)。您可能也想看看这些选项,但 Airflow 可能满足您的需求。

直觉上您会期望“deploying a pipeline” section under How-to guides of the Dataflow documentation will cover that. But you find an explanation of that only 8 sections below in the “templates overview”部分。

根据该部分:

Cloud Dataflow templates introduce a new development and execution workflow that differs from traditional job execution workflow. The template workflow separates the development step from the staging and execution steps.

通常您不会从 Google 云部署和执行数据流管道。但是,如果您需要与云中的非技术成员共享管道的执行,或者只是想触发它 而不依赖于开发环境或第 3 方工具 那么数据流模板就是您的最佳选择需要。

开发和测试管道后,您可以从中创建 Dataflow 作业模板。

请注意:

To create templates with the Cloud Dataflow SDK 2.x for Python, you must have version 2.0.0 or higher.

您将需要使用 DataflowRunner 和管道选项来执行您的管道,管道选项将在 Google 云存储而不是 运行 上生成模板。

有关详细信息,请参阅 creating templates documentation section and to run it from template refer to executing templates 部分。