Skip to content

Commit d7eeeba

Browse files
authored
chore(nifi): Bump to 1.28.1, upgrade postgres jdbc driver (#154)
* chore(nifi): Bump to 2.2.0, upgrade postgres jdbc driver * chore(demo/signal-processing): Update postgresql version NiFi template * ci(container/nifi): Drop back to NiFi 1.28.1 due to issues with NiFi 2.x * chore(demo/signal-processing): Improve readability of job scripts * docs(demo/signal-processing): Improve demo docs * chore(demo/signal-processing): Drop back to NiFi 1.28.1 due to NiFi 2.x problems * chore(demo/nifi-kafka-druid-superset-s3): Drop back to NiFi 1.28.1 due to NiFi 2.x problems * chore(demo/data-lakehouse-iceberg-trino-spark): Drop back to NiFi 1.28.1 due to NiFi 2.x problems * chore(demo/signal-processing): Improve readability of setup jobs * chore(demo/signal-processing): Improve setup jobs * chore(demo/nifi-kafka-druid-water-level-data): Improve initialization jobs * chore(demo/nifi-kafka-druid-earthquake-data): Improve initialization jobs * chore(demo/signal-processing): Remove accidentally committed changes
1 parent b8cc2e9 commit d7eeeba

File tree

18 files changed

+310
-33
lines changed

18 files changed

+310
-33
lines changed

.github/workflows/dev_nifi.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ env:
55
IMAGE_NAME: nifi
66
# TODO (@NickLarsenNZ): Use a versioned image with stackable0.0.0-dev or stackableXX.X.X so that
77
# the demo is reproducable for the release and it will be automatically replaced for the release branch.
8-
IMAGE_VERSION: 1.27.0-postgresql
8+
IMAGE_VERSION: 1.28.1-postgresql
99
REGISTRY_PATH: stackable
1010
DOCKERFILE_PATH: "demos/signal-processing/Dockerfile-nifi"
1111

demos/demos-v2.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ demos:
6464
- s3
6565
- earthquakes
6666
manifests:
67+
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-earthquake-data/serviceaccount.yaml
6768
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-earthquake-data/create-nifi-ingestion-job.yaml
6869
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-earthquake-data/create-druid-ingestion-job.yaml
6970
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-earthquake-data/setup-superset.yaml
@@ -85,6 +86,7 @@ demos:
8586
- s3
8687
- water-levels
8788
manifests:
89+
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-water-level-data/serviceaccount.yaml
8890
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-water-level-data/create-nifi-ingestion-job.yaml
8991
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-water-level-data/create-druid-ingestion-job.yaml
9092
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-water-level-data/setup-superset.yaml

demos/nifi-kafka-druid-earthquake-data/create-druid-ingestion-job.yaml

+21-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,30 @@ metadata:
66
spec:
77
template:
88
spec:
9+
serviceAccountName: demo-serviceaccount
10+
initContainers:
11+
- name: wait-for-druid-coordinator
12+
image: oci.stackable.tech/sdp/tools:1.0.0-stackable0.0.0-dev
13+
command:
14+
- bash
15+
- -euo
16+
- pipefail
17+
- -c
18+
- |
19+
echo 'Waiting for Druid Coordinator to be created'
20+
kubectl wait --for=create pod/druid-coordinator-default-0
21+
echo 'Waiting for Druid Coordinator to be ready'
22+
kubectl wait --for=condition=Ready pod/druid-coordinator-default-0 --timeout=30m
923
containers:
1024
- name: create-druid-ingestion-job
1125
image: oci.stackable.tech/sdp/testing-tools:0.2.0-stackable0.0.0-dev
12-
command: ["bash", "-c", "curl -X POST --insecure -H 'Content-Type: application/json' -d @/tmp/ingestion-job-spec/ingestion-job-spec.json https://druid-coordinator:8281/druid/indexer/v1/supervisor"]
26+
command:
27+
- bash
28+
- -euo
29+
- pipefail
30+
- -c
31+
- |
32+
curl -X POST --insecure -H 'Content-Type: application/json' -d @/tmp/ingestion-job-spec/ingestion-job-spec.json https://druid-coordinator:8281/druid/indexer/v1/supervisor
1333
volumeMounts:
1434
- name: ingestion-job-spec
1535
mountPath: /tmp/ingestion-job-spec

demos/nifi-kafka-druid-earthquake-data/create-nifi-ingestion-job.yaml

+22-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,31 @@ metadata:
66
spec:
77
template:
88
spec:
9+
serviceAccountName: demo-serviceaccount
10+
initContainers:
11+
- name: wait-for-nifi
12+
image: oci.stackable.tech/sdp/tools:1.0.0-stackable0.0.0-dev
13+
command:
14+
- bash
15+
- -euo
16+
- pipefail
17+
- -c
18+
- |
19+
echo 'Waiting for NiFi to be created'
20+
kubectl wait --for=create pod/nifi-node-default-0 --timeout=30m
21+
echo 'Waiting for NiFi to be ready'
22+
kubectl wait --for=condition=Ready pod/nifi-node-default-0 --timeout=30m
923
containers:
1024
- name: create-nifi-ingestion-job
1125
image: oci.stackable.tech/sdp/testing-tools:0.2.0-stackable0.0.0-dev
12-
command: ["bash", "-c", "curl -O https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-earthquake-data/IngestEarthquakesToKafka.xml && python -u /tmp/script/script.py"]
26+
command:
27+
- bash
28+
- -euo
29+
- pipefail
30+
- -c
31+
- |
32+
curl -O https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-earthquake-data/IngestEarthquakesToKafka.xml
33+
python -u /tmp/script/script.py
1334
volumeMounts:
1435
- name: script
1536
mountPath: /tmp/script
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: demo-serviceaccount
6+
namespace: default
7+
---
8+
apiVersion: rbac.authorization.k8s.io/v1
9+
kind: ClusterRoleBinding
10+
metadata:
11+
name: demo-clusterrolebinding
12+
subjects:
13+
- kind: ServiceAccount
14+
name: demo-serviceaccount
15+
namespace: default
16+
roleRef:
17+
kind: ClusterRole
18+
name: demo-clusterrole
19+
apiGroup: rbac.authorization.k8s.io
20+
---
21+
apiVersion: rbac.authorization.k8s.io/v1
22+
kind: ClusterRole
23+
metadata:
24+
name: demo-clusterrole
25+
rules:
26+
- apiGroups:
27+
- ""
28+
resources:
29+
- pods
30+
verbs:
31+
- get
32+
- list
33+
- watch
34+
- apiGroups:
35+
- batch
36+
resources:
37+
- jobs
38+
verbs:
39+
- get
40+
- list
41+
- watch
42+
- apiGroups:
43+
- ""
44+
resources:
45+
- pods/exec
46+
verbs:
47+
- create

demos/nifi-kafka-druid-earthquake-data/setup-superset.yaml

+22-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,31 @@ metadata:
66
spec:
77
template:
88
spec:
9+
serviceAccountName: demo-serviceaccount
10+
initContainers:
11+
- name: wait-for-superset
12+
image: oci.stackable.tech/sdp/tools:1.0.0-stackable0.0.0-dev
13+
command:
14+
- bash
15+
- -euo
16+
- pipefail
17+
- -c
18+
- |
19+
echo 'Waiting for Superset to be created'
20+
kubectl wait --for=create pod/superset-node-default-0 --timeout=30m
21+
echo 'Waiting for Superset to be ready'
22+
kubectl wait --for=condition=Ready pod/superset-node-default-0 --timeout=30m
923
containers:
1024
- name: setup-superset
1125
image: oci.stackable.tech/sdp/testing-tools:0.2.0-stackable0.0.0-dev
12-
command: ["bash", "-c", "curl -o superset-assets.zip https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-earthquake-data/superset-assets.zip && python -u /tmp/script/script.py"]
26+
command:
27+
- bash
28+
- -euo
29+
- pipefail
30+
- -c
31+
- |
32+
curl -o superset-assets.zip https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-earthquake-data/superset-assets.zip
33+
python -u /tmp/script/script.py
1334
volumeMounts:
1435
- name: script
1536
mountPath: /tmp/script

demos/nifi-kafka-druid-water-level-data/create-druid-ingestion-job.yaml

+23-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,32 @@ metadata:
66
spec:
77
template:
88
spec:
9+
serviceAccountName: demo-serviceaccount
10+
initContainers:
11+
- name: wait-for-druid-coordinator
12+
image: oci.stackable.tech/sdp/tools:1.0.0-stackable0.0.0-dev
13+
command:
14+
- bash
15+
- -euo
16+
- pipefail
17+
- -c
18+
- |
19+
echo 'Waiting for Druid Coordinator to be created'
20+
kubectl wait --for=create pod/druid-coordinator-default-0
21+
echo 'Waiting for Druid Coordinator to be ready'
22+
kubectl wait --for=condition=Ready pod/druid-coordinator-default-0 --timeout=30m
923
containers:
1024
- name: create-druid-ingestion-job
1125
image: oci.stackable.tech/sdp/testing-tools:0.2.0-stackable0.0.0-dev
12-
command: ["bash", "-c", "curl -X POST --insecure -H 'Content-Type: application/json' -d @/tmp/ingestion-job-spec/stations-ingestion-job-spec.json https://druid-coordinator:8281/druid/indexer/v1/supervisor && curl -X POST --insecure -H 'Content-Type: application/json' -d @/tmp/ingestion-job-spec/measurements-ingestion-job-spec.json https://druid-coordinator:8281/druid/indexer/v1/supervisor && curl -X POST --insecure -H 'Content-Type: application/json' -d @/tmp/ingestion-job-spec/measurements-compaction-job-spec.json https://druid-coordinator:8281/druid/coordinator/v1/config/compaction"]
26+
command:
27+
- bash
28+
- -euo
29+
- pipefail
30+
- -c
31+
- |
32+
curl -X POST --insecure -H 'Content-Type: application/json' -d @/tmp/ingestion-job-spec/stations-ingestion-job-spec.json https://druid-coordinator:8281/druid/indexer/v1/supervisor
33+
curl -X POST --insecure -H 'Content-Type: application/json' -d @/tmp/ingestion-job-spec/measurements-ingestion-job-spec.json https://druid-coordinator:8281/druid/indexer/v1/supervisor
34+
curl -X POST --insecure -H 'Content-Type: application/json' -d @/tmp/ingestion-job-spec/measurements-compaction-job-spec.json https://druid-coordinator:8281/druid/coordinator/v1/config/compaction
1335
volumeMounts:
1436
- name: ingestion-job-spec
1537
mountPath: /tmp/ingestion-job-spec

demos/nifi-kafka-druid-water-level-data/create-nifi-ingestion-job.yaml

+22-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,31 @@ metadata:
66
spec:
77
template:
88
spec:
9+
serviceAccountName: demo-serviceaccount
10+
initContainers:
11+
- name: wait-for-nifi
12+
image: oci.stackable.tech/sdp/tools:1.0.0-stackable0.0.0-dev
13+
command:
14+
- bash
15+
- -euo
16+
- pipefail
17+
- -c
18+
- |
19+
echo 'Waiting for NiFi to be created'
20+
kubectl wait --for=create pod/nifi-node-default-0 --timeout=30m
21+
echo 'Waiting for NiFi to be ready'
22+
kubectl wait --for=condition=Ready pod/nifi-node-default-0 --timeout=30m
923
containers:
1024
- name: create-nifi-ingestion-job
1125
image: oci.stackable.tech/sdp/testing-tools:0.2.0-stackable0.0.0-dev
12-
command: ["bash", "-c", "curl -O https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-water-level-data/IngestWaterLevelsToKafka.xml && python -u /tmp/script/script.py"]
26+
command:
27+
- bash
28+
- -euo
29+
- pipefail
30+
- -c
31+
- |
32+
curl -O https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-water-level-data/IngestWaterLevelsToKafka.xml
33+
python -u /tmp/script/script.py
1334
volumeMounts:
1435
- name: script
1536
mountPath: /tmp/script
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: demo-serviceaccount
6+
namespace: default
7+
---
8+
apiVersion: rbac.authorization.k8s.io/v1
9+
kind: ClusterRoleBinding
10+
metadata:
11+
name: demo-clusterrolebinding
12+
subjects:
13+
- kind: ServiceAccount
14+
name: demo-serviceaccount
15+
namespace: default
16+
roleRef:
17+
kind: ClusterRole
18+
name: demo-clusterrole
19+
apiGroup: rbac.authorization.k8s.io
20+
---
21+
apiVersion: rbac.authorization.k8s.io/v1
22+
kind: ClusterRole
23+
metadata:
24+
name: demo-clusterrole
25+
rules:
26+
- apiGroups:
27+
- ""
28+
resources:
29+
- pods
30+
verbs:
31+
- get
32+
- list
33+
- watch
34+
- apiGroups:
35+
- batch
36+
resources:
37+
- jobs
38+
verbs:
39+
- get
40+
- list
41+
- watch
42+
- apiGroups:
43+
- ""
44+
resources:
45+
- pods/exec
46+
verbs:
47+
- create

demos/nifi-kafka-druid-water-level-data/setup-superset.yaml

+22-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,31 @@ metadata:
66
spec:
77
template:
88
spec:
9+
serviceAccountName: demo-serviceaccount
10+
initContainers:
11+
- name: wait-for-superset
12+
image: oci.stackable.tech/sdp/tools:1.0.0-stackable0.0.0-dev
13+
command:
14+
- bash
15+
- -euo
16+
- pipefail
17+
- -c
18+
- |
19+
echo 'Waiting for Superset to be created'
20+
kubectl wait --for=create pod/superset-node-default-0 --timeout=30m
21+
echo 'Waiting for Superset to be ready'
22+
kubectl wait --for=condition=Ready pod/superset-node-default-0 --timeout=30m
923
containers:
1024
- name: setup-superset
1125
image: oci.stackable.tech/sdp/testing-tools:0.2.0-stackable0.0.0-dev
12-
command: ["bash", "-c", "curl -o superset-assets.zip https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-water-level-data/superset-assets.zip && python -u /tmp/script/script.py"]
26+
command:
27+
- bash
28+
- -euo
29+
- pipefail
30+
- -c
31+
- |
32+
curl -o superset-assets.zip https://raw.githubusercontent.com/stackabletech/demos/main/demos/nifi-kafka-druid-water-level-data/superset-assets.zip
33+
python -u /tmp/script/script.py
1334
volumeMounts:
1435
- name: script
1536
mountPath: /tmp/script
+12-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1-
FROM oci.stackable.tech/sdp/nifi:1.27.0-stackable0.0.0-dev
1+
FROM oci.stackable.tech/sdp/nifi:1.28.1-stackable0.0.0-dev
22

3-
RUN curl --fail -o /stackable/nifi/postgresql-42.6.0.jar "https://repo.stackable.tech/repository/misc/postgresql-timescaledb/postgresql-42.6.0.jar"
3+
# This is the postgresql JDBC driver from https://jdbc.postgresql.org/download/
4+
# There appear to be no signatures to validate against 😬
5+
#
6+
# VERSION="42.7.5"
7+
# curl -O "https://jdbc.postgresql.org/download/postgresql-$VERSION.jar"
8+
# curl --fail -u "your_username" --upload-file "postgresql-$VERSION.jar" 'https://repo.stackable.tech/repository/misc/jdbc/'
9+
# rm "postgresql-$VERSION.jar"
10+
11+
# IMPORTANT (@NickLarsenNZ): Changing this version requires a change in the NiFi template (DownloadAndWriteToDB.xml)
12+
ARG DRIVER_VERSION="42.7.5"
13+
RUN curl --fail -o "/stackable/nifi/postgresql-$DRIVER_VERSION.jar" "https://repo.stackable.tech/repository/misc/jdbc/postgresql-$DRIVER_VERSION.jar"

demos/signal-processing/DownloadAndWriteToDB.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
</entry>
190190
<entry>
191191
<key>database-driver-locations</key>
192-
<value>/stackable/nifi/postgresql-42.6.0.jar</value>
192+
<value>/stackable/nifi/postgresql-42.7.5.jar</value>
193193
</entry>
194194
<entry>
195195
<key>kerberos-user-service</key>

0 commit comments

Comments
 (0)