ibm-mqadvanced-server-dev
by Helm
IBM MQ queue manager
About this chart
IBM MQ Advanced for Developers
Introduction
This chart deploys a single IBM® MQ Advanced for Developers version 9.1.5 server (Queue Manager). IBM MQ is messaging middleware that simplifies and accelerates the integration of diverse applications and business data across multiple platforms. It uses message queues to facilitate the exchanges of information and offers a single messaging solution for cloud, mobile, Internet of Things (IoT) and on-premises environments.
Chart Details
This chart will do the following:
- Create a single MQ server (Queue Manager) using a Stateful Set with one or two replicas depending on whether multi-instance queue managers are enabled. Kubernetes will ensure that if it fails for some reason, it will be restarted, possibly on a different worker node.
- Create a Service. This is used to ensure that MQ client applications have a consistent IP address to connect to, regardless of where the Queue Manager is actually running.
- Create an OpenShift Route for the web console.
- Create an OpenShift Route for the queue manager.
- [Optional] Create additional Persistent Volumes for use with a multi-instance Queue Manager.
- [Optional] Create a metrics Service for accessing Queue Manager metrics.
Prerequisites
- OpenShift Container Platform v3.11, v4.2 and v4.3 (Kubernetes 1.11, 1.14 & 1.16)
- You must create a Secret in the target namespace (see the Creating a Secret to store queue manager credentials section). This must contain the 'admin' user password and optionally the 'app' user password to use for messaging.
- If persistence is enabled (see the configuration section), then you either need to create a PersistentVolume, or specify a Storage Class if classes are defined in your cluster.
Red Hat OpenShift SecurityContextConstraints Requirements
The predefined OpenShift SecurityContextConstraints name: restricted has been verified for this chart when security.initVolumeAsRoot=false, if your target namespace is bound to this SecurityContextConstraints resource you can proceed to install the chart. This is the most restrictive SCC and it is used by default for authenticated users.
The IBM defined SecurityContextConstraints name: ibm-anyuid-scc has been verified for this chart when security.initVolumeAsRoot=true, if your target namespace is bound to this SecurityContextConstraints resource you can proceed to install the chart.
This chart also defines a custom SecurityContextConstraints which can be used when security.initVolumeAsRoot=true to finely control the permissions/capabilities needed to deploy this chart. You can enable this custom SecurityContextConstraints resource using the supplied scripts in the pak_extensions pre-install directory.
-
Custom SecurityContextConstraints definition:
apiVersion: security.openshift.io/v1 kind: SecurityContextConstraints metadata: name: ibm-mq-init-volume-as-root-scc allowHostDirVolumePlugin: false allowHostIPC: false allowHostNetwork: false allowHostPID: false allowHostPorts: false allowPrivilegeEscalation: true allowPrivilegedContainer: false allowedCapabilities: - CHOWN - FOWNER - DAC_OVERRIDE defaultAddCapabilities: null fsGroup: type: RunAsAny readOnlyRootFilesystem: false requiredDropCapabilities: - MKNOD runAsUser: type: RunAsAny seLinuxContext: type: MustRunAs supplementalGroups: type: RunAsAny volumes: - secret - configMap - downwardAPI - emptyDir - persistentVolumeClaim - projected users: [] priority: 0 -
From the command line, you can run the setup scripts included under pak_extensions
As a cluster admin the pre-install script is located at:
- pre-install/clusterAdministration/createSecurityClusterPrereqs.sh
As team admin the namespace scoped pre-install script is located at:
- pre-install/namespaceAdministration/createSecurityNamespacePrereqs.sh
Creating a Secret to store queue manager credentials
When using the IBM MQ Advanced for Developers certified container, you must create a Secret in the target namespace. This must contain the 'admin' user password and optionally the 'app' user password to use for messaging.
Before you begin
The secret will be a key: value pair with the value being a base64 encoded password string. Before you begin, convert your admin user password, and optionally your app user password, to base64 as follows:
$ echo -n 'my-admin-password' | base64
bXktYWRtaW4tcGFzc3dvcmQ=
$ echo -n 'my-app-password' | base64
bXktYXBwLXBhc3N3b3Jk
Creating a Secret
Before you begin you should make sure you have a command prompt open which has been configured to access your cluster at your target namespace:
- Create secret file
mq-secret.yamlcontaining your base64 encoded password(s) as follows:
apiVersion: v1
kind: Secret
metadata:
name: mq-secret
type: Opaque
data:
adminPassword: bXktYWRtaW4tcGFzc3dvcmQ=
appPassword: bXktYXBwLXBhc3N3b3Jk
- Create the secret:
$ oc create -f mq-secret.yaml
Resources Required
This chart uses the following resources by default:
- 0.5 CPU core
- 0.5 Gi memory
- 2 Gi persistent volume.
See the configuration section for how to configure these values.
Installing the Chart
Install the chart, specifying the release name (for example foo) and remote Helm repository name ibm-stable-charts with the following command:
helm install --name foo ibm-stable-charts/ibm-mqadvanced-server-dev --set license=accept --set queueManager.dev.secret.name=mysecret --set queueManager.dev.secret.adminPasswordKey=adminPassword --tls
This example assumes that you have added the stable Helm repository as a remote Helm repository. If you have not yet added the stable Helm repository as a remote Helm repository, you can do so by running the following command:
helm repo add ibm-stable-charts https://raw.githubusercontent.com/IBM/charts/master/repo/stable
This example also assumes that you have created a Secret mysecret, containing a key adminPassword with your admin password.
This command accepts the IBM MQ Advanced for Developers license and deploys an MQ Advanced for Developers server on the Kubernetes cluster. The configuration section lists the parameters that can be configured during installation.
Tip: See all the resources deployed by the chart using
kubectl get all -l release=foo
Uninstalling the Chart
You can uninstall/delete the foo release as follows:
helm delete foo --tls
The command removes all the Kubernetes components associated with the chart, except any Persistent Volume Claims (PVCs). This is the default behavior of Kubernetes, and ensures that valuable data is not deleted.
Configuration
The following table lists the configurable parameters of the ibm-mqadvanced-server-dev chart and their default values.
| Parameter | Description | Default |
|---|---|---|
license | Set to accept to accept the terms of the IBM license | "not accepted" |
image.repository | Image full name including repository | ibmcom/mq |
image.tag | Image tag | 9.1.5.0-r1 |
image.pullPolicy | Image pull policy | IfNotPresent |
image.pullSecret | Image pull secret, if you are using a private Docker registry | nil |
metadata.labels | Additional labels to be added to resources | {} |
persistence.enabled | Use persistent volumes for all defined volumes | true |
persistence.useDynamicProvisioning | Use dynamic provisioning (storage classes) for all volumes | true |
dataPVC.name | Suffix for the PVC name for main MQ data (under /var/mqm) | "data" |
dataPVC.storageClassName | Storage class of volume for main MQ data (under /var/mqm) | "" |
dataPVC.size | Size of volume for main MQ data (under /var/mqm) | 2Gi |
logPVC.enabled | Whether or not to use separate storage for transaction logs | false |
logPVC.name | Suffix for the PVC name for transaction logs | "log" |
logPVC.storageClassName | Storage class of volume for transaction logs | "" |
logPVC.size | Size of volume for transaction logs | 2Gi |
qmPVC.enabled | Whether or not to use separate storage for queue manager data | false |
qmPVC.name | Suffix for the PVC name for queue manager data | "qm" |
qmPVC.storageClassName | Storage class of volume for queue manager data | "" |
qmPVC.size | Size of volume for queue manager data | 2Gi |
metrics.enabled | Enable Prometheus metrics for the Queue Manager | true |
resources.limits.cpu | Kubernetes CPU limit for the Queue Manager container | 500m |
resources.limits.memory | Kubernetes memory limit for the Queue Manager container | 512Mi |
resources.requests.cpu | Kubernetes CPU request for the Queue Manager container | 500m |
resources.requests.memory | Kubernetes memory request for the Queue Manager container | 512Mi |
security.context.fsGroup | File system group ID (if required by storage provider) | nil |
security.context.supplementalGroups | List of supplemental groups (if required by storage provider) | nil |
security.initVolumeAsRoot | Whether or not storage provider requires root permissions to initialize | false |
queueManager.name | MQ Queue Manager name | Helm release name |
queueManager.multiInstance | Whether to run in multi-instance mode with an active and standby queue manager | false |
queueManager.terminationGracePeriodSeconds | The duration in seconds the Queue Manager needs to terminate gracefully | 30 |
queueManager.dev.secret.name | Secret that contains the 'admin' user password and optionally the 'app' user password to use for messaging | Mandatory - a secret name must be set |
queueManager.dev.secret.adminPasswordKey | Secret key that contains the 'admin' user password | Mandatory - a key must be set |
queueManager.dev.secret.appPasswordKey | Secret key that contains the 'app' user password | nil (no password required to connect an MQ client) |
pki.keys | An array of YAML objects that detail Kubernetes secrets containing TLS Certificates with private keys. See section titled "Supplying certificates to be used for TLS" for more details | [] |
pki.trust | An array of YAML objects that detail Kubernetes secrets containing TLS Certificates. See section titled "Supplying certificates to be used for TLS" for more details | [] |
nameOverride | Set to partially override the resource names used in this chart | ibm-mq |
livenessProbe.initialDelaySeconds | The initial delay before starting the liveness probe. Useful for slower systems that take longer to start the Queue Manager. | 60 |
livenessProbe.periodSeconds | How often to run the probe | 10 |
livenessProbe.timeoutSeconds | Number of seconds after which the probe times out |
Deploy ibm-mqadvanced-server-dev with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ibm-mqadvanced-server-dev on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartibm-mqadvanced-server-dev is pinned at v6.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply