Install IBM Cloud private 1.2
First, you will need to install IBM Cloud private 1.2. Detailed instructions are here. Once you have it installed, then the steps will be:
- Create a persistent volume
- Install MQ with advanced options
- Validate with opening the MQ management UI
If IBM Cloud private is already installed, make sure you have the Kubectl command line installed on your laptop/workstation so you can target any Kubernetes cloud you want. You can get the Kubectl command line here.
OK, let’s continue…
Create Persistent Volume
To deploy IBM MQ, you need to create a persistent volume that uses the “ReadWriteOnce” (RWO) access mode. You can create the storage volume from the UI, and should ideally be created before the deployment.
To create the volume, log into IBM Cloud private, and use the upper left menu to navigate to the Storage page
Once on the storage page, click “Create Storage”
In this example, I created a 2GB NFS volume with “ReadWriteOnce” access mode, and it will be retained if the pod is removed. If you are just trying things out, you can also create a HostPath volume, which uses local storage on whatever VM the pod happens to be deployed on.
The value of using a persistent volume is that even though this recipe only deploys a single MQ queue manager, you can still achieve a level of availability in that if the queue manager pod or the node itself were to fail, IBM Cloud private automatically re-schedules the queue manager to another node.
You will soon see that the default volume size for the MQ deployment specified in the helm chart is 2GB, so if you need more, go ahead and create a larger volume first, then match the size in the Advanced Installation fields that you will see shortly.
Get to the MQ Helm Chart
Next, install MQ itself. With IBM Cloud private, you have 2 ways to install IBM MQ:
- IBM Cloud private’s App Center UI
- From the command line using “Helm” commands
For this example, we will use the App Center. However, if you want to use the command line, you can directly access the helm charts here: https://github.com/IBM/charts. Either path is fine, and as we both know, if you love kubectl and helm commands, then using the helm charts directly is a great option (you can get helm command line here)
For the UI path, open IBM Cloud private 1.2, and navigate to the App Center.
Scroll until you see IBM MQ, and click “Install Package”.
As a general rule, most all services have important fields you need to fill in before you can properly install, which is why you’ll see the advanced installation options. IBM MQ is no different.
Once you see advanced options, go to the next step.
Specify Advanced Settings
There are quite a few advanced settings in the MQ install, but I’ll just highlight the ones you need to worry about.
Install Options 1 of 2:
In this first section you need to accept the license, otherwise the deployment will fail:
To confirm you accepted the license, type in ‘accept’ (no quotes) in the license field.
Install Options 2 of 2:
There are 2 optional fields you should consider in this last section.
This is where you can customize how large you want your storage to be, but remember, it can’t be bigger than the storage volume you created earlier.
If you keep it ‘ClusterIP’, then only apps running inside the IBM Cloud private cluster will be able to access the MQ service. However, if you change it to ‘NodePort’, then you will be able to call the MQ service from anywhere in the network (your data center, or wherever your firewalls allow).
Deploy the MQ Helm Chart
Once you are ready (you have accepted the license, created your persistent volume, and filled in all the advanced installation details) click “Review and Install”, then “Install”, and you are installing!
Depending on compute and storage speeds, it may take a few minutes to install, create default queues, and start the management UI. I tend to use the management UI URL (next step), and get frustrated when it says “not found”, but just be patient. It will load up.
To monitor the progress, you have two options:
From the UI, click on “Workloads”, select the MQ application (it’s actually a ‘deployment’ in Kubernetes terms), locate the pod and select it, then select the Logs tab.
From the command line: find the pod name and monitor its log:
kubectl get pods
kubectl logs <podname> -f
Start Using MQ
Once MQ is installed, you can start using MQ in two ways:
- As a developer through the API port
- As an operator through the console UI port
To find the ports, you also need to decide if you want to access MQ from a pod in the private cloud or from another environment in your data center. Remember the “NodePort” setting I added in the installation? That lets you connect from both while you are developing (then later you can remove the NodePort and only use the internal endpoint.
I like to select NodePort because it is quite useful for developers that want to initially develop their code and run from an existing environment (or in a dev-focused cloud like Mini-Kube) where they can iterate very quickly, access the MQ service, and then once they are ready they can move their application inside IBM Cloud private and use the internal endpoints.
To find which URLs to use, run the following to get the list of services:
kubectl get svc
Then once you identify the service name, run:
kubectl describe service <service Name>
Here is an example of what you will see:
Notice there are 2 sets of ports. MQ uses 1414 for the API, and 9443 for the web UI. Make sure you use the correct NodePort when accessing the UI.
For external access (through NodePort URL), fill in the following with one of your node IP addresses (any of your node IP addresses will do…I chose the proxy node IP address):
- Console: https://<publicIP>:31049/ibmmq/console
- Queue manager: <publicIP>(31935)
Once you see the login on the console, you can start with the default userID and password is “admin/passw0rd”
To start using MQ from an application, you will want to use the application user ID, not the admin user ID. The application user ID is “app” (with no default password). Click here to learn more and see examples.
IBM MQ can help you accelerate the integration of diverse applications and business data across multiple platforms. Using this recipe, you can quickly get IBM MQ running in IBM Cloud private 1.2.
Good luck and happy MQ’ing!