Creating the resources for the queue manager

Import the IBM® MQ configuration, and the TLS certificates and keys, into the Red Hat® OpenShift® environment.

Before you begin

This task assumes that you have selected the target architecture for IBM MQ running in containers.

About this task

In the previous sections you have extracted, updated and defined two resources:

  • IBM MQ configuration
  • TLS certificates and keys

You need to import these resources into the OpenShift environment before the queue manager is deployed.

Procedure

  1. Import the IBM MQ configuration into OpenShift.

    The following instructions assume that you have the IBM MQ configuration in the current directory, in a file called backup.mqsc. Otherwise, you need to customize the filename based on your environment.

    1. Log into your cluster using oc login.
    2. Load the IBM MQ configuration into a configmap.

      Run the following command:

      
      oc create configmap my-mqsc-migrated --from-file=backup.mqsc
      
    3. Verify that the file has loaded successfully.

      Run the following command:

      
      oc describe configmap my-mqsc-migrated
      
  2. Import the IBM MQ TLS resources

    As discussed in Optional: Extracting and acquiring the queue manager keys and certificates, TLS might be required for the queue manager deployment. If so, you should already have a number of files ending with .crt and .key. You need to add these into Kubernetes secrets for the queue manager to reference at deployment time.

    For example, if you had a key and certificate for the queue manager they might be called:

    • qmgr.crt
    • qmgr.key

    To import these files, run the following command:

    
    oc create secret tls my-tls-migration --cert=qmgr.crt --key=qmgr.key 
    

    Kubernetes provides this helpful utility when you are importing a matching public and private key. If you have additional certificates to add, for instance into the queue manager trust store, run the following command:

    
    oc create secret generic my-extra-tls-migration --from-file=comma_separated_list_of_files
    

    For example, if the files to be imported are trust1.crt, trust2.crt and trust3.crt, the command is this:

    
    oc create secret generic my-extra-tls-migration --from-file=trust1.crt,trust2.crt,trust3.crt
    

What to do next

You are now ready to create the new queue manager on Red Hat OpenShift.