Flow Versioning
The way described in this document to version flows is only available in NiFi 2.0.0 and later versions. Previous versions of NiFi relied exclusively on the NiFi Registry service for flow versioning. |
Starting with Apache NiFi 2.0.0, you can connect directly to Git repositories using either GitHub or GitLab as your flow registry without requiring a separate NiFi Registry service. This document explains how to configure and use these registry clients to version your NiFi flows.
Setting up the Registry Client
Configuration Steps
-
In your NiFi UI, click on the hamburger menu (☰) in the top right corner
-
Select "Controller Settings" > "Registry Clients"
-
Click the "+" icon to add a new registry client
-
Select
GitHubFlowRegistryClient
orGitLabFlowRegistryClient
as the client type and click "Add" -
Click the three dots (⋮) on the right side of the client and select "Edit"
-
Fill in the following properties:
Property | Description |
---|---|
API URL |
The API URL, like |
Repository Owner |
The username or organization name that owns the repository |
Repository Name |
The name of the repository where flows will be stored |
Default Branch |
The default branch to use (e.g., |
Authentication Type |
The type of authentication to use. You can choose "None" for public repositories, "Personal Access Token" or "App Installation" are required for private repositories and are also helpful for public repositories in order to avoid rate limits. |
Repository Path |
Directory within the repository to store flows (e.g., |
Finally, click "Apply" to save the registry client configuration.
Using flow registry clients
Once you’ve configured a flow registry client, you can use it to version your Process Groups:
-
Right-click on a Process Group in your NiFi canvas
-
Select "Version" > "Start version control"
-
Select your configured registry client, the branch to use, and the bucket (directory) to store flows in
-
Provide a flow name and optional comments
-
Click "Save" to store the current version in the repository
Values of sensitive properties are not stored in the repository, so you must re-enter them when restoring a versioned flow from scratch. |
To update a versioned Process Group:
-
Make changes to your Process Group
-
Right-click the Process Group
-
Select "Version" > "Commit local changes"
-
Add a comment describing your changes
-
Click "Save" to commit the changes
To restore a previous version of a Process Group:
-
Right-click the Process Group
-
Select "Version" > "Show version history"
-
Select the version you want to restore
-
Click "Restore" to revert to that version
To import a flow from the registry:
-
Drag the "Import from Registry" icon from the toolbar to the canvas
-
Select your configured registry client, the branch, the bucket (directory) and the flow to import
-
Click "Import" to add the flow to the canvas