本文介绍了自动化 NIFI 模板部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 nifi 的新手,我正在尝试了解(因为它看起来很多基于 GUI)是否有一种方法可以在 Nifi 上自动放大和缩小,以及如何使用 xml Nifi 模板并将其部署到集群.

I'm new to nifi and am trying to understand (since it looks many GUI based) if there is a way to automate scale up and down on Nifi and how one would take an xml Nifi template and deploy it to a cluster.

本质上,我们尝试做的是使用 Nifi 从 kafka 服务器收集 JMX 和日志文件,因为它们以自动方式出现,因此日志记录和 JMX 计数器开始流入,比如说 Elasticsearch 集群.

Essentially what we're trying to do is use Nifi to collect JMX and log files off of kafka servers as they come up in an automated fashion so logging and JMX counters start flowing to, lets say and Elasticsearch cluster.

例如,现在我们已经使用 Ansible 自动部署了 kafka 服务器,因此希望在集群部署的同时配置和部署 Nifi xml teamplates,因此不需要手动干预来收集 kafka jmx 计数器和日志文件.

For example, right now we've automated deployment of the kafka servers using Ansible, so the hope was to configure and deploy Nifi xml teamplates along with the cluster deployment so no manual intervention is required to collect the kafka jmx counters and log files.

如何在 Nifi 中实现自动化?

How would one automate this in Nifi?

推荐答案

有许多工具和技术可用于自动部署模板,包括:

There are a number of tools and techniques available to automate deployment of a template, including:

  • curl, see SO: Post a NIFI template via REST? - most basic API template deployment.
  • nifi-api-deploy - performs template deployment plus some migration tasks.
  • nifi-deploy-process-group - performs process group migration.

困难的部分是从现有流迁移到新流,尤其是在现有流可能已排队流文件,并且出处历史引用现有流的情况下.但是,如果您将 NiFi 集群的整个部署自动化并将模板部署到空白画布上,这可能不是问题.

The hard part is migrating from the existing flow to the new flow, especially where an existing flow may have queued flowfiles, and provenance history references the existing flow. But if you are automating the entire deployment of the NiFi cluster and deploying the template to an empty canvas, this might not be a problem.

您可以在 流程的配置管理.

这篇关于自动化 NIFI 模板部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 20:49