From 5f2b209b4a5b4403cacc410e342407bcd507138a Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Mon, 14 Jul 2025 17:43:49 +0200 Subject: [PATCH 1/8] docs: Mark NiFi 2.4.0 as supported --- docs/modules/nifi/partials/supported-versions.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/nifi/partials/supported-versions.adoc b/docs/modules/nifi/partials/supported-versions.adoc index c5bad944..f9d44aed 100644 --- a/docs/modules/nifi/partials/supported-versions.adoc +++ b/docs/modules/nifi/partials/supported-versions.adoc @@ -2,7 +2,7 @@ // This is a separate file, since it is used by both the direct NiFi-Operator documentation, and the overarching // Stackable Platform documentation. -* 2.4.0 (experimental) - Please note that you need to upgrade to at least 1.27.x before upgrading to 2.x.x! +* 2.4.0 (Please note that you need to upgrade to at least 1.27.x before upgrading to 2.x.x!) * 1.28.1 * 1.27.0 (LTS) From 468730666ad47ea0b3f21a90db76fdb0928fe1c7 Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Mon, 14 Jul 2025 17:45:19 +0200 Subject: [PATCH 2/8] docs(getting_started): Bump NiFi to 2.4.0 --- docs/modules/nifi/examples/getting_started/getting_started.sh | 2 +- .../modules/nifi/examples/getting_started/getting_started.sh.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/nifi/examples/getting_started/getting_started.sh b/docs/modules/nifi/examples/getting_started/getting_started.sh index fb25f97b..32109b02 100755 --- a/docs/modules/nifi/examples/getting_started/getting_started.sh +++ b/docs/modules/nifi/examples/getting_started/getting_started.sh @@ -139,7 +139,7 @@ metadata: name: simple-nifi spec: image: - productVersion: 1.28.1 + productVersion: 2.4.0 clusterConfig: authentication: - authenticationClass: simple-nifi-users diff --git a/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 b/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 index b9248c9e..9fa24343 100755 --- a/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 +++ b/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 @@ -139,7 +139,7 @@ metadata: name: simple-nifi spec: image: - productVersion: 1.28.1 + productVersion: 2.4.0 clusterConfig: authentication: - authenticationClass: simple-nifi-users From e3a4790f12cc1469be7bcfd6c8fa627f53d8abdb Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Mon, 14 Jul 2025 17:46:07 +0200 Subject: [PATCH 3/8] fix(getting_started): Use "node-https" endpoint --- docs/modules/nifi/examples/getting_started/getting_started.sh | 2 +- .../modules/nifi/examples/getting_started/getting_started.sh.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/nifi/examples/getting_started/getting_started.sh b/docs/modules/nifi/examples/getting_started/getting_started.sh index 32109b02..65ceeac4 100755 --- a/docs/modules/nifi/examples/getting_started/getting_started.sh +++ b/docs/modules/nifi/examples/getting_started/getting_started.sh @@ -208,7 +208,7 @@ echo "NiFi web interface: $nifi_url" echo "Getting NiFi endpoint with stackablectl ..." # tag::stackablectl-nifi-url[] -nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints.https') +nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints["node-https"]') # end::stackablectl-nifi-url[] echo "Endpoint: $nifi_url" diff --git a/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 b/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 index 9fa24343..cebc6604 100755 --- a/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 +++ b/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 @@ -207,7 +207,7 @@ echo "NiFi web interface: $nifi_url" echo "Getting NiFi endpoint with stackablectl ..." # tag::stackablectl-nifi-url[] -nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints.https') +nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints["node-https"]') # end::stackablectl-nifi-url[] echo "Endpoint: $nifi_url" From 9147fad9739d6c64e8b58a10bd8ec93a49e03042 Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Tue, 15 Jul 2025 11:18:10 +0200 Subject: [PATCH 4/8] docs(getting_started): Update guide to use the Listener address --- .../getting_started/getting_started.sh | 100 ++++++------------ .../getting_started/getting_started.sh.j2 | 57 +++------- .../pages/getting_started/first_steps.adoc | 44 +++----- 3 files changed, 59 insertions(+), 142 deletions(-) diff --git a/docs/modules/nifi/examples/getting_started/getting_started.sh b/docs/modules/nifi/examples/getting_started/getting_started.sh index 65ceeac4..a2c853d0 100755 --- a/docs/modules/nifi/examples/getting_started/getting_started.sh +++ b/docs/modules/nifi/examples/getting_started/getting_started.sh @@ -50,23 +50,6 @@ exit 1 ;; esac -internal=true -if [ $# -eq 2 ] -then - case "$2" in - "InternalIP") - internal=true - ;; - "ExternalIP") - internal=false - ;; - *) - echo "Need to provide 'InternalIP' or 'ExternalIP' as the connection type argument." - exit 1 - ;; - esac -fi - echo "Installing ZooKeeper" # tag::install-zookeeper[] kubectl apply -f - < Date: Tue, 15 Jul 2025 12:48:30 +0200 Subject: [PATCH 5/8] Get rid of Zookeeper, simply url gathering, better waiting --- .../getting_started/getting_started.sh | 98 ++++--------------- .../getting_started/getting_started.sh.j2 | 76 ++------------ .../pages/getting_started/first_steps.adoc | 76 ++------------ .../pages/getting_started/installation.adoc | 4 +- 4 files changed, 39 insertions(+), 215 deletions(-) diff --git a/docs/modules/nifi/examples/getting_started/getting_started.sh b/docs/modules/nifi/examples/getting_started/getting_started.sh index a2c853d0..f2b72ac4 100755 --- a/docs/modules/nifi/examples/getting_started/getting_started.sh +++ b/docs/modules/nifi/examples/getting_started/getting_started.sh @@ -29,7 +29,6 @@ echo "Installing Operators with Helm" helm install --wait commons-operator oci://oci.stackable.tech/sdp-charts/commons-operator --version 0.0.0-dev helm install --wait secret-operator oci://oci.stackable.tech/sdp-charts/secret-operator --version 0.0.0-dev helm install --wait listener-operator oci://oci.stackable.tech/sdp-charts/listener-operator --version 0.0.0-dev -helm install --wait zookeeper-operator oci://oci.stackable.tech/sdp-charts/zookeeper-operator --version 0.0.0-dev helm install --wait nifi-operator oci://oci.stackable.tech/sdp-charts/nifi-operator --version 0.0.0-dev # end::helm-install-operators[] ;; @@ -40,7 +39,6 @@ stackablectl operator install \ commons=0.0.0-dev \ secret=0.0.0-dev \ listener=0.0.0-dev \ - zookeeper=0.0.0-dev \ nifi=0.0.0-dev # end::stackablectl-install-operators[] ;; @@ -50,45 +48,6 @@ exit 1 ;; esac -echo "Installing ZooKeeper" -# tag::install-zookeeper[] -kubectl apply -f - <> by querying the REST API. == Setup -Two things need to be installed to create a NiFi cluster: - -* A ZooKeeper cluster for internal use by NiFi -* The NiFi cluster itself - -Create them in this order, each one is created by applying a manifest file. -The operators create the resources according to the manifest. - -=== Apache ZooKeeper - -To create a ZooKeeper instance run the following command: - -[source,bash] ----- -include::example$getting_started/getting_started.sh[tag=install-zookeeper] ----- - -Create a Znode object: - -[source,bash] ----- -include::example$getting_started/getting_started.sh[tag=install-znode] ----- - -The xref:zookeeper:znodes.adoc[ZNode] makes sure that the NiFi cluster operates in its own separated directory in ZooKeeper. - -=== Apache NiFi +We are going to install a NiFi cluster by applying a manifest file. +The operators create the resources according to the manifests. The NiFi cluster requires authentication. Create a set of credentials for this purpose: @@ -42,7 +17,7 @@ Create a set of credentials for this purpose: include::example$getting_started/getting_started.sh[tag=install-nifi-credentials] ---- -Finally create a NiFi instance: +Afterwards create a NiFi instance: [source,bash] ---- @@ -92,9 +67,8 @@ stackablectl stacklet list which should return something like this: ---- - PRODUCT NAME NAMESPACE ENDPOINTS CONDITIONS - nifi simple-nifi default node-https https://172.18.0.2:30528 Available, Reconciling, Running - zookeeper simple-zk default server-zk simple-zk-server.default.svc.cluster.local:2282 Available, Reconciling, Running + PRODUCT NAME NAMESPACE ENDPOINTS CONDITIONS + nifi simple-nifi default node-https https://172.18.0.2:30528 Available, Reconciling, Running ---- You can also use the `json` output and parse the endpoint: @@ -110,48 +84,18 @@ image::nifi-web-ui.png[] ==== Via kubectl -You can also extract the IP and port from the xref:listener-operator:listener.adoc[Listener] status via `kubectl`. - -Retrieve the Kubernetes node address where the NiFi pod is running: - -[source,bash] ----- -include::example$getting_started/getting_started.sh[tag=get-nifi-node-address] ----- - -which should output the Kubernetes node address: - -[source] ----- -NodeAddress: 172.18.0.2 ----- - -Finally, retrieve the NodePort of the `simple-nifi` listener: - -[source,bash] ----- -include::example$getting_started/getting_started.sh[tag=get-nifi-node-port] ----- - -which should output the NodePort: - -[source] ----- -NodePort: 30528 ----- - -Now build the full URL: +You can also extract the endpoint from the xref:listener-operator:listener.adoc[Listener] status via `kubectl`: [source,bash] ---- -include::example$getting_started/getting_started.sh[tag=create-nifi-url] +include::example$getting_started/getting_started.sh[tag=get-nifi-url] ---- -which should output a URL to connect to the NiFi web interface: +should output a URL to connect to the NiFi web interface: [source] ---- -NiFi web interface: https://172.18.0.2:30528 +NiFi URL: https://172.18.0.2:30528 ---- Then connect to `https://172.18.0.2:30528/nifi` and you should see the NiFi web login. After providing the username `admin` and password `admin` you are redirected to the NiFi web interface. diff --git a/docs/modules/nifi/pages/getting_started/installation.adoc b/docs/modules/nifi/pages/getting_started/installation.adoc index 017ba0fa..649b55c4 100644 --- a/docs/modules/nifi/pages/getting_started/installation.adoc +++ b/docs/modules/nifi/pages/getting_started/installation.adoc @@ -1,8 +1,8 @@ = Installation :description: Install the Stackable operator for Apache NiFi and its dependencies using stackablectl or Helm. Follow steps for a complete setup on Kubernetes. -On this page you install the Stackable operator for Apache NiFi and operators for its dependencies -- ZooKeeper -- -as well as the commons, secret and listener operator which are required by all Stackable operators. +On this page you install the Stackable operator for Apache NiFi as well as the commons, secret and listener operator, +which are required by all Stackable operators. There are multiple ways to install the Stackable operators. xref:management:stackablectl:index.adoc[] is the preferred way, but Helm is also supported. From 7ed915408684929ffa649006a310b204dd580ce7 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 15 Jul 2025 13:03:04 +0200 Subject: [PATCH 6/8] Intendation --- .../getting_started/getting_started.sh | 48 +++++++++---------- .../getting_started/getting_started.sh.j2 | 48 +++++++++---------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/docs/modules/nifi/examples/getting_started/getting_started.sh b/docs/modules/nifi/examples/getting_started/getting_started.sh index f2b72ac4..46aeae26 100755 --- a/docs/modules/nifi/examples/getting_started/getting_started.sh +++ b/docs/modules/nifi/examples/getting_started/getting_started.sh @@ -24,27 +24,27 @@ cd "$(dirname "$0")" case "$1" in "helm") -echo "Installing Operators with Helm" -# tag::helm-install-operators[] -helm install --wait commons-operator oci://oci.stackable.tech/sdp-charts/commons-operator --version 0.0.0-dev -helm install --wait secret-operator oci://oci.stackable.tech/sdp-charts/secret-operator --version 0.0.0-dev -helm install --wait listener-operator oci://oci.stackable.tech/sdp-charts/listener-operator --version 0.0.0-dev -helm install --wait nifi-operator oci://oci.stackable.tech/sdp-charts/nifi-operator --version 0.0.0-dev -# end::helm-install-operators[] + echo "Installing Operators with Helm" + # tag::helm-install-operators[] + helm install --wait commons-operator oci://oci.stackable.tech/sdp-charts/commons-operator --version 0.0.0-dev + helm install --wait secret-operator oci://oci.stackable.tech/sdp-charts/secret-operator --version 0.0.0-dev + helm install --wait listener-operator oci://oci.stackable.tech/sdp-charts/listener-operator --version 0.0.0-dev + helm install --wait nifi-operator oci://oci.stackable.tech/sdp-charts/nifi-operator --version 0.0.0-dev + # end::helm-install-operators[] ;; "stackablectl") -echo "installing Operators with stackablectl" -# tag::stackablectl-install-operators[] -stackablectl operator install \ - commons=0.0.0-dev \ - secret=0.0.0-dev \ - listener=0.0.0-dev \ - nifi=0.0.0-dev -# end::stackablectl-install-operators[] + echo "installing Operators with stackablectl" + # tag::stackablectl-install-operators[] + stackablectl operator install \ + commons=0.0.0-dev \ + secret=0.0.0-dev \ + listener=0.0.0-dev \ + nifi=0.0.0-dev + # end::stackablectl-install-operators[] ;; *) -echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" -exit 1 + echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" + exit 1 ;; esac @@ -113,15 +113,15 @@ case "$1" in ;; "stackablectl") -echo "Getting NiFi URL with stackablectl ..." -# tag::stackablectl-nifi-url[] -nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints["node-https"]') -# end::stackablectl-nifi-url[] -echo "NiFi URL: $nifi_url" + echo "Getting NiFi URL with stackablectl ..." + # tag::stackablectl-nifi-url[] + nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints["node-https"]') + # end::stackablectl-nifi-url[] + echo "NiFi URL: $nifi_url" ;; *) -echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" -exit 1 + echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" + exit 1 ;; esac diff --git a/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 b/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 index 8d4ce0d9..12eb3a8c 100755 --- a/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 +++ b/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 @@ -24,27 +24,27 @@ cd "$(dirname "$0")" case "$1" in "helm") -echo "Installing Operators with Helm" -# tag::helm-install-operators[] -helm install --wait commons-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/commons-operator --version {{ versions.commons }} -helm install --wait secret-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/secret-operator --version {{ versions.secret }} -helm install --wait listener-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/listener-operator --version {{ versions.listener }} -helm install --wait nifi-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/nifi-operator --version {{ versions.nifi }} -# end::helm-install-operators[] + echo "Installing Operators with Helm" + # tag::helm-install-operators[] + helm install --wait commons-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/commons-operator --version {{ versions.commons }} + helm install --wait secret-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/secret-operator --version {{ versions.secret }} + helm install --wait listener-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/listener-operator --version {{ versions.listener }} + helm install --wait nifi-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/nifi-operator --version {{ versions.nifi }} + # end::helm-install-operators[] ;; "stackablectl") -echo "installing Operators with stackablectl" -# tag::stackablectl-install-operators[] -stackablectl operator install \ - commons={{ versions.commons }} \ - secret={{ versions.secret }} \ - listener={{ versions.listener }} \ - nifi={{ versions.nifi }} -# end::stackablectl-install-operators[] + echo "installing Operators with stackablectl" + # tag::stackablectl-install-operators[] + stackablectl operator install \ + commons={{ versions.commons }} \ + secret={{ versions.secret }} \ + listener={{ versions.listener }} \ + nifi={{ versions.nifi }} + # end::stackablectl-install-operators[] ;; *) -echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" -exit 1 + echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" + exit 1 ;; esac @@ -113,15 +113,15 @@ case "$1" in ;; "stackablectl") -echo "Getting NiFi URL with stackablectl ..." -# tag::stackablectl-nifi-url[] -nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints["node-https"]') -# end::stackablectl-nifi-url[] -echo "NiFi URL: $nifi_url" + echo "Getting NiFi URL with stackablectl ..." + # tag::stackablectl-nifi-url[] + nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints["node-https"]') + # end::stackablectl-nifi-url[] + echo "NiFi URL: $nifi_url" ;; *) -echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" -exit 1 + echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" + exit 1 ;; esac From 9afa54e3d312a6ebdd9dcc79d8cc2bc36e461587 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 15 Jul 2025 13:32:39 +0200 Subject: [PATCH 7/8] intendation 2 --- .../getting_started/getting_started.sh.j2 | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 b/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 index 12eb3a8c..14ddd1a9 100755 --- a/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 +++ b/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 @@ -23,7 +23,7 @@ fi cd "$(dirname "$0")" case "$1" in -"helm") + "helm") echo "Installing Operators with Helm" # tag::helm-install-operators[] helm install --wait commons-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/commons-operator --version {{ versions.commons }} @@ -31,8 +31,8 @@ case "$1" in helm install --wait listener-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/listener-operator --version {{ versions.listener }} helm install --wait nifi-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/nifi-operator --version {{ versions.nifi }} # end::helm-install-operators[] -;; -"stackablectl") + ;; + "stackablectl") echo "installing Operators with stackablectl" # tag::stackablectl-install-operators[] stackablectl operator install \ @@ -41,11 +41,11 @@ case "$1" in listener={{ versions.listener }} \ nifi={{ versions.nifi }} # end::stackablectl-install-operators[] -;; -*) + ;; + *) echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" exit 1 -;; + ;; esac echo "Create NiFi admin credentials" @@ -103,26 +103,25 @@ kubectl wait --for=condition=available --timeout=20m nificluster/simple-nifi # end::wait-nifi-rollout[] case "$1" in -"helm") + "helm") echo "Getting the NiFi URL with kubectl" # tag::get-nifi-url[] nifi_url=$(kubectl get listener simple-nifi-node -o 'jsonpath=https://{.status.ingressAddresses[0].address}:{.status.ingressAddresses[0].ports.https}') && \ echo "NiFi URL: $nifi_url" # end::get-nifi-url[] - -;; -"stackablectl") + ;; + "stackablectl") echo "Getting NiFi URL with stackablectl ..." # tag::stackablectl-nifi-url[] nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints["node-https"]') # end::stackablectl-nifi-url[] echo "NiFi URL: $nifi_url" -;; -*) + ;; + *) echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" exit 1 -;; + ;; esac echo "Starting nifi tests" From 852c6421c7482b2081ba6da752d20f54dc446a6e Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Wed, 16 Jul 2025 10:03:45 +0200 Subject: [PATCH 8/8] chore(gett_started): Remove indentaion After adding indentation, I realised that this could affect the presentation of the script snippets in the rendered docs --- .../getting_started/getting_started.sh | 61 +++++++------- .../getting_started/getting_started.sh.j2 | 84 +++++++++---------- 2 files changed, 72 insertions(+), 73 deletions(-) diff --git a/docs/modules/nifi/examples/getting_started/getting_started.sh b/docs/modules/nifi/examples/getting_started/getting_started.sh index 46aeae26..4c0a1c80 100755 --- a/docs/modules/nifi/examples/getting_started/getting_started.sh +++ b/docs/modules/nifi/examples/getting_started/getting_started.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -# DO NOT EDIT THE SCRIPT +# DO NOT EDIT THE RENDERED SCRIPT # Instead, update the j2 template, and regenerate it for dev with `make render-docs`. # The getting started guide script @@ -24,27 +24,27 @@ cd "$(dirname "$0")" case "$1" in "helm") - echo "Installing Operators with Helm" - # tag::helm-install-operators[] - helm install --wait commons-operator oci://oci.stackable.tech/sdp-charts/commons-operator --version 0.0.0-dev - helm install --wait secret-operator oci://oci.stackable.tech/sdp-charts/secret-operator --version 0.0.0-dev - helm install --wait listener-operator oci://oci.stackable.tech/sdp-charts/listener-operator --version 0.0.0-dev - helm install --wait nifi-operator oci://oci.stackable.tech/sdp-charts/nifi-operator --version 0.0.0-dev - # end::helm-install-operators[] +echo "Installing Operators with Helm" +# tag::helm-install-operators[] +helm install --wait commons-operator oci://oci.stackable.tech/sdp-charts/commons-operator --version 0.0.0-dev +helm install --wait secret-operator oci://oci.stackable.tech/sdp-charts/secret-operator --version 0.0.0-dev +helm install --wait listener-operator oci://oci.stackable.tech/sdp-charts/listener-operator --version 0.0.0-dev +helm install --wait nifi-operator oci://oci.stackable.tech/sdp-charts/nifi-operator --version 0.0.0-dev +# end::helm-install-operators[] ;; "stackablectl") - echo "installing Operators with stackablectl" - # tag::stackablectl-install-operators[] - stackablectl operator install \ - commons=0.0.0-dev \ - secret=0.0.0-dev \ - listener=0.0.0-dev \ - nifi=0.0.0-dev - # end::stackablectl-install-operators[] +echo "installing Operators with stackablectl" +# tag::stackablectl-install-operators[] +stackablectl operator install \ + commons=0.0.0-dev \ + secret=0.0.0-dev \ + listener=0.0.0-dev \ + nifi=0.0.0-dev +# end::stackablectl-install-operators[] ;; *) - echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" - exit 1 +echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" +exit 1 ;; esac @@ -104,24 +104,23 @@ kubectl wait --for=condition=available --timeout=20m nificluster/simple-nifi case "$1" in "helm") - echo "Getting the NiFi URL with kubectl" - - # tag::get-nifi-url[] - nifi_url=$(kubectl get listener simple-nifi-node -o 'jsonpath=https://{.status.ingressAddresses[0].address}:{.status.ingressAddresses[0].ports.https}') && \ - echo "NiFi URL: $nifi_url" - # end::get-nifi-url[] +echo "Getting the NiFi URL with kubectl" +# tag::get-nifi-url[] +nifi_url=$(kubectl get listener simple-nifi-node -o 'jsonpath=https://{.status.ingressAddresses[0].address}:{.status.ingressAddresses[0].ports.https}') && \ +echo "NiFi URL: $nifi_url" +# end::get-nifi-url[] ;; "stackablectl") - echo "Getting NiFi URL with stackablectl ..." - # tag::stackablectl-nifi-url[] - nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints["node-https"]') - # end::stackablectl-nifi-url[] - echo "NiFi URL: $nifi_url" +echo "Getting NiFi URL with stackablectl ..." +# tag::stackablectl-nifi-url[] +nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints["node-https"]') +# end::stackablectl-nifi-url[] +echo "NiFi URL: $nifi_url" ;; *) - echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" - exit 1 +echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" +exit 1 ;; esac diff --git a/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 b/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 index 14ddd1a9..1064169f 100755 --- a/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 +++ b/docs/modules/nifi/examples/getting_started/getting_started.sh.j2 @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -# DO NOT EDIT THE SCRIPT +# DO NOT EDIT THE RENDERED SCRIPT # Instead, update the j2 template, and regenerate it for dev with `make render-docs`. # The getting started guide script @@ -23,29 +23,29 @@ fi cd "$(dirname "$0")" case "$1" in - "helm") - echo "Installing Operators with Helm" - # tag::helm-install-operators[] - helm install --wait commons-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/commons-operator --version {{ versions.commons }} - helm install --wait secret-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/secret-operator --version {{ versions.secret }} - helm install --wait listener-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/listener-operator --version {{ versions.listener }} - helm install --wait nifi-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/nifi-operator --version {{ versions.nifi }} - # end::helm-install-operators[] - ;; - "stackablectl") - echo "installing Operators with stackablectl" - # tag::stackablectl-install-operators[] - stackablectl operator install \ - commons={{ versions.commons }} \ - secret={{ versions.secret }} \ - listener={{ versions.listener }} \ - nifi={{ versions.nifi }} - # end::stackablectl-install-operators[] - ;; - *) - echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" - exit 1 - ;; +"helm") +echo "Installing Operators with Helm" +# tag::helm-install-operators[] +helm install --wait commons-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/commons-operator --version {{ versions.commons }} +helm install --wait secret-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/secret-operator --version {{ versions.secret }} +helm install --wait listener-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/listener-operator --version {{ versions.listener }} +helm install --wait nifi-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/nifi-operator --version {{ versions.nifi }} +# end::helm-install-operators[] +;; +"stackablectl") +echo "installing Operators with stackablectl" +# tag::stackablectl-install-operators[] +stackablectl operator install \ + commons={{ versions.commons }} \ + secret={{ versions.secret }} \ + listener={{ versions.listener }} \ + nifi={{ versions.nifi }} +# end::stackablectl-install-operators[] +;; +*) +echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" +exit 1 +;; esac echo "Create NiFi admin credentials" @@ -103,25 +103,25 @@ kubectl wait --for=condition=available --timeout=20m nificluster/simple-nifi # end::wait-nifi-rollout[] case "$1" in - "helm") - echo "Getting the NiFi URL with kubectl" +"helm") +echo "Getting the NiFi URL with kubectl" - # tag::get-nifi-url[] - nifi_url=$(kubectl get listener simple-nifi-node -o 'jsonpath=https://{.status.ingressAddresses[0].address}:{.status.ingressAddresses[0].ports.https}') && \ - echo "NiFi URL: $nifi_url" - # end::get-nifi-url[] - ;; - "stackablectl") - echo "Getting NiFi URL with stackablectl ..." - # tag::stackablectl-nifi-url[] - nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints["node-https"]') - # end::stackablectl-nifi-url[] - echo "NiFi URL: $nifi_url" - ;; - *) - echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" - exit 1 - ;; +# tag::get-nifi-url[] +nifi_url=$(kubectl get listener simple-nifi-node -o 'jsonpath=https://{.status.ingressAddresses[0].address}:{.status.ingressAddresses[0].ports.https}') && \ +echo "NiFi URL: $nifi_url" +# end::get-nifi-url[] +;; +"stackablectl") +echo "Getting NiFi URL with stackablectl ..." +# tag::stackablectl-nifi-url[] +nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "simple-nifi") | .endpoints["node-https"]') +# end::stackablectl-nifi-url[] +echo "NiFi URL: $nifi_url" +;; +*) +echo "Need to provide 'helm' or 'stackablectl' as an argument for which installation method to use!" +exit 1 +;; esac echo "Starting nifi tests"