検索

このコンテンツは選択した言語では利用できません。

Chapter 4. Upgrading AMQ Broker on OpenShift Container Platform

download PDF

The procedures in this section show how to upgrade Operator- and templates-based broker deployments on OpenShift Container Platform.

Important

To upgrade an existing AMQ Broker deployment on OpenShift Container Platform 3.11 to run on OpenShift Container Platform 4.1, you must first upgrade your OpenShift Container Platform installation, before performing a clean installation of AMQ Broker that matches your existing deployment. To perform a clean AMQ Broker installation, use one of these methods:

4.1. Upgrading an Operator-based broker deployment

The following procedures show you how to upgrade:

  • The broker container image for an Operator-based broker deployment
  • The AMQ Broker Operator version in your OpenShift project

4.1.1. Upgrading the broker container image

The following procedure shows how to upgrade the broker container image for a broker deployment based on the AMQ Broker Operator.

Note

The procedure assumes that you used version 0.9.0 or greater of the AMQ Broker Operator to create your broker deployment. The name of the main broker Custom Resource (CR) instance included with these versions of the Operator is broker_v2alpha1_activemqartemis_cr.yaml. You can also use instructions similar to those below to upgrade the broker container image for a deployment based on version 0.6.3 or earlier of the Operator. For those Operator versions, the name of the included main broker CR instance is broker_v1alpha1_activemqartemis_cr.yaml.

Prerequisites

Procedure

  1. In the deploy/crs directory of the Operator archive that you downloaded and extracted during your initial installation, open the broker_v2alpha1_activemqartemis_cr.yaml Custom Resource (CR).
  2. Edit the image element to specify the latest AMQ Broker 7.5 container image, as shown below.

    image: registry.redhat.io/amq7/amq-broker:7.5
  3. Apply the CR change.

    $ oc apply -f deploy/crs/broker_v2alpha1_activemqartemis_cr.yaml

    When you apply the CR change, each broker Pod in your deployment shuts down and then restarts using the new broker container image. If you have multiple brokers in your deployment, only one broker Pod shuts down and restarts at a time.

4.1.2. Upgrading the Operator

The following procedure shows how to upgrade the AMQ Broker Operator version in your OpenShift project.

Important

You cannot directly upgrade an Operator installation based on version 0.6.3 or earlier to use version 0.9.0 or greater because the Custom Resource Definitions (CRDs) used by versions 0.6.3 or earlier are not compatible with versions 0.9.0 or later. In this case, you must perform a new installation of the Operator before using it to recreate your broker deployments. For more information, see Installing the Broker Operator.

Prerequisites

Procedure

  1. Log in to OpenShift Container Platform as a cluster administrator.

    $ oc login -u system:admin
  2. Log in to the project in which you want to upgrade the Operator.

    $ oc project <project_name>
  3. In the deploy directory of the Operator archive that you downloaded and extracted during your original installation, open the operator.yaml file.
  4. Update the spec.containers.image attribute to specify the full path to the latest Operator image for AMQ Broker 7.5 in the Red Hat Container Registry.

    spec:
        template:
            spec:
                containers:
                    image: registry.redhat.io/amq7/amq-broker-rhel7-operator:0.9
  5. When you have updated the spec.containers.image attribute, apply the changes.

    $ oc apply -f deploy/operator.yaml

    OpenShift updates your project to use the latest Operator version. The upgrade has no effect on your running broker Pods.

4.2. Upgrading templates-based broker deployments

The following procedures show how to upgrade an existing broker deployment that is based on application templates.

4.2.1. Upgrading non-persistent broker deployments

This procedure shows you how to upgrade a non-persistent broker deployment. The non-persistent broker templates in the OpenShift Container Platform service catalog have labels that resemble the following:

  • Red Hat AMQ Broker 7.x (Ephemeral, no SSL)
  • Red Hat AMQ Broker 7.x (Ephemeral, with SSL)
  • Red Hat AMQ Broker 7.x (Custom Config, Ephemeral, no SSL)

Prerequisites

  • Starting in AMQ Broker 7.3, you use a new version of the Red Hat Container Registry to access container images. This new version of the registry requires you to become an authenticated user before you can access images and pull them into an OpenShift project. Before following the procedure in this section, you must first complete the steps described in Red Hat Container Registry Authentication.

Procedure

  1. Navigate to the OpenShift Container Platform web console and log in.
  2. Click the project in which you want to upgrade a non-persistent broker deployment.
  3. Select the Deployment Config (DC) corresponding to your broker deployment.

    1. In OpenShift Container Platform 4.1, click Workloads Deployment Configs.
    2. In OpenShift Container Platform 3.11, click Applications Deployments. Within your broker deployment, click the Configuration tab.
  4. From the Actions menu, click Edit Deployment Config (OpenShift Container Platform 4.1) or Edit YAML (OpenShift Container Platform 3.11).

    The YAML tab of the Deployment Config opens, with the .yaml file in an editable mode.

  5. Edit the image attribute to specify the latest AMQ Broker 7.5 container image, registry.redhat.io/amq7/amq-broker:7.5.
  6. Add the imagePullSecrets attribute to specify the image pull secret associated with the account used for authentication in the Red Hat Container Registry.

    Changes based on the previous two steps are shown in the example below:

    ...
    spec:
        containers:
            image: 'registry.redhat.io/amq7/amq-broker:7.5'
    ..
    imagePullSecrets:
      - name: {PULL-SECRET-NAME}
    Note

    In AMQ Broker, container image tags increment by 1 for each new version of the container image added to the Red Hat image registry, for example, 7.5-1, 7.5-2, and so on. If you specify a tag name without a final digit (7.5, for example), this tag is known as a floating tag. When you specify a floating tag, OpenShift Container Platform automatically identifies the most recent available image (that is, the image tag with the highest final number) and uses this image to upgrade your broker deployment.

  7. Click Save.

    If a newer broker image than the one currently installed is available in the Red Hat Container Registry, OpenShift Container Platform upgrades your broker deployment. To do this, OpenShift Container Platform stops the existing broker Pod and then starts a new Pod that uses the new image.

4.2.2. Upgrading persistent broker deployments

This procedure shows you how to upgrade a persistent broker deployment. The persistent broker templates in the OpenShift Container Platform service catalog have labels that resemble the following:

  • Red Hat AMQ Broker 7.x (Persistence, clustered, no SSL)
  • Red Hat AMQ Broker 7.x (Persistence, clustered, with SSL)
  • Red Hat AMQ Broker 7.x (Persistence, with SSL)

Prerequisites

  • Starting in AMQ Broker 7.3, you use a new version of the Red Hat Container Registry to access container images. This new version of the registry requires you to become an authenticated user before you can access images and pull them into an OpenShift project. Before following the procedure in this section, you must first complete the steps described in Red Hat Container Registry Authentication.

Procedure

  1. Navigate to the OpenShift Container Platform web console and log in.
  2. Click the project in which you want to upgrade a persistent broker deployment.
  3. Select the StatefulSet (SS) corresponding to your broker deployment.

    1. In OpenShift Container Platform 4.1, click Workloads Stateful Sets.
    2. In OpenShift Container Platform 3.11, click Applications Stateful Sets.
  4. From the Actions menu, click Edit Stateful Set (OpenShift Container Platform 4.1) or Edit YAML (OpenShift Container Platform 3.11).

    The YAML tab of the StatefulSet opens, with the .yaml file in an editable mode.

  5. To prepare your broker deployment for upgrade, scale the deployment down to zero brokers.

    1. If the replicas attribute is currently set to 1 or greater, set it to 0.
    2. Click Save.
  6. When all broker Pods have shut down, edit the Stateful Set .yaml file again. Edit the image attribute to specify the latest AMQ Broker 7.5 container image, registry.redhat.io/amq7/amq-broker:7.5.
  7. Add the imagePullSecrets attribute to specify the image pull secret associated with the account used for authentication in the Red Hat Container Registry.

    Changes based on the previous two steps are shown in the example below:

    ...
    spec:
        containers:
            image: 'registry.redhat.io/amq7/amq-broker:7.5'
    ..
    imagePullSecrets:
      - name: {PULL-SECRET-NAME}
  8. Set the replicas attribute back to the original value.
  9. Click Save.

    If a newer broker image than the one currently installed is available in the Red Hat Container Registry, OpenShift Container Platform upgrades your broker deployment. To do this, OpenShift Container Platform restarts the broker Pod.

Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.