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
-
Updating your client workstation
Collecting required information
Preparing to run an upgrade in a restricted network
Preparing to run an upgrade from a private container registry
Upgrading prerequisite software
Upgrading shared cluster components
Preparing to upgrade an instance
Upgrading an instance
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
- Open your existing environment variable shell script in a text editor.
- Locate the
VERSIONentry and specify the version of IBM Software Hub that you want to upgrade to. For example:export VERSION=5.4.0 - Set the
OLM_UTILS_IMAGEenvironment 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. - If needed, update the
COMPONENTSvariable.Confirm that the list of service components is accurate.
- 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_GROUPSenvironment 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).
- Add a new section called Image pull configuration to your script and
add the following environment variables:
- Add the
IMAGE_PULL_SECRETenvironment 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> - Add the
IMAGE_PULL_CREDENTIALSandIMAGE_PULL_PREFIXenvironment 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
exportcommands: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
exportcommands:export IMAGE_PULL_CREDENTIALS=$(echo -n "$PRIVATE_REGISTRY_PULL_USER:$PRIVATE_REGISTRY_PULL_PASSWORD" | base64 -w 0) export IMAGE_PULL_PREFIX=${PRIVATE_REGISTRY_LOCATION}
- Add the
- Save your changes.
- 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.
- Change to the directory where you saved the script.
- Source the environment variables. For example, if you named the script
cpd_vars.sh, run:source ./cpd_vars.sh