如何使用状态更新从开发到生产的流程 [英] How to update flows from dev to prod with state

查看:28
本文介绍了如何使用状态更新从开发到生产的流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 nifi 流,它与 ListS3 处理器保持某种状态.我有一个开发实例和一个生产实例.我想要一些从 dev 部署到 prod 的选项,其中保留状态并且我不必手动进入并更改所有处理器和进程组.

这似乎不能用模板来完成?基于以下 stackoverflow 问题:

NIFI listfile 如何维护其时间戳?

为了避免误解,我想在部署时保持 prod 状态.

解决方案

听起来您没有使用 NiFi 注册表,因此您正在下载流模板,然后将其导入.这不能保留状态,因为它不是同一个流程.

你应该使用 NiFi Registry 来版本控制你的流程,它支持这个 Dev ->产品工作流程.

在 Dev NiFi 中构建您的流程,版本到注册表.

在 prod 中,添加一个新的进程组并在询问您名称时选择 Import 选项.您将能够选择您的版本化流程.

运行您的流程以存储一些状态.查看处理器状态以进行验证.

现在更新 Dev 中的流程,并将本地更改提交到 Registry.

然后,将 Prod 中的流程从 Registry 更新到最新版本.它将在有状态处理器上保留状态.

有关安装和安装的详细步骤使用注册表,请参阅以下链接:

https://nifi.apache.org/docs/nifi-registry-docs/html/getting-started.html

https://pierrevilard.com/2018/04/09/automate-workflow-deployment-in-apache-nifi-with-the-nifi-registry/

https://alasdairb.com/2021/03/22/nifi-in-production-nifi-registry/

https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.2.0/versioning-a-dataflow/content/connecting-to-a-nifi-registry.html>

https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.4.0/getting-started-with-nifi-registry/content/import-a-versioned-flow.html

https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.4.0/getting-started-with-nifi-registry/content/save-changes-to-a-versioned-flow.html

https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.4.0/getting-started-with-nifi-registry/content/start-version-control-on-a-process-group.html

I have a nifi flow it has keeps some state with the ListS3 processor. I have a dev instance and a prod instance. I want some options of deploying from dev to prod where the state is kept and where I don't manually have to go in and change all the processor's and process groups.

It seems like this can't be done with templates? Based on the following stackoverflow question:

how does NIFI listfile maintains its timestamp?

edit: Just so there is no misunderstanding I want to keep prod state when deploying.

解决方案

It sounds like you aren't using NiFi registry, so you're downloading a flow template and then importing it. This can't preserve state, as it's not the same flow.

You should be using NiFi Registry to version control your flows, which supports this Dev -> Prod workflow.

Build your flow in Dev NiFi, version to Registry.

In prod, add a new Process Group and select the Import option when it asks you for a name. You'll be able to pick your versioned flow.

Run your flow so that it stores some state. View the processors state to verify.

Now update the flow in Dev, and commit the local change to Registry.

Then, update the flow in Prod to the latest version from Registry. It will preserve state on the stateful processor.

For detailed steps on installing & using Registry, see these links:

https://nifi.apache.org/docs/nifi-registry-docs/html/getting-started.html

https://pierrevillard.com/2018/04/09/automate-workflow-deployment-in-apache-nifi-with-the-nifi-registry/

https://alasdairb.com/2021/03/22/nifi-in-production-nifi-registry/

https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.2.0/versioning-a-dataflow/content/connecting-to-a-nifi-registry.html

https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.4.0/getting-started-with-nifi-registry/content/import-a-versioned-flow.html

https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.4.0/getting-started-with-nifi-registry/content/save-changes-to-a-versioned-flow.html

https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.4.0/getting-started-with-nifi-registry/content/start-version-control-on-a-process-group.html

这篇关于如何使用状态更新从开发到生产的流程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆