|
1 | 1 | # AMQ Broker Operator Helm Enhancement |
2 | 2 |
|
3 | 3 | The aim is to automate the creation of the AMQ Broker Custom Resources and at the same time enhance the broker.xml with a configuration that is not yet available in the operator. |
4 | | -The helm chart keeps in sync the custom resources and the broker.xml. |
5 | | - |
6 | | -. Install Operator to specific namespace on the cluster |
7 | | -.. This can be provided by the cluster-admin as namespaced installation and should give the right role to manage the AMQ Broker CRD. |
8 | | -+ |
9 | | -NOTE: You cannot create more than one broker deployment in a given OpenShift project by deploying multiple broker Custom Resource (CR) instances. However, when you have created a broker deployment in a project, you can deploy multiple CR instances for addresses. https://access.redhat.com/documentation/en-us/red_hat_amq/7.7/html-single/deploying_amq_broker_on_openshift/index#con-br-operator-deployment-notes_broker-ocp[Reference]. |
10 | | -. [pre-install hook] Restore AMQ Broker Operator |
11 | | -. [install/upgrade] Create kind: ActiveMQArtemis |
12 | | -. [install/upgrade] Deploy custom broker xml. |
13 | | -. [post-install hook] Shutdown the AMQ Broker Operator |
14 | | -. [post-install hook] Adopt the AMQ Broker resource to Helm: |
15 | | -+ |
16 | | -[source,yaml] |
17 | | ------- |
18 | | -annotations: |
19 | | - meta.helm.sh/release-name: release-name |
20 | | - meta.helm.sh/release-namespace: namespace-name |
21 | | -labels: |
22 | | - app.kubernetes.io/managed-by: Helm |
23 | | ------- |
24 | | -. [post install] Adjust AMQ Broker Stateful set to use the custom broker xml. Possible 3 ways: |
25 | | -.. Set BROKER_XML environment variable with your custom broker.xml. |
26 | | -.. Mount ConfigMap resources hosting any custom configuration file. |
27 | | -.. Use S2I procedure with more customization requirements. footnote:[ActiveMQArtemis allows you to override the amq broker images] |
28 | | -. [test] Verify the installation is correct. |
29 | | - |
30 | | -NOTE: A pre-hook install image requires oc client `quay.io/openshift/origin-cli:4.6` and running with edit role on the specific namespace. |
31 | | - |
32 | | -## Important |
33 | | - |
34 | | -* In AMQ Broker 7.7, if you want to configure any of the following items, you must add the appropriate configuration to the main CR instance before deploying the CR for the first time. |
35 | | -** Address settings |
36 | | -** The size of the Persistent Volume Claim (PVC) required by each broker in a deployment for persistent storage |
37 | | -** Limits and requests for memory and CPU for each broker in a deployment |
38 | | -* During an active scaling event, any further changes that you apply are queued by the Operator and executed only when scaling is complete. For example, suppose that you scale the size of your deployment down from four brokers to one. Then, while scaledown is taking place, you also change the values of the broker administrator user name and password. In this case, the Operator queues the user name and password changes until the deployment is running with one active broker. |
39 | | -* All CR changes – apart from changing the size of your deployment, or changing the value of the expose attribute for acceptors, connectors, or the console – cause existing brokers to be restarted. If you have multiple brokers in your deployment, only one broker restarts at a time. |
40 | | -
|
41 | | -* To configure address and queue settings for broker deployments on OpenShift Container Platform, you add configuration to an addressSettings section of the main Custom Resource (CR) instance for the broker deployment. This contrasts with standalone deployments on Linux or Windows, for which you add configuration to an address-settings element in the broker.xml configuration file. |
42 | | -* The format used for the names of configuration items differs between OpenShift Container Platform and standalone broker deployments. For OpenShift Container Platform deployments, configuration item names are in camel case, for example, defaultQueueRoutingType. By contrast, configuration item names for standalone deployments are in lower case and use a dash (-) separator, for example, default-queue-routing-type. |
43 | | -
|
44 | | -The following table shows some further examples of this naming difference. |
45 | | - |
46 | | -.Naming difference |
47 | | -[cols="5,5",options=header] |
48 | | -|=== |
49 | | - |
50 | | -| Configuration item for standalone broker deployment |
51 | | -| Configuration item for OpenShift broker deployment |
52 | | - |
53 | | -| address-full-policy |
54 | | -| addressFullPolicy |
55 | | - |
56 | | -| auto-create-queues |
57 | | -| autoCreateQueues |
58 | | - |
59 | | -| default-queue-routing-type |
60 | | -| defaultQueueRoutingType |
61 | | - |
62 | | -| last-value-queue |
63 | | -| lastValueQueue |
64 | | - |
65 | | -|=== |
66 | | - |
67 | | -* Addresses are created by the AMQ Broker Operator using Artemis Jolokia and MBean. |
68 | | -
|
| 4 | +The helm chart keeps in sync the custom resources and the custom broker.xml. |
69 | 5 |
|
70 | 6 | ## Prerequisites |
71 | 7 |
|
@@ -101,26 +37,75 @@ The following table shows some further examples of this naming difference. |
101 | 37 | | DONE |
102 | 38 |
|
103 | 39 | | SSL Selfsigned Implementation |
104 | | -| TODO |
| 40 | +| DONE |
105 | 41 |
|
106 | | -| Make sure that the operator creates the Addresses and probably we are able to reuse it. `<address-setting match="None">` |
107 | | -| TODO |
| 42 | +| Test with External Client Implementation |
| 43 | +| DONE |
| 44 | + |
| 45 | +| Keystore and Truststore Password |
| 46 | +| DONE |
| 47 | + |
| 48 | +| SSL Custom CA Implementation, NOTE: if you create the certificate early it should work |
| 49 | +| https://github.com/openlab-red/amq-broker-operator-helm/issues/2[#2] |
| 50 | + |
| 51 | +| User Management |
| 52 | +| https://github.com/openlab-red/amq-broker-operator-helm/issues/3[#3] |
108 | 53 |
|
109 | 54 | | Bridge and Diverts Implementation |
110 | | -| TODO |
| 55 | +| https://github.com/openlab-red/amq-broker-operator-helm/issues/1[#1] |
111 | 56 |
|
112 | 57 | | Network Policy |
113 | | -| TODO |
114 | | - |
115 | | -| Test with External Client Implementation |
116 | | -| TODO |
| 58 | +| https://github.com/openlab-red/amq-broker-operator-helm/issues/4[#4] |
117 | 59 |
|
118 | | -| SSL Custom CA Implementation |
| 60 | +| Make sure that the operator creates all the Addresses |
119 | 61 | | TODO |
120 | 62 |
|
121 | 63 | | High Availability and How scale down controller actives without the operator. |
122 | 64 | | TODO |
123 | 65 |
|
124 | 66 | | Migrate one standalone broker |
125 | 67 | | TODO |
126 | | -|=== |
| 68 | +|=== |
| 69 | + |
| 70 | +## Pseudo Code |
| 71 | + |
| 72 | +. Install Operator to specific namespace on the cluster |
| 73 | +.. This can be provided by the cluster-admin as namespaced installation and should give the right role to manage the AMQ Broker CRD. |
| 74 | ++ |
| 75 | +NOTE: You cannot create more than one broker deployment in a given OpenShift project by deploying multiple broker Custom Resource (CR) instances. However, when you have created a broker deployment in a project, you can deploy multiple CR instances for addresses. https://access.redhat.com/documentation/en-us/red_hat_amq/7.7/html-single/deploying_amq_broker_on_openshift/index#con-br-operator-deployment-notes_broker-ocp[Reference]. |
| 76 | +. [pre-install hook] Restore AMQ Broker Operator |
| 77 | +. [install/upgrade] Create kind: ActiveMQArtemis and ActiveMQArtemisAddress |
| 78 | +. [install/upgrade] Create Config Map with custom broker xml. |
| 79 | +. [post-install hook] Shutdown the AMQ Broker Operator |
| 80 | +. [post-install hook] Adoptthe AMQ Broker resource to Helm: |
| 81 | ++ |
| 82 | +[source,yaml] |
| 83 | +------ |
| 84 | +annotations: |
| 85 | + meta.helm.sh/release-name: release-name |
| 86 | + meta.helm.sh/release-namespace: namespace-name |
| 87 | +labels: |
| 88 | + app.kubernetes.io/managed-by: Helm |
| 89 | +------ |
| 90 | +. [post install] Adjust AMQ Broker Stateful set to use the custom broker xml. |
| 91 | +.. Set BROKER_XML environment variable with your custom broker.xml. |
| 92 | +. [test] Verify the installation is correct. |
| 93 | + |
| 94 | +NOTE: A *-hook install image requires oc client `quay.io/openshift/origin-cli:4.6` and running with edit role on the specific namespace. |
| 95 | +
|
| 96 | +## Important |
| 97 | +
|
| 98 | +* In AMQ Broker 7.7, if you want to configure any of the following items, you must add the appropriate configuration to the main CR instance before deploying the CR for the first time. |
| 99 | +** Address settings |
| 100 | +** The size of the Persistent Volume Claim (PVC) required by each broker in a deployment for persistent storage |
| 101 | +** Limits and requests for memory and CPU for each broker in a deployment |
| 102 | +* During an active scaling event, any further changes that you apply are queued by the Operator and executed only when scaling is complete. For example, suppose that you scale the size of your deployment down from four brokers to one. Then, while scaledown is taking place, you also change the values of the broker administrator user name and password. In this case, the Operator queues the user name and password changes until the deployment is running with one active broker. |
| 103 | +* All CR changes – apart from changing the size of your deployment, or changing the value of the expose attribute for acceptors, connectors, or the console – cause existing brokers to be restarted. If you have multiple brokers in your deployment, only one broker restarts at a time. |
| 104 | +* To configure address and queue settings for broker deployments on OpenShift Container Platform, you add configuration to an addressSettings section of the main Custom Resource (CR) instance for the broker deployment. This contrasts with standalone deployments on Linux or Windows, for which you add configuration to an address-settings element in the broker.xml configuration file. |
| 105 | +* The format used for the names of configuration items differs between OpenShift Container Platform and standalone broker deployments. For OpenShift Container Platform deployments, configuration item names are in camel case, for example, defaultQueueRoutingType. By contrast, configuration item names for standalone deployments are in lower case and use a dash (-) separator, for example, default-queue-routing-type. |
| 106 | +* Addresses are created by the AMQ Broker Operator using Artemis Jolokia and MBean. |
| 107 | + |
| 108 | +## Reference |
| 109 | + |
| 110 | +* https://access.redhat.com/documentation/en-us/red_hat_amq/7.7/html-single/deploying_amq_broker_on_openshift/index#con-br-configuring-broker-certificate-for-hostname-verification_broker-ocp |
| 111 | +
|
0 commit comments