Updating your environment variables script (Upgrading from Version 5.3 to Version 5.4)

The commands for upgrading IBM® Software Hub use variables with the format ${VARIABLE_NAME}. Ensure that your environment variables script includes the correct information for the instance of IBM Software Hub that you want to upgrade.

Upgrade phase
  • You are not here. Updating your client workstation
  • You are here icon. Collecting required information
  • You are not here. Preparing to run an upgrade in a restricted network
  • You are not here. Preparing to run an upgrade from a private container registry
  • You are not here. Upgrading prerequisite software
  • You are not here. Upgrading shared cluster components
  • You are not here. Preparing to upgrade an instance
  • You are not here. Upgrading an instance
  • You are not here. Setting up IBM Software Hub
Who needs to complete this task?

Operations team The IBM Software Hub operations team should work with the cluster administrator to compile information about the cluster where IBM Software Hub is installed.

When do you need to complete this task?

Repeat as needed If you have multiple instances of IBM Software Hub on the cluster and you maintain separate scripts for each instance, update the script for each instance that you plan to upgrade.

Editing your environment variables file

  1. Open your existing environment variable shell script in a text editor.
  2. Locate the VERSION entry and specify the version of IBM Software Hub that you want to upgrade to. For example:
    export VERSION=5.4.0
  3. Set the OLM_UTILS_IMAGE environment variable:
    export OLM_UTILS_IMAGE=icr.io/cpopen/cpd/olm-utils-v4:${VERSION}
    Tip: If your cluster pulls images from a private container registry, you will update this environment variable after the image is pushed to the private container registry.
  4. If needed, update the COMPONENTS variable.

    Confirm that the list of service components is accurate.

  5. If you mirror images to a private container registry, and you need to mirror models or optional images that are not included with the service images, add or update the IMAGE_GROUPS environment variable to your script:
    export IMAGE_GROUPS=<comma-separated-list-of-group-names>
    A comma-separated list of models or optional images to mirror to your private container registry.

    If a component has models or optional images that are not mirrored by default, you must explicitly mirror those images to your private container registry.

    For example, if you plan to install watsonx.ai™, you must choose which models to mirror to your private container registry.

    For more information, see Determining which models and images to mirror to your private container registry (Upgrading from Version 5.3 to Version 5.4).

  6. Add a new section called Image pull configuration to your script and add the following environment variables:
    1. Add the IMAGE_PULL_SECRET environment variable and set it to the name that you want to use for the namespace-scoped secret that will contain the base64 encoded credentials for pulling images.

      Specify a Kubernetes compliant name that contains only lowercase alphanumeric characters, hyphens (-) or periods (.). The name must start and end with an alphanumeric character.

      export IMAGE_PULL_SECRET=<pull-secret-name>
    2. Add the IMAGE_PULL_CREDENTIALS and IMAGE_PULL_PREFIX environment variables based on where your cluster pulls images from:
      IBM Entitled Registry
      If your cluster pulls images from the IBM Entitled Registry, add the following environment variables to your script. Do not modify the export commands:
      export IMAGE_PULL_CREDENTIALS=$(echo -n "cp:$IBM_ENTITLEMENT_KEY" | base64 -w 0)
      export IMAGE_PULL_PREFIX=icr.io
      Private container registry
      If your cluster pulls images from a private container registry, add the following environment variables to your script. Do not modify the export commands:
      export IMAGE_PULL_CREDENTIALS=$(echo -n "$PRIVATE_REGISTRY_PULL_USER:$PRIVATE_REGISTRY_PULL_PASSWORD" | base64 -w 0)
      export IMAGE_PULL_PREFIX=${PRIVATE_REGISTRY_LOCATION}
  7. Save your changes.
  8. Confirm that the script does not contain any errors. For example, if you named the script cpd_vars.sh, run:
    bash ./cpd_vars.sh

Sourcing the environment variables

You must run the script from a bash prompt before you run the installation and upgrade commands. The script exports the environment variables to your command-line session.

Important: You must re-run the script each time you open a new bash prompt.
  1. Change to the directory where you saved the script.
  2. Source the environment variables. For example, if you named the script cpd_vars.sh, run:
    source ./cpd_vars.sh

What to do next

Now that you've updated the environment variables in your script, you're ready to complete Preparing to run IBM Software Hub upgrade commands in a restricted network (Upgrading from Version 5.3 to Version 5.4).