Skip to content

docs(getting-started): update stackablectl op install output #732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 22, 2024
Merged
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
20 changes: 18 additions & 2 deletions docs/modules/kafka/examples/getting_started/getting_started.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail

# DO NOT EDIT THE SCRIPT
# Instead, update the j2 template, and regenerate it for dev:
# cat <<EOF | jinja2 --format yaml getting_started.sh.j2 -o getting_started.sh
# helm:
# repo_name: stackable-dev
# repo_url: https://repo.stackable.tech/repository/helm-dev/
# versions:
# commons: 0.0.0-dev
# kafka: 0.0.0-dev
# listener: 0.0.0-dev
# secret: 0.0.0-dev
# zookeeper: 0.0.0-dev
# EOF

# The getting started guide script
# It uses tagged regions which are included in the documentation
# https://docs.asciidoctor.org/asciidoc/latest/directives/include-tagged-regions/
Expand Down Expand Up @@ -83,10 +97,12 @@ kubectl rollout status --watch --timeout=5m statefulset/simple-kafka-broker-defa
# end::watch-kafka-rollout[]

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

sleep 15
Expand All @@ -98,12 +114,12 @@ echo "some test data" > data

echo "Writing test data"
# tag::kcat-write-data[]
kcat -b localhost:9092 -t test-data-topic -P data
kafkacat -b localhost:9092 -t test-data-topic -P data
# end::kcat-write-data[]

echo "Reading test data"
# tag::kcat-read-data[]
kcat -b localhost:9092 -t test-data-topic -C -e > read-data.out
kafkacat -b localhost:9092 -t test-data-topic -C -e > read-data.out
# end::kcat-read-data[]

echo "Check contents"
Expand Down
16 changes: 16 additions & 0 deletions docs/modules/kafka/examples/getting_started/getting_started.sh.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail

# DO NOT EDIT THE SCRIPT
# Instead, update the j2 template, and regenerate it for dev:
# cat <<EOF | jinja2 --format yaml getting_started.sh.j2 -o getting_started.sh
# helm:
# repo_name: stackable-dev
# repo_url: https://repo.stackable.tech/repository/helm-dev/
# versions:
# commons: 0.0.0-dev
# kafka: 0.0.0-dev
# listener: 0.0.0-dev
# secret: 0.0.0-dev
# zookeeper: 0.0.0-dev
# EOF

# The getting started guide script
# It uses tagged regions which are included in the documentation
# https://docs.asciidoctor.org/asciidoc/latest/directives/include-tagged-regions/
Expand Down Expand Up @@ -83,10 +97,12 @@ kubectl rollout status --watch --timeout=5m statefulset/simple-kafka-broker-defa
# end::watch-kafka-rollout[]

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

sleep 15
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tag::stackablectl-install-operators-output[]
[INFO ] Installing commons operator in version 0.0.0-dev
[INFO ] Installing secret operator in version 0.0.0-dev
[INFO ] Installing listener operator in version 0.0.0-dev
[INFO ] Installing zookeeper operator in version 0.0.0-dev
[INFO ] Installing kafka operator in version 0.0.0-dev
Installing commons=0.0.0-dev operator
Installing secret=0.0.0-dev operator
Installing listener=0.0.0-dev operator
Installing zookeeper=0.0.0-dev operator
Installing kafka=0.0.0-dev operator
# end::stackablectl-install-operators-output[]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tag::stackablectl-install-operators-output[]
[INFO ] Installing commons operator in version {{ versions.commons }}
[INFO ] Installing secret operator in version {{ versions.secret }}
[INFO ] Installing listener operator in version {{ versions.listener }}
[INFO ] Installing zookeeper operator in version {{ versions.zookeeper }}
[INFO ] Installing kafka operator in version {{ versions.kafka }}
Installing commons={{ versions.commons }} operator
Installing secret={{ versions.secret }} operator
Installing listener={{ versions.listener }} operator
Installing zookeeper={{ versions.zookeeper }} operator
Installing kafka={{ versions.kafka }} operator
# end::stackablectl-install-operators-output[]
Loading