Skip to content

Commit

Permalink
update demo scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Ankita Thomas <[email protected]>
  • Loading branch information
ankitathomas committed Sep 9, 2024
1 parent e8e2fd3 commit 7a2e6e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
24 changes: 8 additions & 16 deletions hack/scripts/demo-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,24 @@

trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
# Welcome to the catalogd demo
kind delete cluster
kind create cluster
kubectl cluster-info --context kind-kind
sleep 10
# install catalogd on the cluster
# could also `make install` in repo
kubectl apply -f https://github.com/operator-framework/catalogd/releases/latest/download/catalogd.yaml
kubectl wait --for=condition=Available -n olmv1-system deploy/catalogd-controller-manager --timeout=60s
sleep 10
make run
# inspect crds (catalog)
kubectl get crds -A

# create a catalog
kubectl apply -f config/samples/core_v1alpha1_catalog.yaml
kubectl apply -f config/samples/core_v1alpha1_clustercatalog.yaml
# shows catalog-sample
kubectl get catalog -A
kubectl get clustercatalog -A
# waiting for catalog to report ready status
time kubectl wait --for=condition=Serving catalog/operatorhubio --timeout=1m
time kubectl wait --for=condition=Serving clustercatalog/operatorhubio --timeout=1m

# port forward the catalogd-catalogserver service to interact with the HTTP server serving catalog contents
(kubectl -n olmv1-system port-forward svc/catalogd-catalogserver 8080:80)&
(kubectl -n olmv1-system port-forward svc/catalogd-catalogserver 8080:443)&

# check what 'packages' are available in this catalog
curl http://localhost:8080/catalogs/operatorhubio/all.json | jq -s '.[] | select(.schema == "olm.package") | .name'
curl -k https://localhost:8080/catalogs/operatorhubio/all.json | jq -s '.[] | select(.schema == "olm.package") | .name'
# check what channels are included in the wavefront package
curl http://localhost:8080/catalogs/operatorhubio/all.json | jq -s '.[] | select(.schema == "olm.channel") | select(.package == "wavefront") | .name'
curl -k https://localhost:8080/catalogs/operatorhubio/all.json | jq -s '.[] | select(.schema == "olm.channel") | select(.package == "wavefront") | .name'
# check what bundles are included in the wavefront package
curl http://localhost:8080/catalogs/operatorhubio/all.json | jq -s '.[] | select(.schema == "olm.bundle") | select(.package == "wavefront") | .name'
curl -k https://localhost:8080/catalogs/operatorhubio/all.json | jq -s '.[] | select(.schema == "olm.bundle") | select(.package == "wavefront") | .name'

2 changes: 1 addition & 1 deletion hack/scripts/gzip-demo-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
make run

# create a clustercatalog
kubectl apply -f $HOME/devel/tmp/operatorhubio-clustercatalog.yaml
kubectl apply -f config/samples/core_v1alpha1_clustercatalog.yaml
# shows catalog
kubectl get clustercatalog -A
# waiting for clustercatalog to report ready status
Expand Down

0 comments on commit 7a2e6e2

Please sign in to comment.