Chapter 4. Upgrading AMQ Broker on OpenShift Container Platform
To upgrade AMQ Broker on OpenShift Container Platform, you must have an existing broker deployment, similar to those described in Deploying a basic broker and Tutorials.
4.1. Upgrading non-persistent broker deployments Copy linkLink copied to clipboard!
The procedure in this section shows you how upgrade a non-persistent broker deployment. In the previous version of AMQ Broker, the non-persistent broker templates in the OpenShift Container Platform service catalog were labeled as follows:
- Red Hat AMQ Broker 7.2 (Ephemeral, no SSL)
- Red Hat AMQ Broker 7.2 (Ephemeral, with SSL)
- Red Hat AMQ Broker 7.2 Custom Config (Ephemeral, no SSL)
Prerequisites
-
To upgrade your existing non-persistent broker deployment, you must have a new image version available in the global
openshiftproject, or in a specific local project namespace. For more information, see Installing the AMQ Broker image streams and application templates.
Procedure
- Navigate to the OpenShift Container Platform web console and log in.
- Click the project in which you want to upgrade a non-persistent broker deployment.
In the Deployment Config section of your broker deployment, click Edit.
The Edit Deployment Config page opens.
-
In the Deployment Strategy section, in the Strategy Type drop-down list, select
Rolling. In the Images section, specify an
Image Stream Tagas follows.- In the Namespace drop-down list, select the project namespace in which you installed your AMQ Broker 7.3 image.
-
In the Image Stream drop-down list, select the AMQ Broker 7.3 on OpenShift Container Platform image stream,
amq-broker-73-openshift. In the Tag drop-down list, select a tag for the image to which you want to upgrade. To specify the latest available version, select
latest. Otherwise, select a specific image version.NoteIn AMQ Broker 7.3, image tags follow the naming convention
7.3-1,7.3-2, and so on. These numbers increment by1for each new version of the image added to the Red Hat image registry. In the Tag drop-down list, if you specify a tag of7.3, this tag is known as afloating tag. When you specify a floating tag, OpenShift Container Platform automatically identifies the most recent image available in your specified project namespace (that is, the 7.3 image with the highest final number) and uses this image to upgrade your broker deployment.
Click Save.
Based on your selection of a rolling upgrade strategy, if you select an image that is newer than the one currently installed, OpenShift Container Platform automatically upgrades your broker deployment. To do this, OpenShift stops the existing pod and then starts a new pod that uses the new broker container image.
4.2. Upgrading persistent broker deployments Copy linkLink copied to clipboard!
The procedure in this section shows you how to upgrade a persistent broker deployment. In the previous version of AMQ Broker, the persistent broker templates in the OpenShift Container Platform service catalog were labeled as follows:
- Red Hat AMQ Broker 7.2 (Persistence, clustered, no SSL)
- Red Hat AMQ Broker 7.2 (Persistence, clustered, with SSL)
- Red Hat AMQ Broker 7.2 (Persistence, with SSL)
Prerequisites
- To upgrade an existing persistent broker deployment, you must first complete the steps described in Red Hat Container Registry Authentication.
Procedure
- Navigate to the OpenShift Container Platform web console and log in.
- Click the project in which you want to upgrade a persistent broker deployment.
In the Stateful Set section of your broker deployment, click Edit YAML.
The Edit Stateful Set page opens with your YAML file in an editable mode.
Edit the
imageattribute to reference an AMQ Broker 7.3 image tag in the Red Hat image registry, as shown below:... image: 'registry.redhat.io/amq-broker-7/amq-broker-73-openshift:7.3' ...
... image: 'registry.redhat.io/amq-broker-7/amq-broker-73-openshift:7.3' ...Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteIf you have a scaledown controller configured in your project namespace, the YAML file for your StatefulSet contains an embedded template representing the scaledown controller. This template is labeled
statefulsets.kubernetes.io/drainer-pod-template. The scaledown controller template also contains animageattribute that you must update to reference the new broker image version. Edit this additionalimageattribute exactly as shown in the preceding step.To ensure that you have at least one running pod, set the
replicasattribute to a value of1or greater, as shown below.Expand If replicas is currently set to… Do this… 0Set
replicasto a value of1or greater.1or greater-
Set replicas to
0. - Click Save.
-
Set
replicasback to the original value.
-
Set replicas to
Click Save.
If you specified an image that is newer than the one currently installed, OpenShift Container Platform automatically initiates an upgrade by stopping the existing pod and then starting a new one for the upgraded broker deployment.