Created 10-05-2016 02:53 PM
What is the recommended way to handle multiple environments with Nifi, without editing the UI? Specifically, how can I manage differing controller and processor credentials between environments? For instance, if I have a DBCP controller service that connects to a DEV database in a DEV environment, how can I adjust the credentials so that the Nifi instance connects to a QA database in a QA environment without manually altering the values from within the Nifi UI itself.
flowfile.xml
file itself, I can see where sensitive values are stored as base64 encoded strings. Using the default security properties, is there a way to decrypt them and/or re-encode new credentials?Created 10-05-2016 04:23 PM
Using custom properties files should solve your needs perfectly. Bottom line is you configure your processor with NiFi Expression Language that references the custom property e.g ${my.cust.prop.name}. Each environment has its own instance of the custom property file -- with same property names as file deployed to other environments but values specific to the environment.
To implement this, open the nifi.properties file and set the field nifi.variable.registry.properties to a comma-delimited list of paths to custom property files. Be sure to make your property names unique if you are using more than one property file in the same envt. Also, they must be unique from system and environment properties.
See the following links for more information:
https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#Using_Custom_Properties
Note: You can also refer to system variables and environment variables the same way: ${system.variable.name}
Created 10-05-2016 04:23 PM
Using custom properties files should solve your needs perfectly. Bottom line is you configure your processor with NiFi Expression Language that references the custom property e.g ${my.cust.prop.name}. Each environment has its own instance of the custom property file -- with same property names as file deployed to other environments but values specific to the environment.
To implement this, open the nifi.properties file and set the field nifi.variable.registry.properties to a comma-delimited list of paths to custom property files. Be sure to make your property names unique if you are using more than one property file in the same envt. Also, they must be unique from system and environment properties.
See the following links for more information:
https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#Using_Custom_Properties
Note: You can also refer to system variables and environment variables the same way: ${system.variable.name}