Created on 09-08-2021 12:03 PM - last edited on 09-09-2021 05:41 AM by cjervis
We are trying to implement best practices in regards export/import via NiFi Registry. Currently we have one DEV site and multiple operational sites, ideally we would export from DEV and import into our various OPS sites. With that in mind I have a few questions:
Created 09-09-2021 10:27 AM
@jennings0131
Here are my thoughts based on your questions:
One of the easiest ways when getting started with the NiFi rest-api is to make use of the developer tools in your browser. With developer tools open you can perform the actions via the UI and observe the rest-api requests that are used. Most developer tools even allow you to copy that request as a curl command which you could simply execute from a terminal window to produce same outcome:
Automation would utilize a combination of NiFi CLI toolkit and NiFi Rest-api commands. Keep in mind that when you import a new flow version to another registry, NiFi will not know about it right away. NiFi checks NiFi-Registry for changes via a background thread.
What makes Parameters great:
1. Any property can utilize parameters (even those that do not support NiFi Expression Language
2. Once you create a parameter context and it is associated with a Process Group, you can easily convert existing component property values into parameters using the "convert to parameter" to the right of the property,
3. On the other NiFi site, you would not need to modify the processor properties. Simply associate a site specific parameter context to the PG that contains all the same parameters just with site specific values.
4. Even component password property values (sensitive encrypted properties) can be converted in to parameters.
[1] https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#Parameters
[2] https://nifi.apache.org/docs/nifi-docs/rest-api/index.html
[3] https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html#nifi_CLI
If you found this assisted with your query, please take a moment to login and click on "Accept as Solution" found below this post.
Thank you,
Matt
Created 09-09-2021 10:27 AM
@jennings0131
Here are my thoughts based on your questions:
One of the easiest ways when getting started with the NiFi rest-api is to make use of the developer tools in your browser. With developer tools open you can perform the actions via the UI and observe the rest-api requests that are used. Most developer tools even allow you to copy that request as a curl command which you could simply execute from a terminal window to produce same outcome:
Automation would utilize a combination of NiFi CLI toolkit and NiFi Rest-api commands. Keep in mind that when you import a new flow version to another registry, NiFi will not know about it right away. NiFi checks NiFi-Registry for changes via a background thread.
What makes Parameters great:
1. Any property can utilize parameters (even those that do not support NiFi Expression Language
2. Once you create a parameter context and it is associated with a Process Group, you can easily convert existing component property values into parameters using the "convert to parameter" to the right of the property,
3. On the other NiFi site, you would not need to modify the processor properties. Simply associate a site specific parameter context to the PG that contains all the same parameters just with site specific values.
4. Even component password property values (sensitive encrypted properties) can be converted in to parameters.
[1] https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#Parameters
[2] https://nifi.apache.org/docs/nifi-docs/rest-api/index.html
[3] https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html#nifi_CLI
If you found this assisted with your query, please take a moment to login and click on "Accept as Solution" found below this post.
Thank you,
Matt
Created 09-15-2021 12:06 PM
@MattWho Thank you for the thorough reply!
A couple things we will need to work out going forward with using Parameters:
1. a way to update site NiFi instances with any updates to the Parameter Contexts
2. a way to update the workflow via the Registry, but not change which Parameter Context the processor groups are assigned to.