This repository contains configuration files and scripts to deploy two AMQ 7.10 clusters as they were deployed in two different datacenters (DC0 and DC1). Therefore, two OpenShift namespaces will play the datacenter role with names dc0
and dc1
.
- There are two AMQ clusters: DC0 and DC1.
- There are two brokers in every AMQ cluster deployed (size = 2).
When a dual-mirror
configuration is deployed:
- DC0-B0 mirrors to DC1-B0 (
broker-0
in AMQ clusterDC0
mirrors tobroker-0
in AMQ clusterDC1
) - DC0-B1 mirrors to DC1-B1
- DC1-B0 mirrors to DC0-B0 (
broker-0
in AMQ clusterDC1
mirrors tobroker-0
in AMQ clusterDC0
) - DC1-B1 mirrors to DC0-B1
There are two scenarios available to be tested, with two different configuration approaches:
- One-way / single mirroring
- Dual mirroring
Project structure, deployment files or manifests (secrets, custom resources, etc.) are managed using Kustomize. You can see the generated OpenShift manifests using the command:
oc kustomize ./overlays/<directory-name>/
For example, to see the generated manifests to deploy the AMQ cluster intended for the datacenter DC0
with the mirror configuration defined using BrokerProperties
, exec:
oc kustomize ./overlays/dc0/
- AMQ cluster in DC0 mirrors to AMQ cluster in DC1.
- AMQ cluster in DC1 does not mirror anything to AMQ cluster in DC0.
- AMQ cluster in DC0 mirrors to AMQ cluster in DC1: DC0 mirroring is configured using the customized init-container image
Exec deploy-one-way-mirror-scenario-initcontainer.sh
to deploy everything.
- AMQ cluster in DC0 mirrors to AMQ cluster in DC1: DC0 mirroring is configured using the
brokerproperties
section in the CustomResource.
Exec deploy-one-way-mirror-scenario-brokerproperties.sh
to deploy everything.
- AMQ cluster in DC0 mirrors to AMQ cluster in DC1.
- AMQ cluster inh DC1 mirrors to AMQ cluster in DC0.
- Both AMQ clusters mirror to each other. Mirroring is configured using the customized init-container image.
Exec deploy-dual-mirror-scenario-initcontainer.sh
to deploy everything.
- Both AMQ clusters mirror to each other. Mirroring is configured using the
brokerproperties
section in the CR.
Exec deploy-dual-mirror-scenario-brokerproperties.sh
to deploy everything.
The custom init-container image is provided to configure the mirroring and allowing the broker-pairing in every AMQ cluster:
Broker-0 in DC1 will mirror to Broker-0 in DC2, broker-1 in DC1 will mirror to Broker-1 in DC2, and so on ... Therefore, the cluster size must be the same in both AMQ clusters.
Deploy Red Hat AMQ operator before running the scripts. Cluster-wide mode is recommended.