From 5d2d3fec7098b2334c8bee6bae04528f474e4ab2 Mon Sep 17 00:00:00 2001 From: Techassi Date: Wed, 11 Mar 2026 15:27:39 +0100 Subject: [PATCH 1/3] chore: Add wait conditions to getting-started script --- .../opensearch/examples/getting_started/getting_started.sh | 6 ++++++ .../examples/getting_started/getting_started.sh.j2 | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/docs/modules/opensearch/examples/getting_started/getting_started.sh b/docs/modules/opensearch/examples/getting_started/getting_started.sh index 986b58e..eddf814 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 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..ad9f438 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 From d470ef5c6a5b2cbe4fe0c935ea148797bca4336a Mon Sep 17 00:00:00 2001 From: Techassi Date: Wed, 11 Mar 2026 15:28:00 +0100 Subject: [PATCH 2/3] chore: Add hint about port forward --- .../opensearch/examples/getting_started/getting_started.sh | 2 +- .../opensearch/examples/getting_started/getting_started.sh.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/opensearch/examples/getting_started/getting_started.sh b/docs/modules/opensearch/examples/getting_started/getting_started.sh index eddf814..8e8373c 100755 --- a/docs/modules/opensearch/examples/getting_started/getting_started.sh +++ b/docs/modules/opensearch/examples/getting_started/getting_started.sh @@ -146,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 ad9f438..c480423 100755 --- a/docs/modules/opensearch/examples/getting_started/getting_started.sh.j2 +++ b/docs/modules/opensearch/examples/getting_started/getting_started.sh.j2 @@ -146,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[] From 751fd62d393d54e53a72bfbca61228512e0faa6d Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 12 Mar 2026 09:56:53 +0100 Subject: [PATCH 3/3] chore: Adjust discovery ListenerClass When running the getting started script against a local kind cluster, stackablectl will automatically choose the stable-nodes preset, which works out of the box with both external-stable and external-unstable. However, when using helm, the default preset (ephemeral-nodes) is used and causes OpenSearch cluster pods to not start up, because kind doesn't support LoadBalancers. This is the reason why we chose to do the less invasive change, and change the ListenerClass to external-unstable. --- .../modules/opensearch/examples/getting_started/opensearch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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