Skip to content

Instantly share code, notes, and snippets.

@bbrowning
Last active Apr 28, 2020
Embed
What would you like to do?
Deploying OpenShift Serverless 1.7.0 stage builds on external OpenShift 4.3 clusters

Note: This is only tested on OCP 4.3 or 4.4 clusters

Disable the default OLM operator sources:

oc patch OperatorHub cluster --type json \
  -p '[{"op": "add", "path": "/spec/disableAllDefaultSources", "value": true}]'

Download the imageContentSourcePolicy.yaml from this gist and apply it.

oc apply -f imageContentSourcePolicy.yaml

At this point, the nodes will go through rolling reboots to make this ImageContentSourcePolicy take effect. This usually takes 10 minutes or so, and the cluster will timeout, give you authentication errors, and all kinds of other weidr things during this time. Once all the nodes are Ready and don't show SchedulingDisabled, then it should be safe to proceed.

oc get nodes
NAME                                         STATUS   ROLES    AGE   VERSION
ip-10-0-138-133.us-west-1.compute.internal   Ready    worker   25m   v1.16.2
ip-10-0-140-104.us-west-1.compute.internal   Ready    master   34m   v1.16.2
ip-10-0-140-119.us-west-1.compute.internal   Ready    master   34m   v1.16.2
ip-10-0-140-211.us-west-1.compute.internal   Ready    worker   24m   v1.16.2
ip-10-0-152-146.us-west-1.compute.internal   Ready    master   33m   v1.16.2
ip-10-0-153-246.us-west-1.compute.internal   Ready    worker   25m   v1.16.2

Download the stageCatalogSource.yaml from this gist and apply it:

oc apply -f stageCatalogSource.yaml

Alternatively, copy/paste the YAMLs into the OpenShift Console by clicking the "+" in the top right and pasting the appropiate yamls in.

Verify everything worked

Give that a couple of minutes for the new CatalogSource to come up and then ensure you have similar (but not identical) output to the below for each command:

# oc get pods -n openshift-marketplace
NAME                                    READY   STATUS    RESTARTS   AGE
marketplace-operator-75f49679d7-qzvb5   1/1     Running   0          17m
operators-stage-grvc7                   1/1     Running   0          2m14s


# oc get catalogsource -n openshift-marketplace
NAME              DISPLAY                           TYPE   PUBLISHER   AGE
operators-stage   Red Hat Operators Stage Catalog   grpc   grpc        2m34s


# oc get packagemanifest -n openshift-marketplace
NAME                             CATALOG                           AGE
amq-streams                      Red Hat Operators Stage Catalog   2m58s
kubevirt-hyperconverged          Red Hat Operators Stage Catalog   2m58s
kiali-ossm                       Red Hat Operators Stage Catalog   2m58s
serverless-operator              Red Hat Operators Stage Catalog   2m58s
ocs-operator                     Red Hat Operators Stage Catalog   2m58s
amq-online                       Red Hat Operators Stage Catalog   2m58s
codeready-workspaces             Red Hat Operators Stage Catalog   2m58s
performance-addon-operator       Red Hat Operators Stage Catalog   2m58s
3scale-operator                  Red Hat Operators Stage Catalog   2m58s
openshiftansibleservicebroker    Red Hat Operators Stage Catalog   2m58s
dv-operator                      Red Hat Operators Stage Catalog   2m58s
apicast-operator                 Red Hat Operators Stage Catalog   2m58s
metering-ocp                     Red Hat Operators Stage Catalog   2m58s
cam-operator                     Red Hat Operators Stage Catalog   2m58s
amq7-cert-manager                Red Hat Operators Stage Catalog   2m58s
businessautomation-operator      Red Hat Operators Stage Catalog   2m58s
amq-broker                       Red Hat Operators Stage Catalog   2m58s
openshifttemplateservicebroker   Red Hat Operators Stage Catalog   2m58s
fuse-apicurito                   Red Hat Operators Stage Catalog   2m58s
ptp-operator                     Red Hat Operators Stage Catalog   2m58s
rh-service-binding-operator      Red Hat Operators Stage Catalog   2m58s
eap                              Red Hat Operators Stage Catalog   2m58s
jaeger-product                   Red Hat Operators Stage Catalog   2m58s
elasticsearch-operator           Red Hat Operators Stage Catalog   2m58s
fuse-online                      Red Hat Operators Stage Catalog   2m58s
servicemeshoperator              Red Hat Operators Stage Catalog   2m58s
amq-broker-lts                   Red Hat Operators Stage Catalog   2m58s
amq-broker-rhel8                 Red Hat Operators Stage Catalog   2m58s
e2e-test-operator                Red Hat Operators Stage Catalog   2m58s
local-storage-operator           Red Hat Operators Stage Catalog   2m58s
amq7-interconnect-operator       Red Hat Operators Stage Catalog   2m58s
cluster-logging                  Red Hat Operators Stage Catalog   2m58s
sriov-network-operator           Red Hat Operators Stage Catalog   2m58s
datagrid                         Red Hat Operators Stage Catalog   2m58s
service-binding                  Red Hat Operators Stage Catalog   2m58s
nfd                              Red Hat Operators Stage Catalog   2m58s
apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
name: operators-stage
spec:
repositoryDigestMirrors:
- mirrors:
- quay.io/bbrowning/serving-webhook-rhel8
source: registry.stage.redhat.io/openshift-serverless-1/serving-webhook-rhel8
- mirrors:
- quay.io/bbrowning/serving-autoscaler-rhel8
source: registry.stage.redhat.io/openshift-serverless-1/serving-autoscaler-rhel8
- mirrors:
- quay.io/bbrowning/knative-serving-rhel8-operator
source: registry.stage.redhat.io/openshift-serverless-1/knative-serving-rhel8-operator
- mirrors:
- quay.io/bbrowning/serving-controller-rhel8
source: registry.stage.redhat.io/openshift-serverless-1/serving-controller-rhel8
- mirrors:
- quay.io/bbrowning/kn-cli-artifacts-rhel8
source: registry.stage.redhat.io/openshift-serverless-1/kn-cli-artifacts-rhel8
- mirrors:
- quay.io/bbrowning/serving-autoscaler-hpa-rhel8
source: registry.stage.redhat.io/openshift-serverless-1/serving-autoscaler-hpa-rhel8
- mirrors:
- quay.io/bbrowning/kourier-control-rhel8
source: registry.stage.redhat.io/openshift-serverless-1/kourier-control-rhel8
- mirrors:
- quay.io/bbrowning/serving-queue-rhel8
source: registry.stage.redhat.io/openshift-serverless-1/serving-queue-rhel8
- mirrors:
- quay.io/bbrowning/knative-rhel8-operator
source: registry.stage.redhat.io/openshift-serverless-1/knative-rhel8-operator
- mirrors:
- quay.io/bbrowning/serving-activator-rhel8
source: registry.stage.redhat.io/openshift-serverless-1/serving-activator-rhel8
- mirrors:
- quay.io/bbrowning/ingress-rhel8-operator
source: registry.stage.redhat.io/openshift-serverless-1/ingress-rhel8-operator
- mirrors:
- quay.io/bbrowning/eventing-webhook-rhel8
source: registry.stage.redhat.io/openshift-serverless-1-tech-preview/eventing-webhook-rhel8
- mirrors:
- quay.io/bbrowning/eventing-broker-filter-rhel8
source: registry.stage.redhat.io/openshift-serverless-1-tech-preview/eventing-broker-filter-rhel8
- mirrors:
- quay.io/bbrowning/eventing-rhel8-operator
source: registry.stage.redhat.io/openshift-serverless-1-tech-preview/eventing-rhel8-operator
- mirrors:
- quay.io/bbrowning/eventing-in-memory-channel-dispatcher-rhel8
source: registry.stage.redhat.io/openshift-serverless-1-tech-preview/eventing-in-memory-channel-dispatcher-rhel8
- mirrors:
- quay.io/bbrowning/eventing-channel-broker-rhel8
source: registry.stage.redhat.io/openshift-serverless-1-tech-preview/eventing-channel-broker-rhel8
- mirrors:
- quay.io/bbrowning/eventing-ping-source-rhel8
source: registry.stage.redhat.io/openshift-serverless-1-tech-preview/eventing-ping-source-rhel8
- mirrors:
- quay.io/bbrowning/eventing-broker-ingress-rhel8
source: registry.stage.redhat.io/openshift-serverless-1-tech-preview/eventing-broker-ingress-rhel8
- mirrors:
- quay.io/bbrowning/eventing-in-memory-channel-controller-rhel8
source: registry.stage.redhat.io/openshift-serverless-1-tech-preview/eventing-in-memory-channel-controller-rhel8
- mirrors:
- quay.io/bbrowning/eventing-controller-rhel8
source: registry.stage.redhat.io/openshift-serverless-1-tech-preview/eventing-controller-rhel8
- mirrors:
- quay.io/bbrowning/eventing-cronjob-receive-adapter-rhel8
source: registry.stage.redhat.io/openshift-serverless-1-tech-preview/eventing-cronjob-receive-adapter-rhel8
- mirrors:
- quay.io/bbrowning/eventing-apiserver-receive-adapter-rhel8
source: registry.stage.redhat.io/openshift-serverless-1-tech-preview/eventing-apiserver-receive-adapter-rhel8
- mirrors:
- quay.io/bbrowning/proxyv2-rhel8
source: registry.stage.redhat.io/openshift-service-mesh/proxyv2-rhel8
- mirrors:
- quay.io/bbrowning/proxyv2-rhel8
source: registry.stage.redhat.io/openshift-service-mesh/proxyv2-rhel8
- mirrors:
- quay.io/bbrowning/proxyv2-rhel8
source: registry.stage.redhat.io/openshift-service-mesh/proxyv2-rhel8
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: operators-stage
namespace: openshift-marketplace
spec:
sourceType: grpc
image: quay.io/bbrowning/operators-stage:v1.7.0
displayName: Red Hat Operators Stage Catalog
publisher: grpc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment