Upgrading Components

To upgrade the installed components to the latest versions, complete the following steps:

  1. Check the BSS database consistency.

    1. Save the following text as a script file with name bss_db_check.sh to a directory with access to your Kubernetes cluster.

      Script file text.Closed
      																#!/bin/bash
      
      set -euo pipefail
      NAMESPACE="${1}"
      
      status=$(kubectl get pod -l app=bss,stellart=atm -o jsonpath='{.items[0].status.containerStatuses[?(@.name=="atm")].ready}' -n $NAMESPACE 2>/dev/null)
      
      if [[ "$status" == "true" ]]; then
        POD=$(kubectl get pod -l app=bss,stellart=atm -o jsonpath="{.items[0].metadata.name}" -n $NAMESPACE)
        kubectl exec $POD -c atm -n $NAMESPACE -- /bin/bash run_verifydb.sh
        echo "No errors!"
      else
        echo "Pod bss-atm does not exist or is not running."
        exit 0
      fi
      
      echo "Pre-check finished"
      
    2. Run the downloaded script passing your namespace as a parameter:

      bss_db_check.sh <CloudBlue_Namespace>
    3. If the script output is similar to the following, please analyze the log and resolve the issues before proceeding with the upgrade:

      BSS database structure verification failed. See details above.

      If the output contained no errors, or you have fixed all the errors, proceed with the next steps.

  2. Prepare config.yaml of your CloudBlue Commerce installation.

    Warning: Whenever BSS, OSS or Branding UI Cluster components are upgraded, they must be upgraded together and the exact BSS version must be specified in the config.yaml file.
    To get the latest available version of the BSS component, use the following commands:
    helm repo update
    helm search repo a8n/bss

  3. For the components that you are going to upgrade, learn which settings these components have. To do this, please refer to the guides of these components. If a new setting is added in a new version of a component and that setting does not have a default value or its default value is not suitable, specify this setting and its value in your config.yaml file.

  4. Create a deployment container and start its interactive shell. To learn how to do this, see Preparing a Deployment Container.

    Tip: If the container is already running, you need to update the config.yaml file in the directory specified as during container deployment.

  5. In the interactive shell of the container, perform the upgrade by using one of these methods:

    • If you need to upgrade all installed components to the latest versions, execute this command:

      setup-product.sh -n CBC_NAMESPACE -f /config/config.yaml
    • If you need to upgrade specific components to the latest versions, execute this command:

      setup-product.sh -n CBC_NAMESPACE -f /config/config.yaml -c a8n-db -c COMPONENT_NAME1 -c COMPONENT_NAME2 ...

      For example, to upgrade only core components, execute this command:

      setup-product.sh -n CBC_NAMESPACE -f /config/config.yaml -c a8n-db -c bss -c oss -c branding-ui-cluster

As a result, the components will be upgraded to the latest versions.

Important: CloudBlue Commerce is restarted when core components, such as Operations Support System (oss), Billing Support System (bss), or UI and Branding (branding-ui-cluster), are upgraded.

Notes:

1. You can check the status of components with the helm -n CBC_NAMESPACE list --all command.

2. A component whose version is specified in the version setting is not upgraded automatically. To upgrade that component, you must either remove that setting or specify the target version in that setting and run the appropriate command in step 4. We recommend that you not use the version setting and upgrade components to the latest versions. You can use the version setting only if you need a specific version of a component on your installation.