MQ

 View Only

IBM Power: Deploying IBM MQ in the Cloud Pak for Integration 2021.4.1

By CALLUM JACKSON posted Mon December 13, 2021 01:12 PM

  

When deploying IBM MQ within the Cloud Pak for Integration 2021.4.1 on IBM Power, the process is different from other platforms. Instead of using the IBM MQ operator and using a supplied IBM MQ container image, customers build their own container image and deploy using a Helm chart. This blog takes users through the steps, which is separated into four stages:

  1. Building the MQ container image for Power
  2. Pushing this to a container registry
  3. Deploying the MQ container using the MQ sample Helm chart
  4. Testing the deployment

Pre-requisites  

The following instructions assume the Power machine has the following components installed:

  • Git
  • Podman
  • make
  • IBM MQ (9.2.3 or greater) client or server

The process also requires you to have a RedHat login.

Building the MQ container image for Power

These instructions build an IBM MQ Advanced Developer edition container image. The process to build a license IBM MQ container image follows a similar process and where it differs a reference is provided to the alternative process.

  1. The IBM MQ container build process is provided on GitHub. To run this locally you need to clone the IBM MQ Container GitHub repository by running the following command:

git clone https://github.com/ibm-messaging/mq-container.git

  1. Create a new directory under mq-container called downloads.
  1. As mentioned previously we will build an IBM MQ Advanced for Developer Edition container image. If you would prefer a licensed image, please consult here. Download the IBM MQ Advanced for Developer Edition for Power and copy to the downloads. 

  1. The build process downloads other container images from the RedHat registry, to allow the build to access this you need to login to the RedHat registry using the following command:

podman login registry.redhat.io 

  1. Run the command to start the container build process:

MQ_ARCHIVE_DEV=9.2.4.0-IBM-MQ-Advanced-for-Developers-Non-Install-LinuxPPC64LE.tar.gz MQ_VERSION=9.2.4.0 make 

  1. When the build completes you can view the images by running:

podman images

Pushing this to a container registry

Now the image has been built, this is published to a container registry where RedHat OpenShift will pull it when deploying IBM MQ. There are different approaches to container registries that your organization may use. These instructions demonstrate how this can be published to the internal OpenShift container image registry. 

  1. Log into the OpenShift environment from the command line:
    oc login -u kubeadmin -p <password_from_install_log> https://api-int.<cluster_name>.<base_domain>:6443

  2. The OpenShift container image registry may not be externalized, if this is the case you will need to run the following command:
    oc patch configs.imageregistry.operator.openshift.io/cluster --patch '{"spec":{"defaultRoute":true}}' --type=merge 
  1. Login into the OpenShift container image registry by running the following two commands:
    HOST=$(oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}')

podman login -u kubeadmin -p $(oc whoami -t) --tls-verify=false $HOST 

  1. Create a new project in OpenShift that will be used for the deployment:

oc new-project mq

  1. The image created on the local machine needs to be tagged correctly for the OpenShift container registry. To complete run the following command:
    podman tag localhost/ibm-mqadvanced-server-dev:9.2.4.0-ppc64le $HOST/mq/ibm-mqadvanced-server-dev:9.2.4.0-ppc64le

  2. The container image is ready to be published to the OpenShift container registry. Run the following command:

podman push $HOST/mq/ibm-mqadvanced-server-dev:9.2.4.0-ppc64le --tls-verify=false

Deploy IBM MQ using the sample Helm chart

The container image has been published to the OpenShift container registry, we are now ready to deploy out a Queue Manager. A sample IBM MQ Helm chart is available here that simplifies this process.

  1. Clone the IBM MQ sample Helm chart GitHub repository by running the following command:

git clone https://github.com/ibm-messaging/mq-helm.git

  1. Change directories to mqhelm/samples/OpenShiftIBMPower/deploy and run the following command:

./install.sh

This will deploy out an IBM MQ queue manager assuming you have stored the container within the OpenShift container registry. We have also decided to NOT use any persistent volumes. This is to avoid any additional dependencies, and variability in different setups. Clearly in a production environment, a persistent volume would be used. 

Testing the deployment

Now that the Queue Manager has been deployed, we can test the environment.

  1. Change to the test directory:
    cd ../test
  2. To start messages being sent to IBM MQ, run the following command:
    ./sendMessage.sh
  3. To receive the messages sent, run:
    ./getMessage.sh
  4. To clean-up the environment and remove the Queue Manager, change directories to the deploy directory and run cleanup.sh:
    cd ../deploy
    ./cleanup.sh

 In this blog we have shown how you can get started with IBM MQ in the Cloud Pak for Integration 2021.4.1, and verify that the IBM MQ is working as expected.

0 comments
25 views

Permalink