diff --git a/docs/modules/hdfs/examples/getting_started/getting_started.sh b/docs/modules/hdfs/examples/getting_started/getting_started.sh index 5d530e27..0f7b8689 100755 --- a/docs/modules/hdfs/examples/getting_started/getting_started.sh +++ b/docs/modules/hdfs/examples/getting_started/getting_started.sh @@ -15,6 +15,9 @@ then exit 1 fi +echo "Waiting for node(s) to be ready..." +kubectl wait node --all --for=condition=Ready --timeout=120s + cd "$(dirname "$0")" case "$1" in @@ -45,6 +48,9 @@ exit 1 ;; esac +# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details). +until kubectl get crd hdfsclusters.hdfs.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done + echo "Creating Zookeeper cluster" # tag::install-zk[] kubectl apply -f zk.yaml @@ -55,8 +61,6 @@ echo "Creating ZNode" kubectl apply -f znode.yaml # end::install-zk[] - - for (( i=1; i<=15; i++ )) do echo "Waiting for ZookeeperCluster to appear ..." diff --git a/docs/modules/hdfs/examples/getting_started/getting_started.sh.j2 b/docs/modules/hdfs/examples/getting_started/getting_started.sh.j2 index fe83e8d8..73abfd5c 100755 --- a/docs/modules/hdfs/examples/getting_started/getting_started.sh.j2 +++ b/docs/modules/hdfs/examples/getting_started/getting_started.sh.j2 @@ -15,6 +15,9 @@ then exit 1 fi +echo "Waiting for node(s) to be ready..." +kubectl wait node --all --for=condition=Ready --timeout=120s + cd "$(dirname "$0")" case "$1" in @@ -45,6 +48,9 @@ exit 1 ;; esac +# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details). +until kubectl get crd hdfsclusters.hdfs.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done + echo "Creating Zookeeper cluster" # tag::install-zk[] kubectl apply -f zk.yaml @@ -55,8 +61,6 @@ echo "Creating ZNode" kubectl apply -f znode.yaml # end::install-zk[] - - for (( i=1; i<=15; i++ )) do echo "Waiting for ZookeeperCluster to appear ..."