ibm-mqadvanced-server-dev

by Helm

Helm chartv6.0.0App 9.1.5.0Apache-2.0

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:

  1. Create secret file mq-secret.yaml containing your base64 encoded password(s) as follows:
apiVersion: v1
kind: Secret
metadata:  
    name: mq-secret
type: Opaque
data:  
    adminPassword: bXktYWRtaW4tcGFzc3dvcmQ=
    appPassword: bXktYXBwLXBhc3N3b3Jk
  1. 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.

ParameterDescriptionDefault
licenseSet to accept to accept the terms of the IBM license"not accepted"
image.repositoryImage full name including repositoryibmcom/mq
image.tagImage tag9.1.5.0-r1
image.pullPolicyImage pull policyIfNotPresent
image.pullSecretImage pull secret, if you are using a private Docker registrynil
metadata.labelsAdditional labels to be added to resources{}
persistence.enabledUse persistent volumes for all defined volumestrue
persistence.useDynamicProvisioningUse dynamic provisioning (storage classes) for all volumestrue
dataPVC.nameSuffix for the PVC name for main MQ data (under /var/mqm)"data"
dataPVC.storageClassNameStorage class of volume for main MQ data (under /var/mqm)""
dataPVC.sizeSize of volume for main MQ data (under /var/mqm)2Gi
logPVC.enabledWhether or not to use separate storage for transaction logsfalse
logPVC.nameSuffix for the PVC name for transaction logs"log"
logPVC.storageClassNameStorage class of volume for transaction logs""
logPVC.sizeSize of volume for transaction logs2Gi
qmPVC.enabledWhether or not to use separate storage for queue manager datafalse
qmPVC.nameSuffix for the PVC name for queue manager data"qm"
qmPVC.storageClassNameStorage class of volume for queue manager data""
qmPVC.sizeSize of volume for queue manager data2Gi
metrics.enabledEnable Prometheus metrics for the Queue Managertrue
resources.limits.cpuKubernetes CPU limit for the Queue Manager container500m
resources.limits.memoryKubernetes memory limit for the Queue Manager container512Mi
resources.requests.cpuKubernetes CPU request for the Queue Manager container500m
resources.requests.memoryKubernetes memory request for the Queue Manager container512Mi
security.context.fsGroupFile system group ID (if required by storage provider)nil
security.context.supplementalGroupsList of supplemental groups (if required by storage provider)nil
security.initVolumeAsRootWhether or not storage provider requires root permissions to initializefalse
queueManager.nameMQ Queue Manager nameHelm release name
queueManager.multiInstanceWhether to run in multi-instance mode with an active and standby queue managerfalse
queueManager.terminationGracePeriodSecondsThe duration in seconds the Queue Manager needs to terminate gracefully30
queueManager.dev.secret.nameSecret that contains the 'admin' user password and optionally the 'app' user password to use for messagingMandatory - a secret name must be set
queueManager.dev.secret.adminPasswordKeySecret key that contains the 'admin' user passwordMandatory - a key must be set
queueManager.dev.secret.appPasswordKeySecret key that contains the 'app' user passwordnil (no password required to connect an MQ client)
pki.keysAn 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.trustAn array of YAML objects that detail Kubernetes secrets containing TLS Certificates. See section titled "Supplying certificates to be used for TLS" for more details[]
nameOverrideSet to partially override the resource names used in this chartibm-mq
livenessProbe.initialDelaySecondsThe initial delay before starting the liveness probe. Useful for slower systems that take longer to start the Queue Manager.60
livenessProbe.periodSecondsHow often to run the probe10
livenessProbe.timeoutSecondsNumber 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartibm-mqadvanced-server-dev is pinned at v6.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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