In this article, we will explain how we can easily deploy an IBM MQ Queue Manager on OpenShift Container Platform (OCP). IBM MQ is the market-leading queue-based messaging solution, for enterprises of all sizes, with over a quarter of a century of experience across industries worldwide. OpenShift Container Platform (OCP) is the leading hybrid cloud enterprise Kubernetes application platform. In an earlier set of videos we demonstrated how OCP can be easily installed on different public clouds(AWS, Azure, GCP) and on-premises using VMWare VSphere.  For this exercise we are using an OpenShift Container Platform in Amazon Web Services(AWS).

The adoption of IBM MQ in containers can be separated into three aspects: Foundational, Decentralized and Optimized. This article will focus on the first level (MQ containerization) where the IBM MQ installations have been placed into containers, but the original high level topology remains the same. For more details about each one of those adoption model you can review the article "Moving your IBM MQ estate to containers."

We will demonstrate the Rehosting to OpenShift Container Platform using simple Queue configuration.

First step in the process is to extract the existing Queue Manager configuration. Using dmpmqcfg utility extract the configuration of the Queue manager running on the virtual machine.

This page provides the details for extracting the queue manager: 

Once extracted check in the Queue configuration file to github as in

On OpenShift

 Our objective is to move to a more agile integration architecture i.e. MQ on containers using OpenShift Platform. Following are the steps involved on how an existing IBM MQ application can be easily deployed and upgraded on a containerized IBM MQ engine running on OCP with zero code changes.

  1. Easily Install IBM MQ using Operators on OpenShift.
  2. Rehost an MQ Queue Manager running on virtual machines onto OpenShift using configuration of an existing MQ Queue manager.

      3) Demonstrate native HA, which will pre configure High availability of Queue manager running on OpenShift.

Once the OpenShift Container platform is created, login to the web console using valid credentials.

Ensure the nodes are at m5.xlarge as the HA configuration will required the instances to be at that level. Otherwise edit machineset configuration YAML the instance parameter and adjust the machine count to 0 and then to 1.

Prerequisite for installing IBM MQ or any IBM Cloud Paks on OpenShift: has a couple of code blocks. Just insert those yaml into your cluster

Add the required catalog source objects from the OpenShift web console, by importing YAML by clicking the “+” sign on the top of the console

You can create a new project on OpenShift either by using the web console or from the command line Interface (CLI).


OR oc new project ibm-mq-demo

We will install the 1.6 version of IBM MQ operator.

Go to the operator hub and filter the available operators for “MQ”. But for this demonstration, we are going to focus on IBM MQ product only, so we will install the specific operator instead of the entire cloudpak for integration.

Select IBM MQ and click on Install and choose version 1.6. Installation mode can be either All namespaces or a specific namespace only depending on the requirement.  

Now let us get the image of the Queue manager ready. We then will build Queue manager on OpenShift using Docker build strategy is the github repo and we will use this version of the image.

Dockerfile contents:

Oc project ibm-mq-demo

We will start a build using Docker strategy

oc-new-buld --name=mq-demo --strategy=docker
oc new-build --name=mq-demo --strategy=docker


abradhak@abradhak-mac ~ % oc new-build --name=mq-demo --strategy=docker 

--> Found container image 7fcadcf (3 weeks old) from Docker Hub for "ibmcom/mq:"

    IBM MQ Advanced for Developers Server


    Simplify, accelerate and facilitate the reliable exchange of data with a security-rich messaging solution — trusted by the world’s most successful enterprises

    Tags: mq messaging

    * An image stream tag will be created as "mq:" that will track the source image

    * A Docker build using source code from will be created

      * The resulting image will be pushed to image stream tag "mq-demo:latest"

      * Every time "mq:" changes a new build will be triggered

--> Creating resources with label build=mq-demo ... "mq" created "mq-demo" created "mq-demo" created

--> Success

In the console go to the build logs to get the URL of the image

Rehosting IBM MQ on OpenShift container platform(OCP)-Sep-23-2021-05-18-49-42-PM


From the Installed Operators option, click on Create Instance option on the Queue Manager

Then we will create a version of the MQ  Queue Manager instance. Has the link to the licensing of IBM MQ Operator

Rehosting IBM MQ on OpenShift container platform(OCP)-Sep-23-2021-05-18-49-91-PM

Select the Type of availability as Native HA , where the data is stored across multiple locations to ensure resilience in case of failure.

Rehosting IBM MQ on OpenShift container platform(OCP)-Sep-23-2021-05-18-49-68-PM

Select the storage class and Type of volume as specified below. Set Enable web server to False.

Rehosting IBM MQ on OpenShift container platform(OCP)-Sep-23-2021-05-18-46-26-PM

It is possible to add the queue manager configuration as part of this MQSC configmap option, if desired. Since we have it part of the image that will not be leveraged.

Rehosting IBM MQ on OpenShift container platform(OCP)-3

Click on the YAML view and add the image created by adding “image :” parameter under the “Queue Manager”

Click on the Demo-queue-manager-ibm-mq-0 POD.

The queue manager is automatically started when the queue manager is deployed.

Go to the Terminal Tab.

 display qlocal(*) to view all the queues

 display qlocal(cp4i*)



Rehosting an IBM MQ Queue Manager on to OpenShift along with all the required objects,   was demonstrated above. Also we saw how easily we can choose the different high availability possibilities and the ease of standing up a NativeHA queue manager with 3 nodes. It is easy to both Rehost and manage MQ in a container based environment using OpenShift platform and all the benefits of container environment can be leveraged with this approach,


Rehost IBM MQ Queue Manager on OpenShift:


Code references:

About the authors

Abay Radhakrishnan has more than 30 years of experience in the consulting, IT and software fields with focus on emerging technologies. He plays a unique combination of an enterprise architect and cloud strategy and solutions architect. As a technical management personnel, he has deep experience in defining, architecting, managing and implementing large-scale enterprise architectures and solutions.

Read full bio