-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from ibm-messaging/9.3.4
Updates for 9.3.4
- Loading branch information
Showing
22 changed files
with
435 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Deploying MQ Multi-instance using the IBM MQ Helm Chart on Azure AKS | ||
|
||
## Pre-reqs | ||
Prior to using the Helm chart you will need to install four dependencies: | ||
1. [Helm version 3](https://helm.sh/docs/intro/install/) | ||
2. [Kubectl](https://kubernetes.io/docs/tasks/tools/) | ||
3. [Azure Command Line](https://docs.microsoft.com/en-gb/cli/azure/) | ||
|
||
|
||
## Installation | ||
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). | ||
1. Change directories to *deploy*: `cd deploy` | ||
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: | ||
* Parameter 1: Azure Resource Group name to be created for the deployment - this will default to *myMQResourceGroup* | ||
* Parameter 2: AKS Cluster name - this will default to *myMQCluster* | ||
* Parameter 3: The Azure region for the deployment - this will default to *eastus*. | ||
For instance if you wanted the Resource group *MQTest*, in a cluster names *MQCluster*, in *westus* region, the command would be: | ||
``` | ||
./createAKSCluster.sh MQTest MQCluster westus | ||
``` | ||
1. Run the installation command to deploy an instance of the helm chart: `./install.sh <namespace>` | ||
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: | ||
* The IBM MQ Helm Chart using the properties within the [secureapp_multiinstance.yaml](deploy/secureapp_multiinstance.yaml) file. | ||
* A configMap with MQ configuration to define a default Queue, and the security required. | ||
* A secret that includes certificates and keys from the `genericresources/createcerts` directory. Assuring the communication in MQ is secure. | ||
* A Kubernete load balancer service to expose the Multi-instance Queue Manager to the internet. | ||
* 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. | ||
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). | ||
## Testing | ||
Navigate to the *../test* directory. No modifications should be required, as the endpoint configuration for your environment will be discovered automatically. | ||
1. To initiate the testing, run the **./sendMessage.sh \<namespace\>** command. It will then connect to MQ and start sending messages immediately. | ||
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. | ||
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. | ||
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. | ||
1. If you want to remove the AKS cluster run the command: **./deleteAKSCluster.sh \<ResourceGroup\> \<ClusterName\> \<AKS Region\>** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#! /bin/bash | ||
# © Copyright IBM Corporation 2023 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
export TARGET_NAMESPACE=default | ||
|
||
helm delete multiinstance | ||
kubectl delete secret helmsecure -n $TARGET_NAMESPACE | ||
kubectl delete configmap helmsecure -n $TARGET_NAMESPACE | ||
kubectl delete pvc qm-multiinstance-ibm-mq-0 -n $TARGET_NAMESPACE | ||
kubectl delete pvc qm-multiinstance-ibm-mq-1 -n $TARGET_NAMESPACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#! /bin/bash | ||
# © Copyright IBM Corporation 2023 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
export RESOURCE_GROUP=${1:-"myMQResourceGroup"} | ||
export CLUSTER_NAME=${2:-"myMQCluster"} | ||
export REGION=${3:-"eastus"} | ||
|
||
az group create --name $RESOURCE_GROUP --location $REGION | ||
|
||
az aks create --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --node-count 2 --generate-ssh-keys | ||
|
||
az aks get-credentials --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME |
29 changes: 29 additions & 0 deletions
29
samples/AzureAKSMultiInstance/deploy/customStorageClass.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# © Copyright IBM Corporation 2023 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
kind: StorageClass | ||
apiVersion: storage.k8s.io/v1 | ||
metadata: | ||
name: mq-azurefile | ||
provisioner: file.csi.azure.com | ||
reclaimPolicy: Delete | ||
volumeBindingMode: Immediate | ||
mountOptions: | ||
- rw | ||
- bg | ||
- intr | ||
- vers=4 | ||
- sec=sys | ||
parameters: | ||
skuName: Premium_LRS | ||
protocol: nfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#! /bin/bash | ||
# © Copyright IBM Corporation 2023 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
export RESOURCE_GROUP=${1:-"myMQResourceGroup"} | ||
export CLUSTER_NAME=${2:-"myMQCluster"} | ||
export REGION=${3:-"eastus"} | ||
|
||
az aks delete --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --yes --no-wait | ||
|
||
az group delete --resource-group $RESOURCE_GROUP --yes --no-wait |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#! /bin/bash | ||
# © Copyright IBM Corporation 2023 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
export TARGET_NAMESPACE=${1:-"default"} | ||
export QM_KEY=$(cat ../../genericresources/createcerts/server.key | base64 | tr -d '\n') | ||
export QM_CERT=$(cat ../../genericresources/createcerts/server.crt | base64 | tr -d '\n') | ||
export APP_CERT=$(cat ../../genericresources/createcerts/application.crt | base64 | tr -d '\n') | ||
|
||
( echo "cat <<EOF" ; cat mtlsqm.yaml_template ; echo EOF ) | sh > mtlsqm.yaml | ||
|
||
kubectl config set-context --current --namespace=$TARGET_NAMESPACE | ||
kubectl apply -f mtlsqm.yaml | ||
|
||
kubectl apply -f customStorageClass.yaml | ||
|
||
helm install multiinstance ../../../charts/ibm-mq -f secureapp_multiinstance.yaml |
Oops, something went wrong.