Upgrading and rolling back Cloudera Surveyor for Apache Kafka

Learn about upgrading and rolling back Cloudera Surveyor. Upgrading and rolling back Cloudera Surveyor is done with helm commands. Use helm upgrade to upgrade to a new release, and helm rollback to roll back to a previous release. Both operations are seamless and require no downtime, ensuring uninterrupted service.

Upgrading Cloudera Surveyor

You upgrade Cloudera Surveyor using helm upgrade. The upgrade is a two-step process. First, you upgrade the Cloudera Surveyor server, afterward, you upgrade the Cloudera Surveyor UI. You also use helm history and take note of revisions before and during the upgrade.

During the upgrade, when the server is upgraded but the UI is not, you might encounter minor UI issues. For example, the configuration of some topics might fail to load. This is temporary, all data is loaded correctly once the upgrade finishes.
  1. List available Helm revisions and take note of the currently deployed revision.
    helm history cloudera-surveyor \
      --namespace [****SURVEYOR NAMESPACE***]

    Taking note of the revision now makes future rollbacks easier, as it can be difficult to identify the correct revision later. The rollback steps refer to this revision as [***ORIGINAL REVISION***].

  2. Upgrade the Cloudera Surveyor server.
    helm upgrade cloudera-surveyor \
      --namespace [****SURVEYOR NAMESPACE****] \
      --atomic \
      --reset-then-reuse-values \
      --set=image.tag=0.1.0.1.5.0-b123 \
      --set=image.uiTag=0.1.0.1.4.0-b199 \
      oci://container.repository.cloudera.com/cloudera-helm/csm-operator/surveyor \
      --version 1.5.0-b123
    • The string cloudera-surveyor is the Helm release name of the chart installation. This is an arbitrary, user-defined name. Replace this string if you used a different name when you installed Cloudera Surveyor.

    • The --atomic option makes the command wait for the upgrade to complete or roll back if the upgrade fails.

    • The --reset-then-reuse-values option is used to ensure that previously set configurations are preserved. This option is required because the upgrade command also uses --set options.

    • The --set options specify the exact image tags to use for the server and UI. In this step, only the server image tag (image.tag=0.1.0.1.5.0-b123), is updated. The UI image tag (image.uiTag=0.1.0.1.4.0-b199) remains unchanged. This ensures that only the server is upgraded.

  3. Take note of the Helm revision.

    The revision is printed in the output of the helm upgrade command. The revision is needed in case you want to roll back the upgrade. The rollback steps refer to this revision as [***SERVER UPGRADE REVISION***].

  4. Upgrade the Cloudera Surveyor UI.
    helm upgrade cloudera-surveyor \
      --namespace [****SURVEYOR NAMESPACE****] \
      --atomic \
      --reset-then-reuse-values \
      --set=image.tag=0.1.0.1.5.0-b123 \
      --set=image.uiTag=0.1.0.1.5.0-b123 \
      oci://container.repository.cloudera.com/cloudera-helm/csm-operator/surveyor \
      --version 1.5.0-b123
    In this step, both the server (image.tag=0.1.0.1.5.0-b123) and UI (image.uiTag=0.1.0.1.5.0-b123) image tags are updated, completing the upgrade for the entire application.
  5. Verify that the upgrade is successful.

    To do this, check that the Cloudera Surveyor Deployment is in a healthy state.

    kubectl get deployments cloudera-surveyor \
      --namespace [****SURVEYOR NAMESPACE****]

    In addition, you can check the image version that the Pods are using.

    kubectl get pods \
      --namespace=kafka \
      --output custom-columns="NAME:.metadata.name,IMAGE:.spec.containers[*].image"

    On successful upgrade, the Pods will use the new version of the Cloudera Surveyor image.

    NAME                      IMAGE
    cloudera-surveyor-558595d999-dt2dj docker-private.infra.cloudera.com/cloudera/surveyor:0.1.0.1.5.0-b123

Reload the browser page where you access the UI to ensure that the latest version of the UI is displayed. The browser may continue to show a previous version of the UI until you refresh.

Rolling back Cloudera Surveyor

You roll back Cloudera Surveyor using helm rollback. A rollback involves listing and identifying the upgrade revisions that you want to roll back to. Afterward, you complete a two-step rollback process where you roll back the Cloudera Surveyor UI and the Cloudera Surveyor server.

  • During the rollback, when the server is still upgraded but the UI is already rolled back, you might encounter minor UI issues. For example, the configuration of some topics might fail to load. This is temporary, all data is loaded correctly once the upgrade finishes.

  • If you took note of your revisions during the upgrade process, skip steps 1 and 2.

  1. List available Helm revisions.
    helm history cloudera-surveyor \
      --namespace [****SURVEYOR NAMESPACE***]
  2. Identify the revision that upgraded the Cloudera Surveyor server as well as the original revision you upgraded from.

    For example, if you just completed an upgrade, you need the previous two revisions. These are revisions 1 and 2 in the following example.

    REVISION  #...  STATUS      CHART                 DESCRIPTION
    1         #...  superseded  surveyor-1.4.0-b199   Install complete
    2         #...  superseded  surveyor-1.5.0-b123   Upgrade complete
    3         #...  deployed    surveyor-1.5.0-b123   Upgrade complete

    You can also identify revisions by looking at the chart version.

    • The revision that upgraded the server is the first revision that has the latest chart version. This is revision 2 in the example.

    • The original revision you upgraded from is the last revision that has the old chart version. This is revision 1 in the example.

  3. Roll back the Cloudera Surveyor UI.
    helm rollback cloudera-surveyor [***SERVER UPGRADE REVISION***] \
      --namespace [***SURVEYOR NAMESPACE***]

    Replace [***SERVER UPGRADE REVISION***] with the revision that upgraded the Cloudera Surveyor server.

  4. Roll back the Cloudera Surveyor server.
    helm rollback cloudera-surveyor [***ORIGINAL REVISION***] \
      --namespace [***SURVEYOR NAMESPACE***]

    Replace [***ORIGINAL REVISION***] with the revision that you originally upgraded from.

  5. Verify that the rollback is successful.

    To do this, check that the Cloudera Surveyor Deployment is in a healthy state.

    kubectl get deployments cloudera-surveyor \
      --namespace [****SURVEYOR NAMESPACE****]

    In addition, you can check the image version that the Cloudera Surveyor Pods are using.

    kubectl get pods \
      --namespace [****SURVEYOR NAMESPACE****] \
      --output custom-columns="NAME:.metadata.name,IMAGE:.spec.containers[*].image"

    On successful upgrade, the Pods will use the old version of the Cloudera Surveyor image.

    NAME                      IMAGE
    cloudera-surveyor-558595d999-dt2dj docker-private.infra.cloudera.com/cloudera/surveyor:0.1.0.1.4.0-b199

Reload the browser page where you access the UI to ensure that the latest version of the UI is displayed. The browser may continue to show a previous version of the UI until you refresh.