[OpenShift Container Platform][IBM Cloud Pak for Integration]

Example: Supplying MQSC and INI files

This example creates a Kubernetes ConfigMap that contains two MQSC files and one INI file. A queue manager is then deployed that processes these MQSC and INI files.

About this task

MQSC and INI files can be supplied when a queue manager is deployed. The MQSC and INI data must be defined in one or more Kubernetes ConfigMaps and Secrets. These must be created in the namespace (project) where you will deploy the queue manager.
Note: A Kubernetes Secret should be used when the MQSC or INI file contains sensitive data.
Supplying MQSC and INI in this way requires IBM® MQ Operator 1.1 or higher.

Example

The following example creates a Kubernetes ConfigMap that contains two MQSC files and one INI file. A queue manager is then deployed that processes these MQSC and INI files.

Example ConfigMap - apply the following YAML in your cluster:

apiVersion: v1
kind: ConfigMap
metadata:
  name: mqsc-ini-example
data:
  example1.mqsc: |
    DEFINE QLOCAL('DEV.QUEUE.1') REPLACE
    DEFINE QLOCAL('DEV.QUEUE.2') REPLACE
  example2.mqsc: |
    DEFINE QLOCAL('DEV.DEAD.LETTER.QUEUE') REPLACE
  example.ini: |
    Channels:
       MQIBindType=FASTPATH

Example QueueManager - deploy your queue manager with the following configuration, using the command line or using the IBM Cloud Pak® for Integration Platform Navigator:

apiVersion: mq.ibm.com/v1beta1
kind: QueueManager
metadata:
  name: mqsc-ini-cp4i
spec:
  version: 9.2.0.1-r1-eus
  license:
    accept: false
    license: L-RJON-BUVMQX
    use: NonProduction
  web:
    enabled: true
  queueManager:
    name: "MQSCINI"
    mqsc:
    - configMap:
        name: mqsc-ini-example
        items:
        - example1.mqsc
        - example2.mqsc
    ini:
    - configMap:
        name: mqsc-ini-example
        items:
        - example.ini
    storage:
      queueManager:
        type: ephemeral
Important: If you accept the IBM Cloud Pak for Integration license agreement, change accept: false to accept: true. See Licensing reference for mq.ibm.com/v1beta1 for details on the license.
Additional information:
  • A queue manager can be configured to use a single Kubernetes ConfigMap or Secret (as shown in this example) or multiple Kubernetes ConfigMaps and Secrets.
  • You can choose to use all of the MQSC and INI data from a Kubernetes ConfigMap or Secret (as shown in this example) or configure each queue manager to use only a subset of the available files.
  • MQSC and INI files are processed in alphabetical order based on their key. So example1.mqsc will always be processed before example2.mqsc, regardless of the order in which they appear in the queue manager configuration.
  • If multiple MQSC or INI files have the same key, across multiple Kubernetes ConfigMaps or Secrets, then this set of files is processed based on the order in which the files are defined in the queue manager configuration.