From fd035ced719a3117cff0333b8bba64df16bd5002 Mon Sep 17 00:00:00 2001 From: Jordan Keister Date: Mon, 21 Oct 2024 11:27:24 -0500 Subject: [PATCH] updating demo to work with cert-manager, README with new demo Signed-off-by: Jordan Keister --- README.md | 2 +- hack/scripts/demo-script.sh | 39 +++++++++++++++++++++---------------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 14b2215b..1cc0f49c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Catalogd is a Kubernetes extension that unpacks [file-based catalog (FBC)](https Catalogd helps customers discover installable content by hosting catalog metadata for Kubernetes extensions, such as Operators and controllers. For more information on the Operator Lifecycle Manager (OLM) v1 suite of microservices, see the [documentation](https://github.com/operator-framework/operator-controller/tree/main/docs) for the Operator Controller. ## Quickstart DEMO -[![asciicast](https://asciinema.org/a/624043.svg)](https://asciinema.org/a/624043) +[![asciicast](https://asciinema.org/a/682344.svg)](https://asciinema.org/a/682344) ## Quickstart Steps Procedure steps marked with an asterisk (`*`) are likely to change with future API updates. diff --git a/hack/scripts/demo-script.sh b/hack/scripts/demo-script.sh index 769b87b3..d4f3bd76 100755 --- a/hack/scripts/demo-script.sh +++ b/hack/scripts/demo-script.sh @@ -1,34 +1,39 @@ #!/usr/bin/env bash -trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT +# # Welcome to the catalogd demo +# +trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT + + 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 -# inspect crds (catalog) +# use the install script from the latest github release +curl -L -s https://github.com/operator-framework/catalogd/releases/latest/download/install.sh | bash + +# inspect crds (clustercatalog) kubectl get crds -A +kubectl get clustercatalog -A -# create a catalog -kubectl apply -f config/samples/core_v1alpha1_catalog.yaml -# shows catalog-sample -kubectl get catalog -A -# waiting for catalog to report ready status -time kubectl wait --for=condition=Serving catalog/operatorhubio --timeout=1m +echo "... checking catalogd controller is available" +kubectl wait --for=condition=Available -n olmv1-system deploy/catalogd-controller-manager --timeout=1m +echo "... checking clustercatalog is serving" +kubectl wait --for=condition=Serving clustercatalog/operatorhubio --timeout=60s +echo "... checking clustercatalog is finished unpacking" +kubectl wait --for=condition=Progressing=False clustercatalog/operatorhubio --timeout=60s # port forward the catalogd-service service to interact with the HTTP server serving catalog contents -(kubectl -n olmv1-system port-forward svc/catalogd-service 8080:80)& +(kubectl -n olmv1-system port-forward svc/catalogd-service 8081:443)& + +sleep 3 # check what 'packages' are available in this catalog -curl http://localhost:8080/catalogs/operatorhubio/api/v1/all | jq -s '.[] | select(.schema == "olm.package") | .name' +curl -k https://localhost:8081/catalogs/operatorhubio/api/v1/all | jq -s '.[] | select(.schema == "olm.package") | .name' # check what channels are included in the wavefront package -curl http://localhost:8080/catalogs/operatorhubio/api/v1/all | jq -s '.[] | select(.schema == "olm.channel") | select(.package == "wavefront") | .name' +curl -k https://localhost:8081/catalogs/operatorhubio/api/v1/all | 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/api/v1/all | jq -s '.[] | select(.schema == "olm.bundle") | select(.package == "wavefront") | .name' +curl -k https://localhost:8081/catalogs/operatorhubio/api/v1/all | jq -s '.[] | select(.schema == "olm.bundle") | select(.package == "wavefront") | .name'