@@ -112,7 +112,7 @@ oc label secret/mycluster-amq-broker-all-secret app.kubernetes.io/managed-by=Hel
112112`oc extract secret/mycluster-amq-broker-all-secret --keys=client.ts`
113113
114114. Extract AMQ Endpoint
115-
115+ +
116116`export AMQ_ENDPOINT=$(oc get route mycluster-amq-broker-all-0-svc-rte --no-headers -o custom-columns=:.spec.host)`
117117
118118. Launch Artemis Producer Command
@@ -127,12 +127,13 @@ Producer ActiveMQQueue[TEST], thread=0 Started to calculate elapsed time ...
127127Producer ActiveMQQueue[TEST], thread=0 Produced: 10 messages
128128Producer ActiveMQQueue[TEST], thread=0 Elapsed time in second : 0 s
129129Producer ActiveMQQueue[TEST], thread=0 Elapsed time in milli second : 79 milli seconds
130+
130131-------
131132
132133. Launch Artemis Consumer Command
133134+
134135[source,bash]
135- -------
136+ -----
136137./artemis consumer --user amq --password amq --message-count 10 --url="tcp://${AMQ_ENDPOINT}:443?sslEnabled=true;trustStorePath=./client.ts;trustStorePassword=password"
137138
138139Connection brokerURL = tcp://mycluster-amq-broker-all-0-svc-rte-dxc.apps-crc.testing:443?sslEnabled=true;trustStorePath=./client.ts;trustStorePassword=password
@@ -143,12 +144,83 @@ Consumer ActiveMQQueue[TEST], thread=0 Elapsed time in second : 0 s
143144Consumer ActiveMQQueue[TEST], thread=0 Elapsed time in milli second : 17 milli seconds
144145Consumer ActiveMQQueue[TEST], thread=0 Consumed: 10 messages
145146Consumer ActiveMQQueue[TEST], thread=0 Consumer thread finished
146- -------
147+ -----
148+
149+ ## Bridge Scenario [WIP]
150+
151+ . Create two OpenShift project.
152+ +
153+ [source,bash]
154+ -----
155+ oc new-project brk1
156+ oc new-project brk2
157+ -----
158+
159+ . Install AMQ Broker Operator for both the projects.
160+
161+ . Create a NetworkPolicy to allow connection from brk1 to brk2.
162+ +
163+ [source,yaml]
164+ -----
165+ apiVersion: networking.k8s.io/v1
166+ kind: NetworkPolicy
167+ metadata:
168+ name: mycluster1-amq-broker-all
169+ labels:
170+ app.kubernetes.io/name: amq-broker
171+ app.kubernetes.io/instance: mycluster2
172+ spec:
173+ podSelector:
174+ matchLabels:
175+ app.kubernetes.io/name: amq-broker
176+ app.kubernetes.io/instance: mycluster2
177+ ingress:
178+ - from:
179+ - namespaceSelector:
180+ matchLabels:
181+ app.kubernetes.io/instance: mycluster
182+ ports:
183+ - port: 61617
184+ protocol: TCP
185+ -----
186+
187+ . Label brk1 namespace with `app.kubernetes.io/instance: mycluster`
188+ +
189+ `oc label namespace brk1 app.kubernetes.io/instance=mycluster`
190+
191+ . Install AMQ Broker Helm Chart on brk2
192+ +
193+ `helm upgrade --install mycluster2 amq-broker -n brk2`
194+
195+ . In case of SSL Connector to brk2, create a secret on brk1 to able to connect to brk2.
196+ +
197+ [source,bash]
198+ -----
199+ mkdir brk2-pki
200+
201+ oc extract secret/mycluster2-amq-broker-all-secret --to=brk2-pki -n brk2
202+
203+ oc create secret generic mycluster2-amq-broker-all-brk2-secret --from-file=brk2-pki/ -n brk1
204+ -----
205+
206+ . Install AMQ Broker Helm Chart on brk1
207+ +
208+ `helm upgrade --install mycluster amq-broker -n brk1`
209+
210+ . Launch Helm Test to test the bridge connection
211+ +
212+ `helm test mycluster1 -n brk1`
147213
148214## Uninstall it
149215
150216`helm uninstall mycluster --no-hooks`
151217
218+ ## Failed Status
219+
220+ In case of failed installation due to missing role rights, AMQ Broker operator, tests failed or others, please make sure to clean up all the pending resources.
221+
222+ `oc delete all -lapp.kubernetes.io/name=amq-broker`
223+
152224## Progress
153225
154226.Progress
0 commit comments