Skip to content

Commit c44ff2c

Browse files
Merge pull request #70 from ibm-messaging/9.3.4
Updates for 9.3.4
2 parents 5ccad54 + abac115 commit c44ff2c

22 files changed

+435
-11
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ samples/AWSEKS/deploy/mtlsqm.yaml
44
samples/AWSEKS/test/ccdt_generated.json
55
samples/AzureAKS/deploy/mtlsqm.yaml
66
samples/AzureAKS/test/ccdt_generated.json
7+
samples/AzureAKSMultiInstance/deploy/mtlsqm.yaml
8+
samples/AzureAKSMultiInstance/test/ccdt_generated.json
9+
samples/OpenShiftNativeHA/deploy/mtlsqm.yaml
10+
samples/OpenShiftNativeHA/test/ccdt_generated.json

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# IBM MQ Sample Helm Chart
2-
This repository provides a helm chart to deploy an IBM® MQ container built from the [IBM MQ Container GitHub repository](https://github.com/ibm-messaging/mq-container), and has been verified against the [9.3.3 branch](https://github.com/ibm-messaging/mq-container/tree/9.3.3).
2+
This repository provides a helm chart to deploy an IBM® MQ container built from the [IBM MQ Container GitHub repository](https://github.com/ibm-messaging/mq-container), and has been verified against the [9.3.4 branch](https://github.com/ibm-messaging/mq-container/tree/9.3.4).
33

44
## Pre-reqs
55
Prior to using the Helm chart you will need to install two dependencies:

charts/ibm-mq/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
apiVersion: v2
1515
name: ibm-mq
1616
description: IBM MQ queue manager
17-
version: 7.1.0
17+
version: 8.0.0
1818
type: application
19-
appVersion: 9.3.3.0
19+
appVersion: 9.3.4.0
2020
kubeVersion: ">=1.18.0-0"
2121
keywords:
2222
- IBM MQ

charts/ibm-mq/README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Introduction
66

7-
This chart deploys a single IBM® MQ server (Queue Manager) built from the [IBM MQ Container GitHub repository](https://github.com/ibm-messaging/mq-container), and has been verified using the [9.3.3 branch](https://github.com/ibm-messaging/mq-container/tree/9.3.3). IBM MQ is messaging middleware that simplifies and accelerates the integration of diverse applications and business data across multiple platforms. It uses message queues, topics and subscriptions to facilitate the exchanges of information and offers a single messaging solution for cloud and on-premises environments.
7+
This chart deploys a single IBM® MQ server (Queue Manager) built from the [IBM MQ Container GitHub repository](https://github.com/ibm-messaging/mq-container), and has been verified using the [9.3.4 branch](https://github.com/ibm-messaging/mq-container/tree/9.3.4). IBM MQ is messaging middleware that simplifies and accelerates the integration of diverse applications and business data across multiple platforms. It uses message queues, topics and subscriptions to facilitate the exchanges of information and offers a single messaging solution for cloud and on-premises environments.
88

99
## Chart Details
1010

@@ -106,7 +106,7 @@ Alternatively, each parameter can be specified by using the `--set key=value[,ke
106106
| ------------------------------- | --------------------------------------------------------------- | ------------------------------------------ |
107107
| `license` | Set to `accept` to accept the terms of the IBM license | `"not accepted"` |
108108
| `image.repository` | Image full name including repository | `ibmcom/mq` |
109-
| `image.tag` | Image tag | `9.3.3.0-r1` |
109+
| `image.tag` | Image tag | `9.3.4.0-r1` |
110110
| `image.pullPolicy` | Setting that controls when the kubelet attempts to pull the specified image. | `IfNotPresent` |
111111
| `image.pullSecret` | An optional list of references to secrets in the same namespace to use for pulling any of the images used by this QueueManager. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honoured. For more information, see [here](https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod) | `nil` |
112112
| `metadata.labels` | The labels field serves as a pass-through for Pod labels. Users can add any label to this field and have it apply to the Pod. | `{}` |
@@ -139,7 +139,9 @@ Alternatively, each parameter can be specified by using the `--set key=value[,ke
139139
| `queueManager.envVariables` | An array of YAML objects (name / value pairs) that detail the environment variables that should be associated with the Queue Manager container | `[]` |
140140
| `queueManager.terminationGracePeriodSeconds` | Optional duration in seconds the Pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates delete immediately. The target time in which ending the queue manager is attempted, escalating the phases of application disconnection. Essential queue manager maintenance tasks are interrupted and applications disconnected if necessary. Defaults to 30 seconds. | 30 |
141141
| `queueManager.updateStrategy` | Specify the update strategy for the StatefulSet. In the case of Native HA and Multi-instance this should always be onDelete, and therefore this parameter has no affect. For further details regarding Native HA and Multi-instance update process consult the [Updating Native HA and Multi-instance section](#Updating-the-Chart). In the case of a single instance queue manager the default is RollingUpdate. | `RollingUpdate` - single instance, `onDelete` - Native HA and Multi-instance |
142-
| `web.enable` | Whether or not to enable the web server. Default is empty string, which causes the default behaviour of the container. Set to `true` to enable the web console, and `false` to disable. | ``
142+
| `web.enable` | Whether or not to enable the web server. Default is empty string, which causes the default behaviour of the container. Set to `true` to enable the web console, and `false` to disable. | `` |
143+
| `web.manualConfig.configMap.name` | ConfigMap represents a Kubernetes ConfigMap that contains web server XML configuration. The web.manualConfig can only include either the configMap or secret parameter, not both.| `` |
144+
| `web.manualConfig.secret.name` | Secret represents a Kubernetes Secret that contains web server XML configuration. The web.manualConfig can only include either the configMap or secret parameter, not both.| `` |
143145
| `pki.keys` | An array of YAML objects that detail Kubernetes secrets containing TLS Certificates with private keys. For further details regarding how this is specified consult [Supplying certificates to be used for TLS](#Supplying-certificates-to-be-used-for-TLS) | `[]` |
144146
| `pki.trust` | An array of YAML objects that detail Kubernetes secrets or configMaps containing TLS Certificates. For further details regarding how this is specified consult [Supplying certificates using secrets to be used for TLS](#Supplying-certificates-to-be-used-for-TLS) and [Supplying certificates using a configMap](#Supplying-certificates-using-a-configMap) | `[]` |
145147
| `security.context.fsGroup` | A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- If unset, the Kubelet will not modify the ownership and permissions of any volume. | `nil` |

charts/ibm-mq/templates/stateful-set.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,23 @@ spec:
232232
{{- end }}
233233
{{- end }}
234234
{{- end }}
235+
{{- if .Values.web.manualConfig.configMap.name }}
236+
- name: cm-webxml-{{ .Values.web.manualConfig.configMap.name }}
237+
configMap:
238+
name: {{ .Values.web.manualConfig.configMap.name }}
239+
defaultMode: 0644
240+
items:
241+
- key: mqwebuser.xml
242+
path: mqwebuser.xml
243+
{{- else if .Values.web.manualConfig.secret.name }}
244+
- name: s-webxml-{{ .Values.web.manualConfig.secret.name }}
245+
secret:
246+
secretName: {{ .Values.web.manualConfig.secret.name }}
247+
defaultMode: 0644
248+
items:
249+
- key: mqwebuser.xml
250+
path: mqwebuser.xml
251+
{{- end }}
235252
terminationGracePeriodSeconds: {{.Values.queueManager.terminationGracePeriodSeconds}}
236253
containers:
237254
- name: qmgr
@@ -396,6 +413,17 @@ spec:
396413
- mountPath: "/mnt/mqm-log"
397414
name: {{ $logVolumeClaimName }}
398415
{{- end }}
416+
{{- if .Values.web.manualConfig.configMap.name }}
417+
- name: cm-webxml-{{ .Values.web.manualConfig.configMap.name }}
418+
mountPath: "/etc/mqm/web/installations/Installation1/servers/mqweb/mqwebuser.xml"
419+
subPath: "mqwebuser.xml"
420+
readOnly: true
421+
{{- else if .Values.web.manualConfig.secret.name }}
422+
- name: s-webxml-{{ .Values.web.manualConfig.secret.name }}
423+
mountPath: "/etc/mqm/web/installations/Installation1/servers/mqweb/mqwebuser.xml"
424+
subPath: "mqwebuser.xml"
425+
readOnly: true
426+
{{- end }}
399427
securityContext:
400428
allowPrivilegeEscalation: false
401429
readOnlyRootFilesystem: false

charts/ibm-mq/values.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ image:
1919
# repository is the container repository to use
2020
repository: icr.io/ibm-messaging/mq
2121
# tag is the tag to use for the container repository
22-
tag: 9.3.3.0-r1
22+
tag: 9.3.4.0-r1
2323
# pullSecret is the secret to use when pulling the image from a private registry
2424
pullSecret:
2525
# pullPolicy is either IfNotPresent or Always (https://kubernetes.io/docs/concepts/containers/images/)
@@ -190,3 +190,8 @@ tolerations: []
190190

191191
web:
192192
enabled:
193+
manualConfig:
194+
configMap:
195+
name:
196+
secret:
197+
name:
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Deploying MQ Multi-instance using the IBM MQ Helm Chart on Azure AKS
2+
3+
## Pre-reqs
4+
Prior to using the Helm chart you will need to install four dependencies:
5+
1. [Helm version 3](https://helm.sh/docs/intro/install/)
6+
2. [Kubectl](https://kubernetes.io/docs/tasks/tools/)
7+
3. [Azure Command Line](https://docs.microsoft.com/en-gb/cli/azure/)
8+
9+
10+
## Installation
11+
1. Log into the Azure command line using `az login`. If you require additional details please consult [here](https://docs.microsoft.com/en-gb/cli/azure/get-started-with-azure-cli).
12+
1. Change directories to *deploy*: `cd deploy`
13+
1. An optional script to create and connect to a new AKS cluster is included called [*./createAKSCluster.sh \<ResourceGroup\> \<ClusterName\> \<AKS Region\>*](deploy/createAKSCluster.sh) which takes three optional parameters:
14+
* Parameter 1: Azure Resource Group name to be created for the deployment - this will default to *myMQResourceGroup*
15+
* Parameter 2: AKS Cluster name - this will default to *myMQCluster*
16+
* Parameter 3: The Azure region for the deployment - this will default to *eastus*.
17+
For instance if you wanted the Resource group *MQTest*, in a cluster names *MQCluster*, in *westus* region, the command would be:
18+
```
19+
./createAKSCluster.sh MQTest MQCluster westus
20+
```
21+
1. Run the installation command to deploy an instance of the helm chart: `./install.sh <namespace>`
22+
Where \<namespace\> is the Kubernetes namespace where the resources should be deployed into. If you are unsure this can be omitted and it will be installed into the default namespace. This will deploy a number of resources:
23+
* The IBM MQ Helm Chart using the properties within the [secureapp_multiinstance.yaml](deploy/secureapp_multiinstance.yaml) file.
24+
* A configMap with MQ configuration to define a default Queue, and the security required.
25+
* A secret that includes certificates and keys from the `genericresources/createcerts` directory. Assuring the communication in MQ is secure.
26+
* A Kubernete load balancer service to expose the Multi-instance Queue Manager to the internet.
27+
* A custom storage class called `mq-azurefile` which is suitable for MQ Multi-instance. Please note this is not automatically deleted in the cleanup script.
28+
1. This will take a minute or so to deploy, and the status can be checked with the following command: `kubectl get pods | grep multiinstance`. Wait until one of the three Pods is showing `1/1` under the ready status (only one will ever show this, the remainding two will be `0/1` showing they are replicas).
29+
30+
## Testing
31+
Navigate to the *../test* directory. No modifications should be required, as the endpoint configuration for your environment will be discovered automatically.
32+
33+
1. To initiate the testing, run the **./sendMessage.sh \<namespace\>** command. It will then connect to MQ and start sending messages immediately.
34+
35+
1. Open another terminal window and run the **./getMessage.sh \<namespace\>** command. You should see all of the messages being sent by the sendMessaging command.
36+
37+
1. To see how the pods work together in action, run the **kubectl get pod | grep multiinstance** command on another terminal window to view the current pods, and then delete the running pod (the one with the ready state of `1/1`) by running the command: **kubectl delete pod multiinstance-ibm-mq-0** (where the pod name is customized based on which one is active). Once the active pod is deleted, the application connections will then reconnect to the other pod.
38+
39+
1. You can clean up the resources by navigating to the *../deploy* directory and running the command **./cleanup.sh \<namespace\>**. This will delete everything from the AKS cluster, but leave the cluster itself. Do not worry if you receive messages about PVCs not being found, this is a generic clean-up script and assumes a worst case scenario.
40+
41+
1. If you want to remove the AKS cluster run the command: **./deleteAKSCluster.sh \<ResourceGroup\> \<ClusterName\> \<AKS Region\>**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#! /bin/bash
2+
# © Copyright IBM Corporation 2023
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
export TARGET_NAMESPACE=default
17+
18+
helm delete multiinstance
19+
kubectl delete secret helmsecure -n $TARGET_NAMESPACE
20+
kubectl delete configmap helmsecure -n $TARGET_NAMESPACE
21+
kubectl delete pvc qm-multiinstance-ibm-mq-0 -n $TARGET_NAMESPACE
22+
kubectl delete pvc qm-multiinstance-ibm-mq-1 -n $TARGET_NAMESPACE
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#! /bin/bash
2+
# © Copyright IBM Corporation 2023
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
export RESOURCE_GROUP=${1:-"myMQResourceGroup"}
17+
export CLUSTER_NAME=${2:-"myMQCluster"}
18+
export REGION=${3:-"eastus"}
19+
20+
az group create --name $RESOURCE_GROUP --location $REGION
21+
22+
az aks create --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --node-count 2 --generate-ssh-keys
23+
24+
az aks get-credentials --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# © Copyright IBM Corporation 2023
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
kind: StorageClass
15+
apiVersion: storage.k8s.io/v1
16+
metadata:
17+
name: mq-azurefile
18+
provisioner: file.csi.azure.com
19+
reclaimPolicy: Delete
20+
volumeBindingMode: Immediate
21+
mountOptions:
22+
- rw
23+
- bg
24+
- intr
25+
- vers=4
26+
- sec=sys
27+
parameters:
28+
skuName: Premium_LRS
29+
protocol: nfs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#! /bin/bash
2+
# © Copyright IBM Corporation 2023
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
export RESOURCE_GROUP=${1:-"myMQResourceGroup"}
17+
export CLUSTER_NAME=${2:-"myMQCluster"}
18+
export REGION=${3:-"eastus"}
19+
20+
az aks delete --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --yes --no-wait
21+
22+
az group delete --resource-group $RESOURCE_GROUP --yes --no-wait
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#! /bin/bash
2+
# © Copyright IBM Corporation 2023
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
export TARGET_NAMESPACE=${1:-"default"}
17+
export QM_KEY=$(cat ../../genericresources/createcerts/server.key | base64 | tr -d '\n')
18+
export QM_CERT=$(cat ../../genericresources/createcerts/server.crt | base64 | tr -d '\n')
19+
export APP_CERT=$(cat ../../genericresources/createcerts/application.crt | base64 | tr -d '\n')
20+
21+
( echo "cat <<EOF" ; cat mtlsqm.yaml_template ; echo EOF ) | sh > mtlsqm.yaml
22+
23+
kubectl config set-context --current --namespace=$TARGET_NAMESPACE
24+
kubectl apply -f mtlsqm.yaml
25+
26+
kubectl apply -f customStorageClass.yaml
27+
28+
helm install multiinstance ../../../charts/ibm-mq -f secureapp_multiinstance.yaml

0 commit comments

Comments
 (0)