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: https://www.ibm.com/docs/en/cloud-paks/cp-integration/2021.2?topic=guide-extracting-queue-manager-configuration
Once extracted check in the Queue configuration file to github as in https://github.com/gskumar1010/cp4i-mq/blob/main/my.mqsc
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.
- Easily Install IBM MQ using Operators on OpenShift.
- 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:
https://www.ibm.com/docs/en/cloud-paks/cp-integration/2021.2?topic=installing-adding-online-catalog-sources-cluster 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
https://github.com/gskumar1010/cp4i-mq is the github repo and we will use this version of the image.
Oc project ibm-mq-demo
We will start a build using Docker strategy
oc-new-buld --name=mq-demo --strategy=docker https://github.com/gskumar1010/cp4i-mq.git
oc new-build --name=mq-demo --strategy=docker https://github.com/gskumar1010/cp4i-mq.git
abradhak@abradhak-mac ~ % oc new-build --name=mq-demo --strategy=docker https://github.com/gskumar1010/cp4i-mq.git
--> Found container image 7fcadcf (3 weeks old) from Docker Hub for "ibmcom/mq:18.104.22.168-r1-amd64"
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:22.214.171.124-r1-amd64" that will track the source image
* A Docker build using source code from https://github.com/gskumar1010/cp4i-mq.git will be created
* The resulting image will be pushed to image stream tag "mq-demo:latest"
* Every time "mq:126.96.36.199-r1-amd64" changes a new build will be triggered
--> Creating resources with label build=mq-demo ...
imagestream.image.openshift.io "mq" created
imagestream.image.openshift.io "mq-demo" created
buildconfig.build.openshift.io "mq-demo" created
In the console go to the build logs to get the URL of the image
From the Installed Operators option, click on Create Instance option on the Queue Manager
Then we will create a 188.8.131.52-r1 version of the MQ Queue Manager instance.
http://ibm.biz/BdqvCF Has the link to the licensing of IBM MQ Operator
Select the Type of availability as Native HA , where the data is stored across multiple locations to ensure resilience in case of failure.
Select the storage class and Type of volume as specified below. Set Enable web server to False.
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.
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
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:
- IBM MQ Transformation guide
- Deployment of IBM App connect on OpenShift
- Deployment of the traditional WebSphere JEE application to a OCP cluster in Amazon Web Services (AWS), Microsoft Azure, Google Cloud Platfom(GCP), and on-premises VMWare VSphere
- SE Synergy and Acceleration Team channel on YouTube
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.