Deploying a queue manager using the OpenShift CLI

Use the QueueManager custom resource to deploy a queue manager onto a Red Hat OpenShift Container Platform cluster using the command line interface (CLI). This task should be completed by a project administrator


Before starting

We need to install the Red Hat OpenShift Container Platform command-line interface.

Log into the cluster using cloudctl login (for IBM Cloud Pak for Integration), or oc login.

If this is the first time deploying a queue manager into this Red Hat OpenShift project, then follow the steps for Preparing the OpenShift project for IBM MQ using the OpenShift CLI.


Procedure

  1. Deploy a queue manager. The following example deploys a "quick start" queue manager, which uses ephemeral (non-persistent) storage, and turns off MQ security. Messages will not be persisted across restarts of the queue manager. We can adjust the contents of the YAML to change many queue manager settings.
    1. Create a QueueManager YAML file For example, to install a basic queue manager in IBM Cloud Pak for Integration, create the file "mq-quickstart.yaml" with the following contents:
      apiVersion: mq.ibm.com/v1beta1
      kind: QueueManager
      metadata:
        name: quickstart-cp4i
      spec:
        license:
          accept: false
          license: L-RJON-BN7PN3
          use: NonProduction
        web:
          enabled: true
        queueManager:
          name: "QUICKSTART"
          storage:
            queueManager:
              type: ephemeral
        template:
          pod:
            containers:
             - name: qmgr
               env:
               - name: MQSNOAUT
                 value: "yes"
      Important: If you accept the IBM Cloud Pak for Integration license agreement, change accept: false to accept: true. See Licensing reference for mq.ibm.com/v1beta1 for details on the license.

      This example also includes a web server deployed with the queue manager, with the web console enabled with Single Sign-On with the Cloud Pak Identity and Access Manager.

      To install a basic queue manager independently of IBM Cloud Pak for Integration, create the file "mq-quickstart.yaml" with the following contents:
      apiVersion: mq.ibm.com/v1beta1
      kind: QueueManager
      metadata:
        name: quickstart
      spec:
        license:
          accept: false
          license: L-APIG-BMJJBM
        web:
          enabled: true
        queueManager:
          name: "QUICKSTART"
          storage:
            queueManager:
              type: ephemeral
        template:
          pod:
            containers:
             - name: qmgr
               env:
               - name: MQSNOAUT
                 value: "yes"
      Important:If you accept the MQ license agreement, change accept: false to accept: true. See Licensing reference for mq.ibm.com/v1beta1 for details on the license.
    2. Create the QueueManager object
      oc apply -f mq-quickstart.yaml

  2. Check the queue manager is running We can validate the deployment by running
    oc describe queuemanager <QueueManagerResourceName>
    , and then checking the status. For example, run
    oc describe queuemanager quickstart
    , and check that the status.Phase field indicates Running

Parent topic: Deploying IBM MQ certified containers using the IBM MQ Operator


Related tasks