Skip to content

Commit 65e1c96

Browse files
authored
fix(docs): Update getting-started script pre-26.3.0 (#123)
* chore: Add wait conditions to getting-started script * chore: Add hint about port forward * 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.
1 parent 94e1784 commit 65e1c96

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

docs/modules/opensearch/examples/getting_started/getting_started.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ then
1717
exit 1
1818
fi
1919

20+
echo "Waiting for node(s) to be ready..."
21+
kubectl wait node --all --for=condition=Ready --timeout=120s
22+
2023
cd "$(dirname "$0")"
2124

2225
case "$1" in
@@ -45,6 +48,9 @@ exit 1
4548
;;
4649
esac
4750

51+
# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details).
52+
until kubectl get crd opensearchclusters.opensearch.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done
53+
4854
echo "Creating OpenSearch security plugin configuration"
4955
# tag::apply-security-config[]
5056
kubectl apply -f initial-opensearch-security-config.yaml
@@ -140,7 +146,7 @@ helm install opensearch-dashboards opensearch-dashboards \
140146
--wait
141147
# end::opensearch-dashboards[]
142148

143-
echo "Starting port-forwarding of port 5601"
149+
echo "Starting port-forwarding of port 5601 (press Ctrl+C to exit early)"
144150
# tag::opensearch-dashboards-port-forwarding[]
145151
kubectl port-forward services/opensearch-dashboards 5601 > /dev/null 2>&1 &
146152
# end::opensearch-dashboards-port-forwarding[]

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ then
1717
exit 1
1818
fi
1919

20+
echo "Waiting for node(s) to be ready..."
21+
kubectl wait node --all --for=condition=Ready --timeout=120s
22+
2023
cd "$(dirname "$0")"
2124

2225
case "$1" in
@@ -45,6 +48,9 @@ exit 1
4548
;;
4649
esac
4750

51+
# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details).
52+
until kubectl get crd opensearchclusters.opensearch.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done
53+
4854
echo "Creating OpenSearch security plugin configuration"
4955
# tag::apply-security-config[]
5056
kubectl apply -f initial-opensearch-security-config.yaml
@@ -140,7 +146,7 @@ helm install opensearch-dashboards opensearch-dashboards \
140146
--wait
141147
# end::opensearch-dashboards[]
142148

143-
echo "Starting port-forwarding of port 5601"
149+
echo "Starting port-forwarding of port 5601 (press Ctrl+C to exit early)"
144150
# tag::opensearch-dashboards-port-forwarding[]
145151
kubectl port-forward services/opensearch-dashboards 5601 > /dev/null 2>&1 &
146152
# end::opensearch-dashboards-port-forwarding[]

docs/modules/opensearch/examples/getting_started/opensearch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ spec:
4646
key: roles_mapping.yml
4747
nodes:
4848
roleConfig:
49-
discoveryServiceListenerClass: external-stable
49+
discoveryServiceListenerClass: external-unstable
5050
roleGroups:
5151
default:
5252
replicas: 3

0 commit comments

Comments
 (0)