Created on 01-19-201808:13 PM - edited 08-17-201909:13 AM
This tutorial walks you through how to install and setup a local Apache NiFi Registry to integrate with Apache NiFi and start using versioned NiFi dataflows. It assumes basic experience with NiFi but little to no experience with NiFi Registry.
Note:By default the registry is unsecured. The port can be changed by editing the nifi-registry.properties file in the NiFi Registry conf directory (the exact property to change is nifi.registry.web.http.port), but the default port is 18080.
A Bucket is a container that stores and organizes flows in the Registry. The Registry is empty as there are no buckets/flows yet.
To create a bucket, select the Settings icon () in the top right corner of the screen. In the Buckets window that appears, select the "New Bucket" button.
Enter the bucket name "Test" and select the "Create" button.
The "Test" bucket is created:
There are no permissions configured by default, so anyone is able to view, create and modify buckets in this instance. For information on securing the Registry, see the NiFi Registry System Administrator’s Guide.
Apache NiFi Configuration
Connect NiFi to the Registry
With the Registry is running, we can tell NiFi about it.
In NiFi, select "Controller Settings" from the top-right Global menu:
Select the Registry Clients tab and the "+" button to add a new Registry Client. Enter a name and the URL of the Registry instance (http://localhost:18080):
Start Version Control on a Process Group
NiFi can now place a process group under version control which saves it as a flow resource in the Registry.
Right-click on a process group and select "Version→Start version control" from the context menu:
The local registry instance and "Test" bucket are chosen by default to store your flow since they are the only registry connected and bucket available. Enter a flow name, flow description, comments and select "Save":
As indicated by the Version State icon () in the top left corner of the component, the process group is now saved as a versioned flow in the registry.
Go back to the Registry UI and return to the main page to see the versioned flow you just saved (a refresh may be required):
Save Changes to a Versioned Flow
Changes made to the versioned process group can be reviewed, reverted or saved.
For example, if changes are made to the ABCD flow, the Version State changes to "Locally modified" (). The right-click menu will now show the options "Commit local changes", "Show local changes" or "Revert local changes":
Select "Show local changes" to see the details of the changes made:
Return to the context menu and select "Commit local changes". Enter comments and select "Save" to save the changes:
Version 2 of the flow is saved:
Note: Some actions made to the versioned process group are not considered local changes. More information can be found in the
Managing Local Changes section of the NiFi User Guide.
Import a Versioned Flow
With a flow existing in the Registry, we can use it to illustrate how to import a versioned process group.
In NiFi, select Process Group from the Components toolbar and drag it onto the canvas:
Instead of entering a name, click the Import link:
Choose the version of the flow you want imported and select "Import":
A second identical PG is now added:
To learn more about NiFi Registry functionality and working with versioned flows in NiFi, see the following links: