Verifying the new container deployment
Now that IBM® MQ is deployed on Red Hat® OpenShift®, you can verify the environment using the IBM MQ samples.
Before you begin
About this task
In this task you run the IBM MQ samples from inside the migrated queue manager's container. However you might prefer to use your own applications running from another environment.
You need the following information:
- LDAP Username
- LDAP Password
- IBM MQ Channel name
- Queue name
This example code uses the following settings. Please note that your settings will differ.
- LDAP Username: mqapp
- LDAP Password: mqapp
- IBM MQ Channel name: DEV.APP.SVRCONN
- Queue name: Q1
Exec into the running IBM MQ container.
Use the following command:
oc exec -it qm1-ibm-mq-0 /bin/bash
qm1-ibm-mq-0is the Pod that we deployed in Creating the new queue manager on Red Hat OpenShift. If you called the deployment something different, then customize this value.
Send a message.
Run the following commands:
cd /opt/mqm/samp/bin export IBM MQSAMP_USER_ID=mqapp export IBM MQSERVER=DEV.APP.SVRCONN/TCP/'localhost(1414)' ./amqsputc Q1 QM1
You are prompted for a password, then you can send a message.
Verify that the message has been received successfully.
Run the GET sample:
./amqsgetc Q1 QM1
What to do next
Use the following information to help you with more complex migration scenarios:
- Migrating queued messages
- To migrate existing queued messages, follow guidance in the following topic for exporting and importing messages after the new queue manager is in place: Using the dmpmqmsg utility between two systems.
- Connecting to IBM MQ from outside the OpenShift environment
- The deployed queue manager can be exposed to IBM MQ clients and queue managers outside the OpenShift environment. The process depends on the version of IBM MQ connecting into the OpenShift environment. See Configuring a Route to connect to a queue manager from outside an OpenShift cluster.