Skip to content

Commit 0bad52e

Browse files
adwk67sbernauer
andauthored
fix(docs): Update getting-started script pre-26.3.0 (#741)
* wait for crds and nodes, add phoenix tables * raise memory on rest server to avoid OOM on phoenix test * Update docs/modules/hbase/examples/getting_started/getting_started.sh.j2 Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de> * Update docs/modules/hbase/examples/getting_started/getting_started.sh.j2 Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de> * improve wait --------- Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de>
1 parent 32673b6 commit 0bad52e

File tree

4 files changed

+36
-12
lines changed

4 files changed

+36
-12
lines changed

docs/modules/hbase/examples/getting_started/getting_started.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ then
1515
exit 1
1616
fi
1717

18+
echo "Waiting for node(s) to be ready..."
19+
kubectl wait node --all --for=condition=Ready --timeout=120s
20+
1821
cd "$(dirname "$0")"
1922

2023
case "$1" in
@@ -48,6 +51,9 @@ exit 1
4851
;;
4952
esac
5053

54+
# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details).
55+
until kubectl get crd hbaseclusters.hbase.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done
56+
5157
echo "Creating ZooKeeper cluster"
5258
# tag::install-zk[]
5359
kubectl apply -f zk.yaml
@@ -90,9 +96,9 @@ done
9096

9197
echo "Awaiting HDFS rollout finish"
9298
# tag::watch-hdfs-rollout[]
93-
kubectl rollout status --watch statefulset/simple-hdfs-datanode-default --timeout=300s
94-
kubectl rollout status --watch statefulset/simple-hdfs-namenode-default --timeout=300s
95-
kubectl rollout status --watch statefulset/simple-hdfs-journalnode-default --timeout=300s
99+
kubectl rollout status --watch statefulset/simple-hdfs-datanode-default --timeout=600s
100+
kubectl rollout status --watch statefulset/simple-hdfs-namenode-default --timeout=600s
101+
kubectl rollout status --watch statefulset/simple-hdfs-journalnode-default --timeout=600s
96102
# end::watch-hdfs-rollout[]
97103

98104
sleep 5
@@ -114,9 +120,9 @@ done
114120

115121
echo "Awaiting HBase rollout finish"
116122
# tag::watch-hbase-rollout[]
117-
kubectl rollout status --watch statefulset/simple-hbase-master-default --timeout=300s
118-
kubectl rollout status --watch statefulset/simple-hbase-regionserver-default --timeout=300s
119-
kubectl rollout status --watch statefulset/simple-hbase-restserver-default --timeout=300s
123+
kubectl rollout status --watch statefulset/simple-hbase-master-default --timeout=600s
124+
kubectl rollout status --watch statefulset/simple-hbase-regionserver-default --timeout=600s
125+
kubectl rollout status --watch statefulset/simple-hbase-restserver-default --timeout=600s
120126
# end::watch-hbase-rollout[]
121127

122128
version() {
@@ -191,6 +197,8 @@ tables_count=$(get_all | jq -r '.table' | jq '. | length')
191197
# here, and error out if they don't match
192198
expected_tables=$(echo "
193199
SYSTEM.CATALOG
200+
SYSTEM.CDC_STREAM
201+
SYSTEM.CDC_STREAM_STATUS
194202
SYSTEM.CHILD_LINK
195203
SYSTEM.FUNCTION
196204
SYSTEM.LOG

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ then
1515
exit 1
1616
fi
1717

18+
echo "Waiting for node(s) to be ready..."
19+
kubectl wait node --all --for=condition=Ready --timeout=120s
20+
1821
cd "$(dirname "$0")"
1922

2023
case "$1" in
@@ -48,6 +51,9 @@ exit 1
4851
;;
4952
esac
5053

54+
# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details).
55+
until kubectl get crd hbaseclusters.hbase.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done
56+
5157
echo "Creating ZooKeeper cluster"
5258
# tag::install-zk[]
5359
kubectl apply -f zk.yaml
@@ -90,9 +96,9 @@ done
9096

9197
echo "Awaiting HDFS rollout finish"
9298
# tag::watch-hdfs-rollout[]
93-
kubectl rollout status --watch statefulset/simple-hdfs-datanode-default --timeout=300s
94-
kubectl rollout status --watch statefulset/simple-hdfs-namenode-default --timeout=300s
95-
kubectl rollout status --watch statefulset/simple-hdfs-journalnode-default --timeout=300s
99+
kubectl rollout status --watch statefulset/simple-hdfs-datanode-default --timeout=600s
100+
kubectl rollout status --watch statefulset/simple-hdfs-namenode-default --timeout=600s
101+
kubectl rollout status --watch statefulset/simple-hdfs-journalnode-default --timeout=600s
96102
# end::watch-hdfs-rollout[]
97103

98104
sleep 5
@@ -114,9 +120,9 @@ done
114120

115121
echo "Awaiting HBase rollout finish"
116122
# tag::watch-hbase-rollout[]
117-
kubectl rollout status --watch statefulset/simple-hbase-master-default --timeout=300s
118-
kubectl rollout status --watch statefulset/simple-hbase-regionserver-default --timeout=300s
119-
kubectl rollout status --watch statefulset/simple-hbase-restserver-default --timeout=300s
123+
kubectl rollout status --watch statefulset/simple-hbase-master-default --timeout=600s
124+
kubectl rollout status --watch statefulset/simple-hbase-regionserver-default --timeout=600s
125+
kubectl rollout status --watch statefulset/simple-hbase-restserver-default --timeout=600s
120126
# end::watch-hbase-rollout[]
121127

122128
version() {
@@ -191,6 +197,8 @@ tables_count=$(get_all | jq -r '.table' | jq '. | length')
191197
# here, and error out if they don't match
192198
expected_tables=$(echo "
193199
SYSTEM.CATALOG
200+
SYSTEM.CDC_STREAM
201+
SYSTEM.CDC_STREAM_STATUS
194202
SYSTEM.CHILD_LINK
195203
SYSTEM.FUNCTION
196204
SYSTEM.LOG

docs/modules/hbase/examples/getting_started/hbase.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ spec:
2727
restServers:
2828
roleGroups:
2929
default:
30+
config:
31+
resources:
32+
memory:
33+
limit: 1Gi
3034
replicas: 1

docs/modules/hbase/examples/getting_started/hbase.yaml.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ spec:
2727
restServers:
2828
roleGroups:
2929
default:
30+
config:
31+
resources:
32+
memory:
33+
limit: 1Gi
3034
replicas: 1

0 commit comments

Comments
 (0)