Skip to content

Commit

Permalink
updating demo to work with cert-manager, README with new demo
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
  • Loading branch information
grokspawn committed Oct 21, 2024
1 parent d8dc9e7 commit fd035ce
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
39 changes: 22 additions & 17 deletions hack/scripts/demo-script.sh
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit fd035ce

Please sign in to comment.