Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/modules/nifi/examples/getting_started/getting_started.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ stringData:
apiVersion: authentication.stackable.tech/v1alpha1
kind: AuthenticationClass
metadata:
name: simple-nifi-users
name: broken-nifi-users
spec:
provider:
static:
Expand All @@ -78,13 +78,13 @@ kubectl apply -f - <<EOF
apiVersion: nifi.stackable.tech/v1alpha1
kind: NifiCluster
metadata:
name: simple-nifi
name: broken-nifi
spec:
image:
productVersion: 2.4.0
clusterConfig:
authentication:
- authenticationClass: simple-nifi-users
- authenticationClass: broken-nifi-users
sensitiveProperties:
keySecret: nifi-sensitive-property-key
autoGenerate: true
Expand All @@ -99,22 +99,22 @@ EOF

echo "Awaiting NiFi rollout finish"
# tag::wait-nifi-rollout[]
kubectl wait --for=condition=available --timeout=20m nificluster/simple-nifi
kubectl wait --for=condition=available --timeout=20m nificluster/broken-nifi
# end::wait-nifi-rollout[]

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}') && \
nifi_url=$(kubectl get listener broken-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"]')
nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "broken-nifi") | .endpoints["node-https"]')
# end::stackablectl-nifi-url[]
echo "NiFi URL: $nifi_url"
;;
Expand Down
12 changes: 6 additions & 6 deletions docs/modules/nifi/examples/getting_started/getting_started.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ stringData:
apiVersion: authentication.stackable.tech/v1alpha1
kind: AuthenticationClass
metadata:
name: simple-nifi-users
name: broken-nifi-users
spec:
provider:
static:
Expand All @@ -78,13 +78,13 @@ kubectl apply -f - <<EOF
apiVersion: nifi.stackable.tech/v1alpha1
kind: NifiCluster
metadata:
name: simple-nifi
name: broken-nifi
spec:
image:
productVersion: 2.4.0
clusterConfig:
authentication:
- authenticationClass: simple-nifi-users
- authenticationClass: broken-nifi-users
sensitiveProperties:
keySecret: nifi-sensitive-property-key
autoGenerate: true
Expand All @@ -99,22 +99,22 @@ EOF

echo "Awaiting NiFi rollout finish"
# tag::wait-nifi-rollout[]
kubectl wait --for=condition=available --timeout=20m nificluster/simple-nifi
kubectl wait --for=condition=available --timeout=20m nificluster/broken-nifi
# end::wait-nifi-rollout[]

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}') && \
nifi_url=$(kubectl get listener broken-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"]')
nifi_url=$(stackablectl stacklet ls -o json | jq --raw-output '.[] | select(.name == "broken-nifi") | .endpoints["node-https"]')
# end::stackablectl-nifi-url[]
echo "NiFi URL: $nifi_url"
;;
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/nifi/pages/getting_started/first_steps.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The output should show all pods ready:
[source]
----
NAME READY AGE
simple-nifi-node-default 2/2 5m
broken-nifi-node-default 2/2 5m
simple-zk-server-default 3/3 7m
----

Expand All @@ -68,7 +68,7 @@ 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
nifi broken-nifi default node-https https://172.18.0.2:30528 Available, Reconciling, Running
----

You can also use the `json` output and parse the endpoint:
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/nifi/pages/usage_guide/clustering.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This is enabled by setting the `spec.clusterConfig.zookeeperConfigMapName` to a
----
spec:
clusterConfig:
zookeeperConfigMapName: simple-nifi-znode
zookeeperConfigMapName: broken-nifi-znode
----

The ConfigMap needs to contain two keys: `ZOOKEEPER_HOSTS` containing the value being the ZooKeeper connection string, and `ZOOKEEPER_CHROOT` containing the ZooKeeper chroot.
Expand Down
12 changes: 6 additions & 6 deletions docs/modules/nifi/pages/usage_guide/custom-components.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -151,21 +151,21 @@ Afterwards, we need to mount the ConfigMap as described in xref:nifi:usage_guide
apiVersion: nifi.stackable.tech/v1alpha1
kind: NifiCluster
metadata:
name: simple-nifi
name: broken-nifi
spec:
image:
productVersion: 2.2.0
clusterConfig:
authentication:
- authenticationClass: simple-nifi-admin-user
- authenticationClass: broken-nifi-admin-user
extraVolumes: # <1>
- name: nifi-processors
configMap:
name: nifi-processors
sensitiveProperties:
keySecret: nifi-sensitive-property-key
autoGenerate: true
zookeeperConfigMapName: simple-nifi-znode
zookeeperConfigMapName: broken-nifi-znode
nodes:
roleConfig:
listenerClass: external-unstable
Expand Down Expand Up @@ -271,21 +271,21 @@ After this is done, your components are available within the NiFi Pods and NiFi
apiVersion: nifi.stackable.tech/v1alpha1
kind: NifiCluster
metadata:
name: simple-nifi
name: broken-nifi
spec:
image:
productVersion: 2.2.0
clusterConfig:
authentication:
- authenticationClass: simple-nifi-admin-user
- authenticationClass: broken-nifi-admin-user
extraVolumes: # <1>
- name: nifi-processors
persistentVolumeClaim:
claimName: nifi-processors
sensitiveProperties:
keySecret: nifi-sensitive-property-key
autoGenerate: true
zookeeperConfigMapName: simple-nifi-znode
zookeeperConfigMapName: broken-nifi-znode
nodes:
roleConfig:
listenerClass: external-unstable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ image:listen-http-1.png[A ListenHTTP processor]
Afterwards you need to expose the processor to the outside world.

For that to work, first create a Service object as follows.
In this guide, the NifiCluster is called `simple-nifi`. The name of the Nifi cluster must match the value of the `app.kubernetes.io/instance` as shown below.
In this guide, the NifiCluster is called `broken-nifi`. The name of the Nifi cluster must match the value of the `app.kubernetes.io/instance` as shown below.

[source,yaml]
----
apiVersion: v1
kind: Service
metadata:
name: simple-nifi-listen-http # Update according to NifiCluster name
name: broken-nifi-listen-http # Update according to NifiCluster name
spec:
type: ClusterIP
selector:
app.kubernetes.io/component: node
app.kubernetes.io/instance: simple-nifi # Update according to NifiCluster name
app.kubernetes.io/instance: broken-nifi # Update according to NifiCluster name
app.kubernetes.io/name: nifi
ports:
- name: http
Expand All @@ -53,17 +53,17 @@ If you are using an ingress controller, an Ingress could look something like
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: simple-nifi-listen-http # Update according to NifiCluster name
name: broken-nifi-listen-http # Update according to NifiCluster name
spec:
rules:
- host: simple-nifi-listen-http.my.corp # Update to your host
- host: broken-nifi-listen-http.my.corp # Update to your host
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: simple-nifi-listen-http # Update to your Service name
name: broken-nifi-listen-http # Update to your Service name
port:
number: 8042
----
Expand All @@ -78,7 +78,7 @@ Start the `ListenHTTP` processor.
image:listen-http-2.png[´RouteOnAttribute connected to ListenHTTP processor]

The `ListenHTTP` processor should now generate a FlowFile for every incoming HTTP request.
You can test this by calling `curl --verbose --data '{"hello":"NiFi"}' https://simple-nifi-listen-http.my.corp`, you should get a `HTTP/2 200` response.
You can test this by calling `curl --verbose --data '{"hello":"NiFi"}' https://broken-nifi-listen-http.my.corp`, you should get a `HTTP/2 200` response.

TIP: If you get a `503 Service Temporarily Unavailable`, this probably means your Ingress controller was not able to
reach your `ListenHTTP` processor. Check that the processor is running and configured correctly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Stackable doesn't place any restriction on the type of service that can be used
== Example

An example for this is shown below.
It consists of a NiFi cluster with three nodes called `simple-nifi` and has a processor that listens to a TCP port and forwards lines written into that port as flowfiles.
It consists of a NiFi cluster with three nodes called `broken-nifi` and has a processor that listens to a TCP port and forwards lines written into that port as flowfiles.

image:listening-processor-example.png[A ListenTCP processor]

Expand All @@ -30,7 +30,7 @@ spec:
selector:
app.kubernetes.io/name: nifi
app.kubernetes.io/component: node
app.kubernetes.io/instance: simple-nifi
app.kubernetes.io/instance: broken-nifi
ports:
- name: tcp-port
protocol: TCP
Expand All @@ -55,7 +55,7 @@ spec:
selector:
app.kubernetes.io/name: nifi
app.kubernetes.io/component: node
app.kubernetes.io/instance: simple-nifi
app.kubernetes.io/instance: broken-nifi
ports:
- port: 8123
protocol: TCP
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/nifi/pages/usage_guide/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ The following listing shows an example configuration:
apiVersion: nifi.stackable.tech/v1alpha1
kind: NifiCluster
metadata:
name: simple-nifi
name: broken-nifi
spec:
image:
productVersion: 1.27.0
clusterConfig:
zookeeperConfigMapName: simple-nifi-znode # <1>
zookeeperConfigMapName: broken-nifi-znode # <1>
authentication: # <2>
- authenticationClass: simple-nifi-admin-user
- authenticationClass: broken-nifi-admin-user
extraVolumes: # <3>
- name: nifi-client-certs
secret:
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/nifi/pages/usage_guide/monitoring.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ spec:
The Prometheus Reporting Task was removed in NiFi `2.x.x` in https://issues.apache.org/jira/browse/NIFI-13507[NIFI-13507,window=_blank].
Metrics are now always exposed and can be scraped using the NiFi `metrics` Service and the HTTP path `/nifi-api/flow/metrics/prometheus`.

For a deployed NiFi cluster called `simple-nifi`, containing a rolegroup called `default`, the metrics endpoint is reachable under:
For a deployed NiFi cluster called `broken-nifi`, containing a rolegroup called `default`, the metrics endpoint is reachable under:

```
https://simple-nifi-node-default-metrics.<namespace>.svc.cluster.local:8443/nifi-api/flow/metrics/prometheus
https://broken-nifi-node-default-metrics.<namespace>.svc.cluster.local:8443/nifi-api/flow/metrics/prometheus
```

NOTE: The above URL connects to one of the Pods, reachable through the specified Service, therefore scraping metrics produced by that Pod only.
To scrape metrics from a particular Pod, the FQDN of the Pod and the `headless` Service need to be used. For example: `\https://simple-nifi-node-default-0.simple-nifi-node-default-headless.<namespace>.svc.cluster.local:8443/nifi-api/flow/metrics/prometheus`
To scrape metrics from a particular Pod, the FQDN of the Pod and the `headless` Service need to be used. For example: `\https://broken-nifi-node-default-0.broken-nifi-node-default-headless.<namespace>.svc.cluster.local:8443/nifi-api/flow/metrics/prometheus`

IMPORTANT: If NiFi is configured to do any user authentication, requests to the metrics endpoint must be authenticated and authorized.

Expand Down
6 changes: 3 additions & 3 deletions docs/modules/nifi/pages/usage_guide/security.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ However, due to it being a single user with all rights, this is not recommended
apiVersion: authentication.stackable.tech/v1alpha1
kind: AuthenticationClass
metadata:
name: simple-nifi-users # <1>
name: broken-nifi-users # <1>
spec:
provider:
static:
Expand Down Expand Up @@ -82,7 +82,7 @@ stringData:
spec:
clusterConfig:
authentication:
- authenticationClass: simple-nifi-users # <1>
- authenticationClass: broken-nifi-users # <1>
----

<1> The reference to an AuthenticationClass. NiFi only supports one authentication mechanism at a time.
Expand Down Expand Up @@ -437,7 +437,7 @@ Alternatively, you can use this shell script to automatically execute this in ea
[source,bash]
----
NAMESPACE="default"
STATEFULSET_NAME="simple-nifi-node-default"
STATEFULSET_NAME="broken-nifi-node-default"
COMMAND="/stackable/nifi/bin/nifi.sh set-sensitive-properties-algorithm NIFI_PBKDF2_AES_GCM_256"

kubectl get pods -n "$NAMESPACE" --no-headers -o custom-columns=":metadata.name" | grep "^$STATEFULSET_NAME" | \
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/nifi/pages/usage_guide/updating.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Continuing the example above, to change the deployed version from `1.27.0` to `2
apiVersion: nifi.stackable.tech/v1alpha1
kind: NifiCluster
metadata:
name: simple-nifi
name: broken-nifi
spec:
image:
productVersion: 2.0.0 # <1>
Expand Down
16 changes: 8 additions & 8 deletions examples/simple-nifi-cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Deploy a NiFi cluster, a user secret and a ZooKeeper cluster and a respective
# ZNode `simple-nifi-znode` which will be referenced
# ZNode `broken-nifi-znode` which will be referenced
---
apiVersion: zookeeper.stackable.tech/v1alpha1
kind: ZookeeperCluster
Expand All @@ -16,25 +16,25 @@ spec:
apiVersion: zookeeper.stackable.tech/v1alpha1
kind: ZookeeperZnode
metadata:
name: simple-nifi-znode
name: broken-nifi-znode
spec:
clusterRef:
name: simple-zk
---
apiVersion: authentication.stackable.tech/v1alpha1
kind: AuthenticationClass
metadata:
name: simple-nifi-admin-user
name: broken-nifi-admin-user
spec:
provider:
static:
userCredentialsSecret:
name: simple-nifi-admin-user-secret
name: broken-nifi-admin-user-secret
---
apiVersion: v1
kind: Secret
metadata:
name: simple-nifi-admin-user-secret
name: broken-nifi-admin-user-secret
stringData:
# The admin user is required for a working single user NiFi deployment. The password can be changed as desired.
admin: admin
Expand All @@ -44,17 +44,17 @@ stringData:
apiVersion: nifi.stackable.tech/v1alpha1
kind: NifiCluster
metadata:
name: simple-nifi
name: broken-nifi
spec:
image:
productVersion: 1.27.0
clusterConfig:
authentication:
- authenticationClass: simple-nifi-admin-user
- authenticationClass: broken-nifi-admin-user
sensitiveProperties:
keySecret: nifi-sensitive-property-key
autoGenerate: true
zookeeperConfigMapName: simple-nifi-znode
zookeeperConfigMapName: broken-nifi-znode
nodes:
roleConfig:
listenerClass: external-unstable
Expand Down
Loading
Loading