There is a REST API that will allow you to export, import, instantiate, and 
update templates:

https://nifi.apache.org/docs/nifi-docs/

In addition, I’m working on a Java library (and Groovy shell) to make these 
kinds of tasks easier.  For your example, from the shell you could do something 
like:

nifi_dev = NiFi.bind('http://dev.my.com:8080')
nifi_prod = NiFi.bind('http://prod.my.com:8080')
nifi_prod.templates << nifi_dev.templates.’My Template’

I’m not sure that last line works yet, but you can export to file then import:

nifi_dev.templates.’My Template’ >> ‘/path/to/my_template.xml’
nifi_prod.templates << ‘/path/to/my_template.xml’

It’s still very much a work in progress but I hope it proves useful. Source 
code is here: https://github.com/mattyb149/nifi-client  I’ll get a version 0.2 
up to Bintray this week, but you can download (or clone) the folder and run 
“./gradlew shell” to get to the NiFi Shell.

Regards,
Matt

From:  "Tauzell, Dave" <[email protected]>
Reply-To:  <[email protected]>
Date:  Monday, January 11, 2016 at 1:49 PM
To:  "[email protected]" <[email protected]>
Subject:  RE: Deploying flows

Thanks.  Is there an API to deploy them?  Or is it manual.  If I update the 
template, do I delete the existing flow and then re-import the new flow as a 
template?

 

-Dave

 

Dave Tauzell | Senior Software Engineer | Surescripts

O: 651.855.3042 | www.surescripts.com |  [email protected]

Connect with us: Twitter I LinkedIn I Facebook I YouTube

 

 

From: Simon Ball [mailto:[email protected]] 
Sent: Monday, January 11, 2016 12:45 PM
To: [email protected]
Subject: Re: Deploying flows

 

You can do that by exporting templates, and then importing those to your prod 
environment and deploying them on that canvas. Note that this also means 
sensitive values will need to be reentered, which is usually a good thing when 
moving to a different environment. 

 

Simon

 

On 11 Jan 2016, at 13:42, Tauzell, Dave <[email protected]> wrote:

 

Hello,

 

How do I take a flow that I created in my development  environment and deploy 
it to production?  Is there a way to export and then import it with some way to 
have different attribute values in dev/production?

 

-Dave

 

Dave Tauzell | Senior Software Engineer | Surescripts

O: 651.855.3042 | www.surescripts.com |   [email protected]

Connect with us: Twitter I LinkedIn I Facebook I YouTube

 

 

This e-mail and any files transmitted with it are confidential, may contain 
sensitive information, and are intended solely for the use of the individual or 
entity to whom they are addressed. If you have received this e-mail in error, 
please notify the sender by reply e-mail immediately and destroy all copies of 
the e-mail and any attachments.

 

Reply via email to