Maestro:Netflix的工作流编排器

Maestro:Netflix的工作流编排器

maestro Maestro: Netflix’s Workflow Orchestrator maestro 项目地址: https://gitcode.com/gh_mirrors/maestro4/maestro

1. 项目介绍

Maestro 是一个通用的工作流编排器,为 Netflix 数据平台用户提供完全托管的工作流即服务(WAAS)。它服务于数千名用户,包括数据科学家、数据工程师、机器学习工程师、软件工程师、内容制作人和业务分析师等,用于各种使用场景。Maestro 每天调度数十万个工作流,数百万个任务,即使在流量高峰时也能严格遵守服务水平协议(SLO)。它具有高度的可扩展性,能够支持现有的和新使用场景,并为最终用户提供了增强的可用性。

2. 项目快速启动

环境准备

  • Git
  • Java 21
  • Gradle
  • Docker

构建项目

./gradlew build

运行项目

./gradlew bootRun

如果您想使用 AWS 模块运行项目:

docker compose -f maestro-aws/docker-compose.yml up
./gradlew bootRun --args='--spring.profiles.active=aws'

创建示例工作流

curl --header "user: tester" -X POST 'http://127.0.0.1:8080/api/v3/workflows' -H "Content-Type: application/json" -d @maestro-server/src/test/resources/samples/sample-dag-test-1.json

获取示例工作流定义

curl -X GET 'http://127.0.0.1:8080/api/v3/workflows/sample-dag-test-1/versions/latest'

触发运行示例工作流

curl --header "user: tester" -X POST 'http://127.0.0.1:8080/api/v3/workflows/sample-dag-test-1/versions/latest/actions/start' -H "Content-Type: application/json" -d '{"initiator": {"type": "manual"}}'

获取示例工作流实例

curl -X GET 'http://127.0.0.1:8080/api/v3/workflows/sample-dag-test-1/instances/1/runs/1'

删除示例工作流及其数据

curl --header "user: tester" -X DELETE 'http://127.0.0.1:8080/api/v3/workflows/sample-dag-test-1'

使用 Kubernetes 支持运行

确保 Kubernetes 配置正确,以便 kubectl 命令可以工作。

./gradlew bootRun

然后运行以下命令:

curl --header "user: tester" -X POST 'http://127.0.0.1:8080/api/v3/workflows' -H "Content-Type: application/json" -d @maestro-server/src/test/resources/samples/sample-kubernetes-wf.json
curl --header "user: tester" -X POST 'http://127.0.0.1:8080/api/v3/workflows/sample-kubernetes-wf/versions/latest/actions/start' -H "Content-Type: application/json" -d '{"initiator": {"type": "manual"}}'

3. 应用案例和最佳实践

  • 案例: Maestro 在 Netflix 内部被用于调度各种数据处理任务,包括数据迁移、ETL 任务、机器学习工作流等。
  • 最佳实践: 当设计工作流时,建议将任务分解成小的、可重用的组件,以便于管理和复用。

4. 典型生态项目

目前没有列出具体的项目,但是 Maestro 可以与各种数据处理和调度工具集成,例如 Apache Spark、Apache Airflow 等,以提供更完整的数据处理解决方案。

maestro Maestro: Netflix’s Workflow Orchestrator maestro 项目地址: https://gitcode.com/gh_mirrors/maestro4/maestro

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

宣海椒Queenly

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值