[V9.1.5 Apr 2020][Continuous Delivery][IBM MQ Advanced][Linux]

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

  1. Create an OperatorSource for the IBM Common Services operators
    1. Create a YAML file defining the OperatorSource resource
      Create 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
    2. Apply the OperatorSource to the server.
      oc apply -f operator-source-cs.yaml -n openshift-marketplace
  2. Create an OperatorSource for the IBM operators
    1. Create a YAML file defining the OperatorSource resource
      Create 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
    2. Apply the OperatorSource to the server.
      oc apply -f operator-source-ibm.yaml -n openshift-marketplace
  3. 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
  4. View the list of Operators available to the cluster from the OperatorHub
    oc get packagemanifests -n openshift-marketplace
  5. Inspect the IBM MQ Operator to verify its supported InstallModes and available Channels
    oc describe packagemanifests ibm-mq -n openshift-marketplace
  6. Create an OperatorGroup object YAML file

    An OperatorGroup is an OLM resource that selects target namespaces in which to generate required RBAC access for all Operators in the same namespace as the OperatorGroup.

    The namespace to which you subscribe the Operator must have an OperatorGroup that matches the Operator's InstallMode, either the AllNamespaces or SingleNamespace mode. If the Operator you intend to install uses the AllNamespaces, then the openshift-operators namespace already has an appropriate OperatorGroup in place.

    However, if the Operator uses the SingleNamespace mode and you do not already have an appropriate OperatorGroup in place, you must create one.

    1. 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>
    2. Create the OperatorGroup object
      oc apply -f mq-operator-group.yaml
  7. Create a Subscription object YAML file to subscribe a namespace to the MQ Operator
    1. Create a file called "mq-sub.yaml" with the following contents:
      apiVersion: 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
      For AllNamespaces InstallMode usage, specify openshift-operators namespace. Otherwise, specify the relevant single namespace for SingleNamespace InstallMode usage.
    2. Create the Subscription object
      oc apply -f mq-sub.yaml
  8. 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.

What to do next

Deploying IBM MQ certified containers