Skip to content

Commit 241360f

Browse files
committed
docs: Add flow versioning guide for NiFi 2
1 parent 0b48f5e commit 241360f

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
= Flow Versioning
2+
3+
IMPORTANT: 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.
4+
5+
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.
6+
7+
== Setting up the Registry Client
8+
9+
=== Configuration Steps
10+
11+
1. In your NiFi UI, click on the hamburger menu (☰) in the top right corner
12+
2. Select "Controller Settings" > "Registry Clients"
13+
3. Click the "+" icon to add a new registry client
14+
4. Select "GitHubFlowRegistryClient" or "GitLabFlowRegistryClient" as the client type and click "Add"
15+
5. Click the three dots (⋮) on the right side of the client and select "Edit"
16+
6. Fill in the following properties:
17+
18+
[cols="1,3"]
19+
|===
20+
|Property |Description
21+
22+
|API URL
23+
|The API URL, like `https://api.github.com` for GitHub.com or a self-hosted GitLab URL
24+
25+
|Repository Owner
26+
|The username or organization name that owns the repository
27+
28+
|Repository Name
29+
|The name of the repository where flows will be stored
30+
31+
|Default Branch
32+
|The default branch to use (e.g., `main`)
33+
34+
|Authentication Type
35+
|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.
36+
37+
|Repository Path
38+
|Directory within the repository to store flows (e.g., `/flows`)
39+
|===
40+
41+
Finally, click "Apply" to save the registry client configuration.
42+
43+
== Using Flow Registry Clients
44+
45+
Once you've configured a Flow Registry Client, you can use it to version your Process Groups:
46+
47+
1. Right-click on a Process Group in your NiFi canvas
48+
2. Select "Version" > "Start version control"
49+
3. Select your configured registry client, the branch to use, and the bucket (directory) to store flows in
50+
4. Provide a Flow Name and optional comments
51+
5. Click "Save" to store the current version in the repository
52+
53+
To update a versioned Process Group:
54+
55+
1. Make changes to your Process Group
56+
2. Right-click the Process Group
57+
3. Select "Version" > "Commit local changes"
58+
4. Add a comment describing your changes
59+
5. Click "Save" to commit the changes
60+
61+
To restore a previous version of a Process Group:
62+
63+
1. Right-click the Process Group
64+
2. Select "Version" > "Show version history"
65+
3. Select the version you want to restore
66+
4. Click "Restore" to revert to that version
67+
68+
To import a flow from the registry:
69+
70+
1. Drag the "Import from Registry" icon from the toolbar to the canvas
71+
2. Select your configured registry client, the branch, the bucket (directory) and the flow to import
72+
3. Click "Import" to add the flow to the canvas

docs/modules/nifi/partials/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
** xref:nifi:usage_guide/updating.adoc[]
1414
** xref:nifi:usage_guide/overrides.adoc[]
1515
** xref:nifi:usage_guide/writing-to-iceberg-tables.adoc[]
16+
** xref:nifi:usage_guide/flow-versioning.adoc[]
1617
** xref:nifi:usage_guide/custom-components/index.adoc[]
1718
*** xref:nifi:usage_guide/custom-components/custom-nars.adoc[]
1819
*** xref:nifi:usage_guide/custom-components/custom-python-processors.adoc[]

0 commit comments

Comments
 (0)