简体   繁体   English

spring-xd部署解决方案?

[英]spring-xd Deployment solution?

I would like to run Spring-XD in a distributed set up. 我想在分布式设置中运行Spring-XD。 The processing part generally takes place in any one of the available containers. 处理部分通常在任何可用容器中进行。 If I have 100 containers, the manifest should be available in all the containers, since we do not know exactly to which container the job may be deployed. 如果我有100个容器,则清单应该在所有容器中都可用,因为我们不确切知道可以将作业部署到哪个容器。 Keeping the manifest/code in all the containers is the only solution? 将清单/代码保留在所有容器中是唯一的解决方案? Suggest a way so that the manifest is used only by the container where it is executed. 提出一种方法,使清单仅由执行清单的容器使用。

There are two different things that can be deployed: 可以部署两种不同的方法:

(A) you can deploy a stream of the form source | ... | sink (A)您可以部署表单source | ... | sink的流source | ... | sink source | ... | sink source | ... | sink together with a deployment manifest through the shell using stream create (...) . 使用stream create (...)在shell中与部署清单一起source | ... | sink Deployment manifests allows to specify the type of nodes where the modules of the stream are expected to run. 部署清单允许指定要在其中运行流模块的节点的类型。

(B) You can deploy custom modules, that you have written yourself to the xd-installation into the directory xd/modules/source , xd/modules/sink , xd/modules/processor , etc. (B)您可以部署自定义模块,您已将自己写到xd安装目录下到目录xd/modules/sourcexd/modules/sinkxd/modules/processor等。

If you are referring to (A): 如果您指的是(A):

Deployment manifests of jobs or streams are stored as persistent nodes within Zookeeper automatically when a stream is defined. 定义流后,作业或流的部署清单会自动存储为Zookeeper中的持久节点。 The Zookeeper process only runs on a single or some of the machines depending on your setup. Zookeeper进程仅在单个或某些计算机上运行,​​具体取决于您的设置。 See this section of the Spring XD Guide: 请参阅《 Spring XD Guide》的这一部分:

http://docs.spring.io/spring-xd/docs/current/reference/html/#_zookeeper_overview http://docs.spring.io/spring-xd/docs/current/reference/html/#_zookeeper_overview

I would not worry about how the deployment manifest is distributed. 我不用担心部署清单的分布方式。 This should simply work out of the box. 这应该可以直接使用。

If you are referring to (B) 如果您指的是(B)

Then you can deploy your module to all nodes using a single command in the spring-xd shell by typing module upload --file ... . 然后,您可以在spring-xd shell中使用单个命令,通过键入module upload --file ...将模块部署到所有节点。

See here: http://docs.spring.io/spring-xd/docs/current/reference/html/#install-the-source-module 参见此处: http : //docs.spring.io/spring-xd/docs/current/reference/html/#install-the-source-module

You could also set up your workers to read your custom module definition from a shared file system. 您还可以设置工作程序以从共享文件系统中读取自定义模块定义。 Yet this would introduce a single point of failure (the file system). 但这会引入单点故障(文件系统)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM