Skip to content

Commit 5b06320

Browse files
authored
docs(getting-started): update stackablectl op install output (#732)
* chore(getting-started): add warning to generated script * docs(getting-started): update stackablectl op install output * fix(getting-started): revert kafkacat -> kcat change * chore(shellcheck): intentionally ignore warnings
1 parent 8d02ced commit 5b06320

File tree

4 files changed

+44
-12
lines changed

4 files changed

+44
-12
lines changed

docs/modules/kafka/examples/getting_started/getting_started.sh

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4+
# DO NOT EDIT THE SCRIPT
5+
# Instead, update the j2 template, and regenerate it for dev:
6+
# cat <<EOF | jinja2 --format yaml getting_started.sh.j2 -o getting_started.sh
7+
# helm:
8+
# repo_name: stackable-dev
9+
# repo_url: https://repo.stackable.tech/repository/helm-dev/
10+
# versions:
11+
# commons: 0.0.0-dev
12+
# kafka: 0.0.0-dev
13+
# listener: 0.0.0-dev
14+
# secret: 0.0.0-dev
15+
# zookeeper: 0.0.0-dev
16+
# EOF
17+
418
# The getting started guide script
519
# It uses tagged regions which are included in the documentation
620
# https://docs.asciidoctor.org/asciidoc/latest/directives/include-tagged-regions/
@@ -83,10 +97,12 @@ kubectl rollout status --watch --timeout=5m statefulset/simple-kafka-broker-defa
8397
# end::watch-kafka-rollout[]
8498

8599
echo "Starting port-forwarding of port 9092"
100+
# shellcheck disable=2069 # we want all output to be blackholed
86101
# tag::port-forwarding[]
87102
kubectl port-forward svc/simple-kafka 9092 2>&1 >/dev/null &
88103
# end::port-forwarding[]
89104
PORT_FORWARD_PID=$!
105+
# shellcheck disable=2064 # we want the PID evaluated now, not at the time the trap is
90106
trap "kill $PORT_FORWARD_PID" EXIT
91107

92108
sleep 15
@@ -98,12 +114,12 @@ echo "some test data" > data
98114

99115
echo "Writing test data"
100116
# tag::kcat-write-data[]
101-
kcat -b localhost:9092 -t test-data-topic -P data
117+
kafkacat -b localhost:9092 -t test-data-topic -P data
102118
# end::kcat-write-data[]
103119

104120
echo "Reading test data"
105121
# tag::kcat-read-data[]
106-
kcat -b localhost:9092 -t test-data-topic -C -e > read-data.out
122+
kafkacat -b localhost:9092 -t test-data-topic -C -e > read-data.out
107123
# end::kcat-read-data[]
108124

109125
echo "Check contents"

docs/modules/kafka/examples/getting_started/getting_started.sh.j2

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4+
# DO NOT EDIT THE SCRIPT
5+
# Instead, update the j2 template, and regenerate it for dev:
6+
# cat <<EOF | jinja2 --format yaml getting_started.sh.j2 -o getting_started.sh
7+
# helm:
8+
# repo_name: stackable-dev
9+
# repo_url: https://repo.stackable.tech/repository/helm-dev/
10+
# versions:
11+
# commons: 0.0.0-dev
12+
# kafka: 0.0.0-dev
13+
# listener: 0.0.0-dev
14+
# secret: 0.0.0-dev
15+
# zookeeper: 0.0.0-dev
16+
# EOF
17+
418
# The getting started guide script
519
# It uses tagged regions which are included in the documentation
620
# https://docs.asciidoctor.org/asciidoc/latest/directives/include-tagged-regions/
@@ -83,10 +97,12 @@ kubectl rollout status --watch --timeout=5m statefulset/simple-kafka-broker-defa
8397
# end::watch-kafka-rollout[]
8498

8599
echo "Starting port-forwarding of port 9092"
100+
# shellcheck disable=2069 # we want all output to be blackholed
86101
# tag::port-forwarding[]
87102
kubectl port-forward svc/simple-kafka 9092 2>&1 >/dev/null &
88103
# end::port-forwarding[]
89104
PORT_FORWARD_PID=$!
105+
# shellcheck disable=2064 # we want the PID evaluated now, not at the time the trap is
90106
trap "kill $PORT_FORWARD_PID" EXIT
91107

92108
sleep 15
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tag::stackablectl-install-operators-output[]
2-
[INFO ] Installing commons operator in version 0.0.0-dev
3-
[INFO ] Installing secret operator in version 0.0.0-dev
4-
[INFO ] Installing listener operator in version 0.0.0-dev
5-
[INFO ] Installing zookeeper operator in version 0.0.0-dev
6-
[INFO ] Installing kafka operator in version 0.0.0-dev
2+
Installing commons=0.0.0-dev operator
3+
Installing secret=0.0.0-dev operator
4+
Installing listener=0.0.0-dev operator
5+
Installing zookeeper=0.0.0-dev operator
6+
Installing kafka=0.0.0-dev operator
77
# end::stackablectl-install-operators-output[]
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# tag::stackablectl-install-operators-output[]
2-
[INFO ] Installing commons operator in version {{ versions.commons }}
3-
[INFO ] Installing secret operator in version {{ versions.secret }}
4-
[INFO ] Installing listener operator in version {{ versions.listener }}
5-
[INFO ] Installing zookeeper operator in version {{ versions.zookeeper }}
6-
[INFO ] Installing kafka operator in version {{ versions.kafka }}
2+
Installing commons={{ versions.commons }} operator
3+
Installing secret={{ versions.secret }} operator
4+
Installing listener={{ versions.listener }} operator
5+
Installing zookeeper={{ versions.zookeeper }} operator
6+
Installing kafka={{ versions.kafka }} operator
77
# end::stackablectl-install-operators-output[]

0 commit comments

Comments
 (0)