Skip to content

Commit 18f7415

Browse files
author
Felix Hennig
committedMar 21, 2023
Renamed getting-started.sh -> getting_started.sh (#561)
# Description Test doesn't work _yet_, but the renaming and test adaptions work on a custom cluster/locally. Follow up ticket: #569
1 parent 673d24b commit 18f7415

File tree

6 files changed

+42
-38
lines changed

6 files changed

+42
-38
lines changed
 

‎docs/modules/kafka/examples/getting_started/getting-started.sh renamed to ‎docs/modules/kafka/examples/getting_started/getting_started.sh

+15-13
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,24 @@ echo "Adding 'stackable-dev' Helm Chart repository"
2525
# tag::helm-add-repo[]
2626
helm repo add stackable-dev https://repo.stackable.tech/repository/helm-dev/
2727
# end::helm-add-repo[]
28+
echo "Updating Helm repositories"
29+
helm repo update
2830
echo "Installing Operators with Helm"
2931
# tag::helm-install-operators[]
30-
helm install --wait commons-operator stackable-dev/commons-operator --version 0.5.0-nightly
31-
helm install --wait secret-operator stackable-dev/secret-operator --version 0.6.0-nightly
32-
helm install --wait zookeeper-operator stackable-dev/zookeeper-operator --version 0.13.0-nightly
33-
helm install --wait kafka-operator stackable-dev/kafka-operator --version 0.9.0-nightly
32+
helm install --wait commons-operator stackable-dev/commons-operator --version 0.0.0-dev
33+
helm install --wait secret-operator stackable-dev/secret-operator --version 0.0.0-dev
34+
helm install --wait zookeeper-operator stackable-dev/zookeeper-operator --version 0.0.0-dev
35+
helm install --wait kafka-operator stackable-dev/kafka-operator --version 0.0.0-dev
3436
# end::helm-install-operators[]
3537
;;
3638
"stackablectl")
3739
echo "installing Operators with stackablectl"
3840
# tag::stackablectl-install-operators[]
3941
stackablectl operator install \
40-
commons=0.5.0-nightly \
41-
secret=0.6.0-nightly \
42-
zookeeper=0.13.0-nightly \
43-
kafka=0.9.0-nightly
42+
commons=0.0.0-dev \
43+
secret=0.0.0-dev \
44+
zookeeper=0.0.0-dev \
45+
kafka=0.0.0-dev
4446
# end::stackablectl-install-operators[]
4547
;;
4648
*)
@@ -59,23 +61,23 @@ echo "Installing ZNode from kafka-znode.yaml"
5961
kubectl apply -f kafka-znode.yaml
6062
# end::install-znode[]
6163

62-
sleep 5
64+
sleep 15
6365

6466
echo "Awaiting ZooKeeper rollout finish"
6567
# tag::watch-zookeeper-rollout[]
66-
kubectl rollout status --watch statefulset/simple-zk-server-default
68+
kubectl rollout status --watch --timeout=5m statefulset/simple-zk-server-default
6769
# end::watch-zookeeper-rollout[]
6870

6971
echo "Install KafkaCluster from kafka.yaml"
7072
# tag::install-kafka[]
7173
kubectl apply -f kafka.yaml
7274
# end::install-kafka[]
7375

74-
sleep 5
76+
sleep 15
7577

7678
echo "Awaiting Kafka rollout finish"
7779
# tag::watch-kafka-rollout[]
78-
kubectl rollout status --watch statefulset/simple-kafka-broker-default
80+
kubectl rollout status --watch --timeout=5m statefulset/simple-kafka-broker-default
7981
# end::watch-kafka-rollout[]
8082

8183
echo "Starting port-forwarding of port 9092"
@@ -85,7 +87,7 @@ kubectl port-forward svc/simple-kafka 9092 2>&1 >/dev/null &
8587
PORT_FORWARD_PID=$!
8688
trap "kill $PORT_FORWARD_PID" EXIT
8789

88-
sleep 5
90+
sleep 15
8991

9092
echo "Creating test data"
9193
# tag::kcat-create-data[]

‎docs/modules/kafka/examples/getting_started/getting-started.sh.j2 renamed to ‎docs/modules/kafka/examples/getting_started/getting_started.sh.j2

+7-5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ echo "Adding '{{ helm.repo_name }}' Helm Chart repository"
2525
# tag::helm-add-repo[]
2626
helm repo add {{ helm.repo_name }} {{ helm.repo_url }}
2727
# end::helm-add-repo[]
28+
echo "Updating Helm repositories"
29+
helm repo update
2830
echo "Installing Operators with Helm"
2931
# tag::helm-install-operators[]
3032
helm install --wait commons-operator {{ helm.repo_name }}/commons-operator --version {{ versions.commons }}
@@ -59,23 +61,23 @@ echo "Installing ZNode from kafka-znode.yaml"
5961
kubectl apply -f kafka-znode.yaml
6062
# end::install-znode[]
6163

62-
sleep 5
64+
sleep 15
6365

6466
echo "Awaiting ZooKeeper rollout finish"
6567
# tag::watch-zookeeper-rollout[]
66-
kubectl rollout status --watch statefulset/simple-zk-server-default
68+
kubectl rollout status --watch --timeout=5m statefulset/simple-zk-server-default
6769
# end::watch-zookeeper-rollout[]
6870

6971
echo "Install KafkaCluster from kafka.yaml"
7072
# tag::install-kafka[]
7173
kubectl apply -f kafka.yaml
7274
# end::install-kafka[]
7375

74-
sleep 5
76+
sleep 15
7577

7678
echo "Awaiting Kafka rollout finish"
7779
# tag::watch-kafka-rollout[]
78-
kubectl rollout status --watch statefulset/simple-kafka-broker-default
80+
kubectl rollout status --watch --timeout=5m statefulset/simple-kafka-broker-default
7981
# end::watch-kafka-rollout[]
8082

8183
echo "Starting port-forwarding of port 9092"
@@ -85,7 +87,7 @@ kubectl port-forward svc/simple-kafka 9092 2>&1 >/dev/null &
8587
PORT_FORWARD_PID=$!
8688
trap "kill $PORT_FORWARD_PID" EXIT
8789

88-
sleep 5
90+
sleep 15
8991

9092
echo "Creating test data"
9193
# tag::kcat-create-data[]
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# tag::stackablectl-install-operators-output[]
2-
[INFO ] Installing commons operator in version 0.5.0-nightly
3-
[INFO ] Installing secret operator in version 0.6.0-nightly
4-
[INFO ] Installing zookeeper operator in version 0.13.0-nightly
5-
[INFO ] Installing kafka operator in version 0.9.0-nightly
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 zookeeper operator in version 0.0.0-dev
5+
[INFO ] Installing kafka operator in version 0.0.0-dev
66
# end::stackablectl-install-operators-output[]

‎docs/modules/kafka/pages/getting_started/first_steps.adoc

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ and apply it:
2525

2626
[source,bash]
2727
----
28-
include::example$getting_started/getting-started.sh[tag=install-zookeeper]
28+
include::example$getting_started/getting_started.sh[tag=install-zookeeper]
2929
----
3030

3131
Create a file `kafka-znode.yaml` with the following content:
@@ -39,7 +39,7 @@ and apply it:
3939

4040
[source,bash]
4141
----
42-
include::example$getting_started/getting-started.sh[tag=install-znode]
42+
include::example$getting_started/getting_started.sh[tag=install-znode]
4343
----
4444

4545
=== Kafka
@@ -54,7 +54,7 @@ include::example$getting_started/kafka.yaml[]
5454
and apply it:
5555

5656
----
57-
include::example$getting_started/getting-started.sh[tag=install-kafka]
57+
include::example$getting_started/getting_started.sh[tag=install-kafka]
5858
----
5959

6060
This will create the actual Kafka instance.
@@ -81,37 +81,37 @@ simple-zk-server-default 3/3 7m
8181
Then, create a port-forward for the Kafka Broker:
8282

8383
----
84-
include::example$getting_started/getting-started.sh[tag=port-forwarding]
84+
include::example$getting_started/getting_started.sh[tag=port-forwarding]
8585
----
8686

8787
Create a file containing some data:
8888

8989
----
90-
include::example$getting_started/getting-started.sh[tag=kcat-create-data]
90+
include::example$getting_started/getting_started.sh[tag=kcat-create-data]
9191
----
9292

9393
Write that data:
9494

9595
----
96-
include::example$getting_started/getting-started.sh[tag=kcat-write-data]
96+
include::example$getting_started/getting_started.sh[tag=kcat-write-data]
9797
----
9898

9999
Read that data:
100100

101101
----
102-
include::example$getting_started/getting-started.sh[tag=kcat-read-data]
102+
include::example$getting_started/getting_started.sh[tag=kcat-read-data]
103103
----
104104

105105
Check the content:
106106

107107
----
108-
include::example$getting_started/getting-started.sh[tag=kcat-check-data]
108+
include::example$getting_started/getting_started.sh[tag=kcat-check-data]
109109
----
110110

111111
And clean up:
112112

113113
----
114-
include::example$getting_started/getting-started.sh[tag=kcat-cleanup-data]
114+
include::example$getting_started/getting_started.sh[tag=kcat-cleanup-data]
115115
----
116116

117117
You successfully created a Kafka cluster and produced and consumed data.

‎docs/modules/kafka/pages/getting_started/installation.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ After you have installed stackablectl, run the following command to install all
1818

1919
[source,bash]
2020
----
21-
include::example$getting_started/getting-started.sh[tag=stackablectl-install-operators]
21+
include::example$getting_started/getting_started.sh[tag=stackablectl-install-operators]
2222
----
2323

2424
The tool will show
@@ -36,14 +36,14 @@ You can also use Helm to install the operators. Add the Stackable Helm repositor
3636

3737
[source,bash]
3838
----
39-
include::example$getting_started/getting-started.sh[tag=helm-add-repo]
39+
include::example$getting_started/getting_started.sh[tag=helm-add-repo]
4040
----
4141

4242
Then install the Stackable Operators:
4343

4444
[source,bash]
4545
----
46-
include::example$getting_started/getting-started.sh[tag=helm-install-operators]
46+
include::example$getting_started/getting_started.sh[tag=helm-install-operators]
4747
----
4848

4949
Helm will deploy the operators in a Kubernetes Deployment and apply the CRDs for the Apache Kafka service (as well as the CRDs for the required operators). You are now ready to deploy Apache Kafka in Kubernetes.

‎docs/templating_vars.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ helm:
33
repo_name: stackable-dev
44
repo_url: https://repo.stackable.tech/repository/helm-dev/
55
versions:
6-
commons: 0.5.0-nightly
7-
secret: 0.6.0-nightly
8-
zookeeper: 0.13.0-nightly
9-
kafka: 0.9.0-nightly
6+
commons: 0.0.0-dev
7+
secret: 0.0.0-dev
8+
zookeeper: 0.0.0-dev
9+
kafka: 0.0.0-dev

0 commit comments

Comments
 (0)