![[V9.1.5 Apr 2020]](ng915.gif)
![[Continuous Delivery]](ngcd.gif)
![[IBM MQ Advanced]](ngadv.gif)
![[Linux]](nglinux.gif)
Installing the IBM MQ Operator using the OpenShift CLI
The IBM® MQ Operator can be installed onto OpenShift using the Operator Hub.
Before you begin
Log into the OpenShift command line interface (CLI) using oc login. For these steps, you will need to be a cluster administrator.
Procedure
-
Create an
OperatorSource
for the IBM Common Services operators-
Create a YAML file defining the
OperatorSource
resourceCreate a file called "operator-source-cs.yaml" with the following contents:apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: opencloud-operators namespace: openshift-marketplace spec: displayName: IBMCS Operators publisher: IBM sourceType: grpc image: docker.io/ibmcom/ibm-common-service-catalog:latest updateStrategy: registryPoll: interval: 45m
-
Apply the
OperatorSource
to the server.oc apply -f operator-source-cs.yaml -n openshift-marketplace
-
Create a YAML file defining the
-
Create an
OperatorSource
for the IBM operators-
Create a YAML file defining the
OperatorSource
resourceCreate a file called "operator-source-ibm.yaml" with the following contents:apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ibm-operator-catalog namespace: openshift-marketplace spec: displayName: ibm-operator-catalog publisher: IBM Content sourceType: grpc image: docker.io/ibmcom/ibm-operator-catalog updateStrategy: registryPoll: interval: 45m
-
Apply the
OperatorSource
to the server.oc apply -f operator-source-ibm.yaml -n openshift-marketplace
-
Create a YAML file defining the
-
Create a namespace to use for the IBM MQ Operator
The IBM MQ operator can be installed scoped to a single namespace or all namespaces. This step is only needed if you want to install into a particular namespace which does not already exist.
oc new-project ibm-mq
-
View the list of Operators available to the cluster from the OperatorHub
oc get packagemanifests -n openshift-marketplace
-
Inspect the IBM MQ Operator to verify its supported InstallModes and available Channels
oc describe packagemanifests ibm-mq -n openshift-marketplace
-
Create an
OperatorGroup
object YAML fileAn
OperatorGroup
is an OLM resource that selects target namespaces in which to generate required RBAC access for all Operators in the same namespace as theOperatorGroup
.The namespace to which you subscribe the Operator must have an
OperatorGroup
that matches the Operator'sInstallMode
, either theAllNamespaces
orSingleNamespace
mode. If the Operator you intend to install uses theAllNamespaces
, then theopenshift-operators
namespace already has an appropriate OperatorGroup in place.However, if the Operator uses the
SingleNamespace
mode and you do not already have an appropriateOperatorGroup
in place, you must create one.-
Create a file called "mq-operator-group.yaml" with the following contents:
apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: <operatorgroup_name> namespace: <namespace> spec: targetNamespaces: - <namespace>
-
Create the
OperatorGroup
objectoc apply -f mq-operator-group.yaml
-
Create a file called "mq-operator-group.yaml" with the following contents:
-
Create a Subscription object YAML file to subscribe a namespace to the MQ Operator
-
Create a file called "mq-sub.yaml" with the following contents:
For AllNamespaces InstallMode usage, specifyapiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: ibm-mq namespace: openshift-operators spec: channel: name: ibm-mq source: ibm-operator-catalog sourceNamespace: openshift-marketplace
openshift-operators
namespace. Otherwise, specify the relevant single namespace for SingleNamespace InstallMode usage. -
Create the
Subscription
objectoc apply -f mq-sub.yaml
-
Create a file called "mq-sub.yaml" with the following contents:
- Check the status of the Operator Once the installation of the Operator has succeeded, the pod status shows as Running. For AllNamespaces InstallMode usage, specify openshift-operators as the namespace. Otherwise, specify the relevant single namespace for SingleNamespace InstallMode usage.