This operator can be used for installing instances of Seldon Deploy. Built with operator-sdk (v1.8.0).
Intended as a Red Hat Marketplace operator but can be run outside openshfit.
It is a helm-based operator. So basically an image that runs helm and can install a helm chart in response to a CRD being posted. The CRD maps directly to a values file.
There are dependencies needed for running Deploy and marketplace imposes restrictions on these. See installation google doc
Dependencies
To build and push just the operator:
make docker-build
make docker-push
To also build and push the bundle:
make update_openshift
To test in KIND with entire stack:
make install
make deploy
kubectl apply -n seldon-system -f ./examples-testing/kind-full-setup.yaml
make open_kind
This is a minimal setup just for checking installation. No Deploy features work.
kind create cluster
kubectl create ns seldon-logs
make install
make deploy
kubectl apply -n seldon-system -f ./examples-testing/kind-minimal-setup.yaml
kubectl port-forward -n seldon-system svc/seldondeploy-sample-kind-full-seldon-deploy 8080:80
)
to see UI, though you can't deploy anything in this setup. First need a cluster e.g. kind create cluster
.
For KIND or other clusters without OLM, we first install OLM
Install OLM - operator-sdk olm install
(tested with 1.8.0)
Install marketplace - make operator-marketplace
Now create, push and validate the bundle
make update_openshift
Create a catalog_source
kubectl create -f tests/catalog-source.yaml
Check
kubectl get catalogsource seldon-deploy-catalog -n marketplace -o yaml
Create operator group
kubectl create -f tests/operator-group.yaml
Create Subscription
kubectl create -f tests/operator-subscription.yaml
Check the Subscription and CSV:
kubectl get subscriptions.operators.coreos.com -n marketplace seldon-deploy-operator-subsription -o yaml
kubectl get ClusterServiceVersion -n marketplace
Note here the operator will be namespace only (OwnNamespace mode) so will only manage SeldonDeploy instances in marketplace namespace.
Now we create a deploy instance.
kubectl create ns seldon-logs || true
kubectl apply -n marketplace -f ./examples-testing/kind-minimal-setup.yaml
(or full if stack is present, see above for kind-full-setup.yaml
)If using kind-minimal-setup.yaml
then this is all you can do.
If using the full stack then we can run demos. We'll need to apply a license, either in the UI or using make apply_license_kind
. Open with make open_kind
Before testing a new version make sure make update_openshift
has been run.
Create catalog source
kubectl create -f tests/catalog-source-openshift.yaml
Check
kubectl get catalogsource seldon-deploy-catalog -n openshift-marketplace -o yaml
Choose the operator in the UI. Be sure to get the right version.
If clusterwide (initially only option) then check with:
kubectl get subscriptions.operators.coreos.com -n openshift-operators seldon-deploy-operator -o yaml
Adjust namespace if not clusterwide.
Use installation google doc for setting up dependencies or running minimal version.
Test as applicable e.g. using Deploy demos. The google doc points at how to open or you can use make open_cluster_with_istio
.
Note you can only test a demo if you've got the necessary dependencies. So not batch as there are limitations for argo and minio
First have a bundle built. Then make scorecard
. But no point running this.
Problem is that it deploys the manifest from config/samples, which is the alm-examples one. That needs the dependencies.
That example is the one that shows up in marketplace. Would need RH to decouple scorecard from alm-examples to use this.
make build_image_redhat
and make push_to_dockerhub_ubi
. Ensure you are in the release branch, e.g. git checkout v1.2.1
make get-helm-chart
to pull in latest helm chart. Will need to save values.yaml if you have changed this as it will be overwritten.
opm_index
and opm_index_certified
commands in the Makefile to include the previous version in the list of images. If you don't add all versions (inc past) to its list, you'll hit bundle specifies a non-existent replacement
error.make update_openshift
(this is run during testing steps but can also run first).create_bundles_cert
and push_bundles_cert
make targets in Makefile to include the new version.make openshift_update_cert
After publication contact IBM (see contacts below) to confirm new version of bundle has gone to their queue
See https://seldonio.atlassian.net/wiki/spaces/COMPANY/pages/1201078285/Tech+Contacts
RCR - redhat container registry - integrated with connect.redhat.com for publishing official images. https://start.1password.com/open/i?a=SSGQBEYWPRHN7GYLNPQYAOU7QA&h=team-seldon.1password.com&i=f4hgces2dvxqirpcsir2uiqbe4&v=65l42gglwnfjheao6fu4pmxeti
connect.redhat.com - system for publishing images and bundles and other RH stuff (including raising issues with the system via https://connect.redhat.com/support/technology-partner/). https://start.1password.com/open/i?a=SSGQBEYWPRHN7GYLNPQYAOU7QA&h=team-seldon.1password.com&i=pbdteciyqnp3rsxpcrkaxevftm&v=po7kyvksukhlrsurwmygolab3a
Quay.io - for test images before switching to RCR for publication (as that has manual steps). https://start.1password.com/open/i?a=SSGQBEYWPRHN7GYLNPQYAOU7QA&h=team-seldon.1password.com&i=taumgl2tiapt2dnphzbugepjxy&v=65l42gglwnfjheao6fu4pmxeti
Red Hat marketplace workbench for listing documentation. You have to go through the correct red hat marketplace partner link to get to it. And sometimes you have to hit the edit button multiple times. https://start.1password.com/open/i?a=SSGQBEYWPRHN7GYLNPQYAOU7QA&h=team-seldon.1password.com&i=vdgkpe3ii5bm6vkzycvw4tepni&v=po7kyvksukhlrsurwmygolab3a
cloud.redhat.com for creating clusters https://seldonio.atlassian.net/wiki/spaces/COMPANY/pages/159318256/Creating+an+Openshift+cluster
There are multiple ways to setup OpenShift clusters but we have a preferred method for seldon test clusters.
To push images you need ~/.config/seldon/seldon-core/redhat-image-passwords.sh
configured. Get from 1password
Images are published with Makefiles but some in core, some deploy and some here. See IMAGES.md for details.
Note that the Makefile commands are only part of it. You also have to press 'publish' in the Red Hat UI.
If you need a new image for a new component then that's a new project and requires filling out a form for Red Hat.
Each new release needs to be based on the latest seldon deploy helm chart. The makefile references a get-helm-chart script for this.
Note that the makefile refers to a particular version in version.txt.
There are separate folders for certified vs not certified versions. This is because certified has to be hosted in redhat container registry and approved so can't iterate so fast on that.
Otherewise the operator is itself an image. It's just a special type of project in the RH UI with its own special checks.
A good walkthrough is https://redhat-connect.gitbook.io/partner-guide-for-red-hat-openshift-and-container/certify-your-operator/certify-your-operator-bundle-image/creating-operator-bundle-image-project
The listing is maintained in https://marketplace.redhat.com/partner/products/9697de171a307b0dce64e423c2d7946a (replacing https://www.ibm.com/marketplace/workbench/provider/dashboard)
The account for this is in 1password
Access management is handled at: http://marketplace.redhat.com/en-us/account/partner-management
Note it needs markdown https://docs.google.com/document/d/1a_KHXZI4H_2-CdJl89ejB_zGNsq_gCDDmD6jMCsF3gc/edit?usp=sharing
Fork https://github.com/red-hat-data-services/odh-dashboard
Create a PR to updates the seldon quickstarts - Usually by updating the links to new version of Deploy but might also need to change actually demo instructions.
If you hit a bug in the Red Hat systems then raise an issue via https://connect.redhat.com/support/technology-partner/
We also have a slack channel and some direct contacts.