diff --git a/docs/modules/opensearch/examples/getting_started/getting_started.sh b/docs/modules/opensearch/examples/getting_started/getting_started.sh index 986b58e..8e8373c 100755 --- a/docs/modules/opensearch/examples/getting_started/getting_started.sh +++ b/docs/modules/opensearch/examples/getting_started/getting_started.sh @@ -17,6 +17,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 opensearchclusters.opensearch.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done + echo "Creating OpenSearch security plugin configuration" # tag::apply-security-config[] kubectl apply -f initial-opensearch-security-config.yaml @@ -140,7 +146,7 @@ helm install opensearch-dashboards opensearch-dashboards \ --wait # end::opensearch-dashboards[] -echo "Starting port-forwarding of port 5601" +echo "Starting port-forwarding of port 5601 (press Ctrl+C to exit early)" # tag::opensearch-dashboards-port-forwarding[] kubectl port-forward services/opensearch-dashboards 5601 > /dev/null 2>&1 & # end::opensearch-dashboards-port-forwarding[] diff --git a/docs/modules/opensearch/examples/getting_started/getting_started.sh.j2 b/docs/modules/opensearch/examples/getting_started/getting_started.sh.j2 index c23b438..c480423 100755 --- a/docs/modules/opensearch/examples/getting_started/getting_started.sh.j2 +++ b/docs/modules/opensearch/examples/getting_started/getting_started.sh.j2 @@ -17,6 +17,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 opensearchclusters.opensearch.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done + echo "Creating OpenSearch security plugin configuration" # tag::apply-security-config[] kubectl apply -f initial-opensearch-security-config.yaml @@ -140,7 +146,7 @@ helm install opensearch-dashboards opensearch-dashboards \ --wait # end::opensearch-dashboards[] -echo "Starting port-forwarding of port 5601" +echo "Starting port-forwarding of port 5601 (press Ctrl+C to exit early)" # tag::opensearch-dashboards-port-forwarding[] kubectl port-forward services/opensearch-dashboards 5601 > /dev/null 2>&1 & # end::opensearch-dashboards-port-forwarding[] diff --git a/docs/modules/opensearch/examples/getting_started/opensearch.yaml b/docs/modules/opensearch/examples/getting_started/opensearch.yaml index e77e9d7..c1586c4 100644 --- a/docs/modules/opensearch/examples/getting_started/opensearch.yaml +++ b/docs/modules/opensearch/examples/getting_started/opensearch.yaml @@ -46,7 +46,7 @@ spec: key: roles_mapping.yml nodes: roleConfig: - discoveryServiceListenerClass: external-stable + discoveryServiceListenerClass: external-unstable roleGroups: default: replicas: 3