首页 > 解决方案 > 如何使用 Spring Cloud Dataflow 启动 Spring Batch 远程分区

问题描述

我正在尝试使用 Spring Cloud Dataflow 启动 Spring Batch Remote Partitioning。我有一个基于https://github.com/mminella/LearningSpringBatch/tree/master/src/remotePartitioning的远程分区

Spring Batch(主从)将在 Kubernetes 中运行,目前在 minikube 中运行。

SCDF 在 minikube 中运行。

然后启动从站:

java -jar -Dspring.profiles.active=从属目标/remote-partitioning-0.0.1-SNAPSHOT.jar

启动主:

java -jar -Dspring.profiles.active=master target/remote-partitioning-0.0.1-SNAPSHOT.jar time=$(date +%s)

在示例https://dataflow.spring.io/docs/batch-developer-guides/batch/data-flow-spring-batch/中注册并启动了一项任务。与作业关联的步骤保留在作业之下。

问题是,我如何启动 master 和 slave?为 master 注册一个任务(与 profile master 一起运行的 docker 镜像)和另一个为 slave(与 profile slave 一起运行的 docker 镜像)?

如何/在哪里为从站配置作业并行度?就我而言,我计划运行 3-5 个从站。

我在哪里分配/配置作业/步骤将运行的 Kubernetes 集群(在我的情况下是 minikube)?

我遇到的另一个问题是如何将 SCDF、docker 容器之间的参数传递给 java 启动器。如何从 Spring Cloud Dataflow 任务传递和参数到在 Kubernetes 中运行的 Spring Batch 作业

我只是找不到任何关于如何为远程分区执行此操作的示例/说明。任何帮助/领导表示赞赏。

谢谢,马库斯

标签: spring-batchspring-cloudspring-cloud-dataflowspring-cloud-task

解决方案


推荐阅读