From 241360f3adf729bba4b3a1c0766b4b2a494624bd Mon Sep 17 00:00:00 2001 From: dervoeti Date: Wed, 12 Mar 2025 19:04:04 +0100 Subject: [PATCH 1/7] docs: Add flow versioning guide for NiFi 2 --- .../pages/usage_guide/flow-versioning.adoc | 72 +++++++++++++++++++ docs/modules/nifi/partials/nav.adoc | 1 + 2 files changed, 73 insertions(+) create mode 100644 docs/modules/nifi/pages/usage_guide/flow-versioning.adoc diff --git a/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc b/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc new file mode 100644 index 00000000..0f25f261 --- /dev/null +++ b/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc @@ -0,0 +1,72 @@ += Flow Versioning + +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. + +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 + +1. In your NiFi UI, click on the hamburger menu (☰) in the top right corner +2. Select "Controller Settings" > "Registry Clients" +3. Click the "+" icon to add a new registry client +4. Select "GitHubFlowRegistryClient" or "GitLabFlowRegistryClient" as the client type and click "Add" +5. Click the three dots (⋮) on the right side of the client and select "Edit" +6. Fill in the following properties: + +[cols="1,3"] +|=== +|Property |Description + +|API URL +|The API URL, like `https://api.github.com` for GitHub.com or a self-hosted GitLab URL + +|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., `main`) + +|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., `/flows`) +|=== + +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: + +1. Right-click on a Process Group in your NiFi canvas +2. Select "Version" > "Start version control" +3. Select your configured registry client, the branch to use, and the bucket (directory) to store flows in +4. Provide a Flow Name and optional comments +5. Click "Save" to store the current version in the repository + +To update a versioned Process Group: + +1. Make changes to your Process Group +2. Right-click the Process Group +3. Select "Version" > "Commit local changes" +4. Add a comment describing your changes +5. Click "Save" to commit the changes + +To restore a previous version of a Process Group: + +1. Right-click the Process Group +2. Select "Version" > "Show version history" +3. Select the version you want to restore +4. Click "Restore" to revert to that version + +To import a flow from the registry: + +1. Drag the "Import from Registry" icon from the toolbar to the canvas +2. Select your configured registry client, the branch, the bucket (directory) and the flow to import +3. Click "Import" to add the flow to the canvas diff --git a/docs/modules/nifi/partials/nav.adoc b/docs/modules/nifi/partials/nav.adoc index cf5d74db..5c09e5ce 100644 --- a/docs/modules/nifi/partials/nav.adoc +++ b/docs/modules/nifi/partials/nav.adoc @@ -13,6 +13,7 @@ ** xref:nifi:usage_guide/updating.adoc[] ** xref:nifi:usage_guide/overrides.adoc[] ** xref:nifi:usage_guide/writing-to-iceberg-tables.adoc[] +** xref:nifi:usage_guide/flow-versioning.adoc[] ** xref:nifi:usage_guide/custom-components/index.adoc[] *** xref:nifi:usage_guide/custom-components/custom-nars.adoc[] *** xref:nifi:usage_guide/custom-components/custom-python-processors.adoc[] From 512810bdea0fa707753ba9f1cb4a77ca1cae76bf Mon Sep 17 00:00:00 2001 From: dervoeti Date: Wed, 12 Mar 2025 19:08:03 +0100 Subject: [PATCH 2/7] chore: Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index baa1990c..da22817b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file. - Run a `containerdebug` process in the background of each Nifi container to collect debugging information ([#730]). - Support configuring JVM arguments ([#724]). - Aggregate emitted Kubernetes events on the CustomResources ([#742]). +- Document flow versioning with NiFi 2 ([#761]). ### Changed @@ -26,6 +27,7 @@ All notable changes to this project will be documented in this file. [#741]: https://github.com/stackabletech/nifi-operator/pull/741 [#742]: https://github.com/stackabletech/nifi-operator/pull/742 [#758]: https://github.com/stackabletech/nifi-operator/pull/758 +[#761]: https://github.com/stackabletech/nifi-operator/pull/761 ## [24.11.1] - 2025-01-10 From 8adf2eb6a92469b4c6b5dcce665a812c3dc7011b Mon Sep 17 00:00:00 2001 From: dervoeti Date: Wed, 12 Mar 2025 20:31:46 +0100 Subject: [PATCH 3/7] chore: update ring --- Cargo.lock | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e0137ec8..87c46ab1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 4 +version = 3 [[package]] name = "addr2line" @@ -1879,7 +1879,7 @@ checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", - "zerocopy 0.8.21", + "zerocopy 0.8.23", ] [[package]] @@ -1981,15 +1981,14 @@ checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "ring" -version = "0.17.8" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", "getrandom 0.2.15", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -2387,12 +2386,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -3314,11 +3307,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.21" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf01143b2dd5d134f11f545cf9f1431b13b749695cb33bcce051e7568f99478" +checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6" dependencies = [ - "zerocopy-derive 0.8.21", + "zerocopy-derive 0.8.23", ] [[package]] @@ -3334,9 +3327,9 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.8.21" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712c8386f4f4299382c9abee219bee7084f78fb939d88b6840fcc1320d5f6da2" +checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" dependencies = [ "proc-macro2", "quote", From daa9c69d93e7e2b97ab57c8504e90854ba4b7963 Mon Sep 17 00:00:00 2001 From: dervoeti Date: Thu, 13 Mar 2025 15:26:43 +0100 Subject: [PATCH 4/7] docs: Clarify sensitive properties handling in flow versioning guide --- docs/modules/nifi/pages/usage_guide/flow-versioning.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc b/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc index 0f25f261..d1078d9b 100644 --- a/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc +++ b/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc @@ -50,6 +50,8 @@ Once you've configured a Flow Registry Client, you can use it to version your Pr 4. Provide a Flow Name and optional comments 5. Click "Save" to store the current version in the repository +IMPORTANT: 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: 1. Make changes to your Process Group From 8e73ef18a650a94cdafb9bbbd6b682c10c13eaf4 Mon Sep 17 00:00:00 2001 From: Lukas Krug Date: Fri, 14 Mar 2025 16:09:02 +0100 Subject: [PATCH 5/7] Update docs/modules/nifi/pages/usage_guide/flow-versioning.adoc Co-authored-by: Malte Sander --- docs/modules/nifi/pages/usage_guide/flow-versioning.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc b/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc index d1078d9b..77336357 100644 --- a/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc +++ b/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc @@ -47,7 +47,7 @@ Once you've configured a Flow Registry Client, you can use it to version your Pr 1. Right-click on a Process Group in your NiFi canvas 2. Select "Version" > "Start version control" 3. Select your configured registry client, the branch to use, and the bucket (directory) to store flows in -4. Provide a Flow Name and optional comments +4. Provide a flow name and optional comments 5. Click "Save" to store the current version in the repository IMPORTANT: Values of sensitive properties are not stored in the repository, so you must re-enter them when restoring a versioned flow from scratch. From 3a49de9df29f4c81ede4b75d073d7751cb8f2e1b Mon Sep 17 00:00:00 2001 From: Lukas Krug Date: Fri, 14 Mar 2025 16:09:35 +0100 Subject: [PATCH 6/7] Update docs/modules/nifi/pages/usage_guide/flow-versioning.adoc Co-authored-by: Malte Sander --- docs/modules/nifi/pages/usage_guide/flow-versioning.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc b/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc index 77336357..c75bf94d 100644 --- a/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc +++ b/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc @@ -11,7 +11,7 @@ Starting with Apache NiFi 2.0.0, you can connect directly to Git repositories us 1. In your NiFi UI, click on the hamburger menu (☰) in the top right corner 2. Select "Controller Settings" > "Registry Clients" 3. Click the "+" icon to add a new registry client -4. Select "GitHubFlowRegistryClient" or "GitLabFlowRegistryClient" as the client type and click "Add" +4. Select `GitHubFlowRegistryClient` or `GitLabFlowRegistryClient` as the client type and click "Add" 5. Click the three dots (⋮) on the right side of the client and select "Edit" 6. Fill in the following properties: From c84f2f5b847eaf2dc99808344c6cccf7d30be50e Mon Sep 17 00:00:00 2001 From: dervoeti Date: Fri, 14 Mar 2025 16:11:14 +0100 Subject: [PATCH 7/7] chore: spelling fix --- docs/modules/nifi/pages/usage_guide/flow-versioning.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc b/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc index d1078d9b..5c906fbb 100644 --- a/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc +++ b/docs/modules/nifi/pages/usage_guide/flow-versioning.adoc @@ -40,9 +40,9 @@ Starting with Apache NiFi 2.0.0, you can connect directly to Git repositories us Finally, click "Apply" to save the registry client configuration. -== Using Flow Registry Clients +== Using flow registry clients -Once you've configured a Flow Registry Client, you can use it to version your Process Groups: +Once you've configured a flow registry client, you can use it to version your Process Groups: 1. Right-click on a Process Group in your NiFi canvas 2. Select "Version" > "Start version control"