IBM MQ comes as a bundle with IBM Cloud Private. IBM MQ developer edition is available in the catalog for use in IBM Cloud Private Community Edition. In this blog post, lets see how to deploy MQ in IBM Cloud Private.
Before deploying MQ, create a Persistent volume. This link will help you to create a persistent volume using NFS Storage.
Deploying IBM MQ in IBM Cloud Private
Open a web browser and go to the “https://MasterNodeIP:8443/” URL (MasterNodeIP is the IP address of the master node of your ICP cluster) to access the IBM Cloud Private management console and Log in by typing admin for the user name and password. This will take you to ICP dashboard.
MQ Helm charts are made available in the IBM Cloud Private CE. In the upper left corner, Click on Menu->Catalog->Helm Charts. Find and click ibm-mqadvanced-server-dev. If ibm-mqadvanced-server-dev could not be found, IBM MQ image should be added into an IBM Cloud Private Cluster as mentioned in this link.
MQ package deployment page opens. (Chart version and published date will be mentioned) Click Configure to set any deployment values.
Type “mqdemo2” for the Release name and make sure the Target namespace is set to default. Read and accept the license. Release name can be any valid name as prescribed by the kubernetes.
Leave the Persistent Volume checked. This allows for persistence of an application’s data. If Persistent Volume is not used and if the container crashes, kubelet will restart it and the data will be lost since the container starts with a clean state, which is not ideal for MQ. IBM MQ stores queues, messages and configuration data on a Persistent Volume.
By default Service type is set to Cluster IP. Cluster IP exposes the service only on an internal IP in the cluster. Choose service type to Node Port, so that the pod can be exposed outside.
Provide Admin password and App password. This Admin password is required to log into MQ web console. If Admin password is not set here, later you will have to obtain the automatically generated password. Then click on Install to deploy.
IBM Cloud Private starts processing the Helm charts that are in the package to deploy Queue manager named â€śmqdemo2â€ť. After the deployment for all the resources is completed, an installation confirmation message is shown.
Checking if IBM MQ and QM has been deployed and running successfully
Check that the container has started successfully by confirming that the pod status is â€śRunningâ€ť using
kubectl get pods (Kubectl command line can be installed from here). Before running kubectl commands for the cluster you must configure the client. To configure the kubectl CLI, go to admin -> Click on Configure client, copy the various commands into your terminal window and run them.
kubectl get pods NAME READY STATUS RESTARTS AGE mqdemo2-ibm-mq-0 1/1 Running 0 2d
See all the resources deployed by the MQ chart using
kubectl get all -l release=mqdemo2
kubectl get all -l release=mqdemo2 NAME DESIRED CURRENT AGE statefulsets/mqdemo2-ibm-mq 1 1 2d NAME READY STATUS RESTARTS AGE po/mqdemo2-ibm-mq-0 1/1 Running 0 2d NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE svc/mqdemo2-ibm-mq NodePort 10.0.0.158
kubectl logs mqdemo2 will show that the Queue manager is in running state.
kubectl logs mqdemo2 ... Monitoring Queue Manager mqdemo2 QMNAME(mqdemo2) STATUS(Running) IBM MQ Queue Manager mqdemo2 is now fully running Server mqweb started with process ID 377.
MQ has been now deployed successfully and the queue manager named “mqdemo2” configured and started.