Skip to content

Commit

Permalink
Spike/docs testing (#325)
Browse files Browse the repository at this point in the history
# Description

Adds the two scripts used for testing.

Also increase a timeout because the test failed in azure. Example loading is really slow, I think it's because the load job has no requests. I made a ticket for it #324

While I looked at it, the CPU usage of the python load process was really high, so that's why I think it might be that.

https://ci.stackable.tech/view/05%20Documentation%20Tests/job/superset-operator-documentation-test/3/
  • Loading branch information
fhennig committed Feb 9, 2023
1 parent 3771921 commit b357b2d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
11 changes: 8 additions & 3 deletions docs/modules/getting_started/examples/code/getting_started.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ then
exit 1
fi

cd "$(dirname "$0")"

case "$1" in
"helm")
echo "Adding 'stackable-dev' Helm Chart repository"
Expand Down Expand Up @@ -67,19 +69,22 @@ kubectl apply -f superset.yaml

echo "Waiting on SupersetDB ..."
# tag::wait-supersetdb[]
kubectl wait supersetdb/simple-superset \
time kubectl wait supersetdb/simple-superset \
--for jsonpath='{.status.condition}'=Ready \
--timeout 300s
--timeout 600s
# end::wait-supersetdb[]

sleep 5

echo "Wainting on superset StatefulSet ..."
kubectl rollout status --watch statefulset/simple-superset-node-default

# wait a bit for the port to open
sleep 10

echo "Starting port-forwarding of port 8088"
# tag::port-forwarding[]
kubectl port-forward service/simple-superset-external 8088 2>&1 >/dev/null &
kubectl port-forward service/simple-superset-external 8088 > /dev/null 2>&1 &
# end::port-forwarding[]
PORT_FORWARD_PID=$!
trap "kill $PORT_FORWARD_PID" EXIT
Expand Down
11 changes: 8 additions & 3 deletions docs/modules/getting_started/examples/code/getting_started.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ then
exit 1
fi

cd "$(dirname "$0")"

case "$1" in
"helm")
echo "Adding '{{ helm.repo_name }}' Helm Chart repository"
Expand Down Expand Up @@ -67,19 +69,22 @@ kubectl apply -f superset.yaml

echo "Waiting on SupersetDB ..."
# tag::wait-supersetdb[]
kubectl wait supersetdb/simple-superset \
time kubectl wait supersetdb/simple-superset \
--for jsonpath='{.status.condition}'=Ready \
--timeout 300s
--timeout 600s
# end::wait-supersetdb[]

sleep 5

echo "Wainting on superset StatefulSet ..."
kubectl rollout status --watch statefulset/simple-superset-node-default

# wait a bit for the port to open
sleep 10

echo "Starting port-forwarding of port 8088"
# tag::port-forwarding[]
kubectl port-forward service/simple-superset-external 8088 2>&1 >/dev/null &
kubectl port-forward service/simple-superset-external 8088 > /dev/null 2>&1 &
# end::port-forwarding[]
PORT_FORWARD_PID=$!
trap "kill $PORT_FORWARD_PID" EXIT
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /usr/bin/env bash
set -euo pipefail

cd "$(dirname "$0")"
./getting_started.sh helm

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /usr/bin/env bash
set -euo pipefail

cd "$(dirname "$0")"
./getting_started.sh stackablectl

0 comments on commit b357b2d

Please sign in to comment.