Red Hat Bugzilla – Bug 1288923
[DOCS] [xPaaS] Document how to use the mesh configuration for A-MQ
Last modified: 2016-07-29 00:10:24 EDT
In the A-MQ docs section about high availability and scalability , we need to document how to use the mesh configuration so that a network of brokers can be deployed.
Background thread on openshift-sme list: http://post-office.corp.redhat.com/archives/openshift-sme/2015-November/msg00880.html
GitHub Issue created:  (now closed).
The information to help with this (via email from Tomas Schlosser). Please also contact him at email@example.com for any help with QE:
-- Start Forward --
yes, we have tested (and continue to do so) the mesh configuration with persistent setup. I can help Richard with debugging his environment, but I would need to get a bit more info.
- version of OpenShift
- version of templates
- version of docker image
- exact way of standing up A-MQ instance (from template - which? or through custom deploymentConfig - could I see it, please? or some other way?)
My initial guess is that you are missing mesh configuration options that are required:
- AMQ_MESH_DISCOVERY_TYPE (image jboss-amq-6/amq62-openshift only)
- AMQ_MESH_SERVICE_NAMESPACE (image jboss-amq-6/amq62-openshift only)
These environment variables are not in amq-persistent templates for a good reason. When you use persistent setup with A-MQ, you should not scale such pod, because it could share the persistent volume and cause issues when trying to get lock on shared kahadb store. Only way to create scaled persistent brokers is to create a few distinct brokers that all belong to the same service and use the deploymentConfig to set environment variables for clustering.
List of OpenShift resources:
service with selector cluster: my-cluster (e.g. amq-tcp pointing to port 61616)
persistentVolumeClaim named broker1-store
deploymentconfig with name broker1 using persistentVolumeClaim named broker1-store with label cluster: my-cluster
persistentVolumeClaim named broker2-store
deploymentconfig with name broker2 using persistentVolumeClaim named broker2-store with label cluster: my-cluster
Deployment configs would contain following environment variables:
- AMQ_MESH_SERVICE_NAME: amq-tcp
- AMQ_MESH_DISCOVERY_TYPE: kube
- AMQ_MESH_SERVICE_NAMESPACE: my-project
This setup is hard to scale, but we don't support scaling down anyway (data will be lost) and scaling through usual OpenShift way is blocked by OpenShift's inability to share storage (or provide new persistentVolumeClaims for every replica).
-- End Forward --
 GH Issue: https://github.com/openshift/openshift-docs/issues/1272