Updating your environment variables script (Upgrading from Version 5.2 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 or update the
PATCH_IDenvironment variable based on the patch that you want to install:export PATCH_ID=<patch-id>Release ID 5.4.0 0 - Set or update the
OLM_UTILS_IMAGEenvironment variable based on your license and your cluster hardware.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.olm-utils-v4-
All IBM Software Hub customers are entitled to use the
olm-utils-v4image.- x86-64 clusters
-
export OLM_UTILS_IMAGE=icr.io/cpopen/cpd/olm-utils-v4:${VERSION}.amd64 - ppc64le clusters
-
export OLM_UTILS_IMAGE=icr.io/cpopen/cpd/olm-utils-v4:${VERSION}.ppc64le - s390x clusters
-
export OLM_UTILS_IMAGE=icr.io/cpopen/cpd/olm-utils-v4:${VERSION}.s390x
olm-utils-premium-v4-
You must purchase the IBM Software Hub Premium Cartridge license to use the
olm-utils-premium-v4image.- x86-64 clusters
-
export OLM_UTILS_IMAGE=cp.icr.io/cp/cpd/olm-utils-premium-v4:${VERSION}.amd64 - ppc64le clusters
-
export OLM_UTILS_IMAGE=cp.icr.io/cp/cpd/olm-utils-premium-v4:${VERSION}.ppc64le - s390x clusters
-
export OLM_UTILS_IMAGE=cp.icr.io/cp/cpd/olm-utils-premium-v4:${VERSION}.s390x
- Update the Projects section to include the following environment variables. For more
information on the appropriate values for the variables in this section, see Projects.
- Add the
PROJECT_CPD_INST_BR_SVCenvironment variable to your script:export PROJECT_CPD_INST_BR_SVC=<enter your BR orchestration service project> - If your environment includes the scheduling service, add the
PROJECT_SCHEDULING_BR_SVCenvironment variable to your script:export PROJECT_SCHEDULING_BR_SVC=<enter your scheduling service BR orchestration service project>
- Add the
- Add a new section called Backup and restore to your script. For more information on the
appropriate values for the variables in this section, see Backup and
restore.
# ------------------------------------------------------------------------------ # Backup and restore # ------------------------------------------------------------------------------ export BACKUP_NAME=online-backup-$(date '+%Y%m%d-%H%M%S') export RESTORE_NAME=${BACKUP_NAME}-restore export OADP_PROJECT=<enter your OADP project> # export OADP_VERSION=<OADP-version> export NODE_AGENT_POD_CPU_LIMIT=500m export KOPIA_POD_CPU_LIMIT=1 # export PROJECT_FUSION=ibm-spectrum-fusion-ns # export OADP_PROJECT=ibm-backup-restore # export PROJECT_PX_ADMIN_NS=No default. # export PROJECT_NETAPP_TRIDENT_PROTECT=trident-protect # export NETAPP_TRIDENT_PROTECT_APP_VAULT=<AppVault name> export BR_OPERATOR_JOB_SA=bros-job-sa export BR_OPERATOR_SA=bros-sa # export PROJECT_CPD_INST_OPERATORS_NEW=<project-name> # export OPERATOR_MAPPING=${PROJECT_CPD_INST_OPERATORS}:${PROJECT_CPD_INST_OPERATORS_NEW} # export PROJECT_CPD_INST_OPERANDS_NEW=<project-name> # export OPERAND_MAPPING=${PROJECT_CPD_INST_OPERANDS}:${PROJECT_CPD_INST_OPERANDS_NEW} # export PROJECT_CPD_INSTANCE_TETHERED_1=<project-name> # export PROJECT_CPD_INSTANCE_TETHERED_1_NEW=<project-name> # export TETHER_MAPPING_1=${PROJECT_CPD_INSTANCE_TETHERED_1}:${PROJECT_CPD_INSTANCE_TETHERED_1_NEW} # export PROJECT_CPD_INSTANCE_TETHERED_2=<project-name> # export PROJECT_CPD_INSTANCE_TETHERED_2_NEW=<project-name> # export TETHER_MAPPING_2=${PROJECT_CPD_INSTANCE_TETHERED_2}:${PROJECT_CPD_INSTANCE_TETHERED_2_NEW} # export RESTORE_PROJECT_MAPPING="${OPERATOR_MAPPING},${OPERAND_MAPPING}" # export RESTORE_PROJECT_MAPPING="${OPERATOR_MAPPING},${OPERAND_MAPPING},${TETHER_MAPPING_1},${TETHER_MAPPING_2}" - Add a new section called S3 object storage to your script. For more information on the
appropriate values for the variables in this section, see S3 object
storage.
# ------------------------------------------------------------------------------ # S3 Object Storage # ------------------------------------------------------------------------------ export S3_URL=<S3-url> export REGION=<S3-region> export BUCKET_NAME=<bucket-name> export BUCKET_PREFIX=<bucket-prefix> export ACCESS_KEY_ID=<access-key-ID> export SECRET_ACCESS_KEY=<access-key-secret> - 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
- Locate the
COMPONENTSentry and make the following updates:- Add the
br_orchestrationcomponent after thecpd_platformcomponent. For example:export COMPONENTS=ibm-licensing,scheduler,cpd_platform,br_orchestration,... - Remove the following components, if applicable:
mongodb_cp4dwca_zwca_z_cewca_z_cg
- Add the
- 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.2 to Version 5.4).
- 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
Projects
The variables in the Projects section of the script specify where the components that comprise IBM Software Hub are installed.
| Variable | Description |
|---|---|
PROJECT_SCHEDULING_BR_SVC |
The project for the IBM Software Hub Backup Restore Orchestration
service for the scheduling service.
|
PROJECT_INST_BR_SVC |
The project for the IBM Software Hub Backup Restore Orchestration service for an instance of IBM
Software Hub.
|
Backup and restore
- The OpenShift API for Data Protection (OADP) operator
- Third-party backup and restore utilities, if applicable
| Variable | Description |
|---|---|
BACKUP_NAME |
The name to use when you create a
backup.
|
RESTORE_NAME |
The name to use when you restore IBM Software Hub from a
backup.
|
OADP_PROJECT |
The OpenShift project
where the OADP operator is installed.
|
OADP_VERSION |
The version of the
OADP operator that is installed. The following versions of OADP are supported:
Ensure that the version of the OpenShift API for Data Protection (OADP) operator is compatible with the version of Red Hat OpenShift Container Platform that you are running. Specify this option if you use one of the following back up and restore utilities:
To use the
|
NODE_AGENT_POD_CPU_LIMIT |
The CPU limit for
node-agent pods.
Specify this option if you use one of the following back up and restore utilities:
|
KOPIA_POD_CPU_LIMIT |
The CPU limit for Kopia pods. Specify this option if you use one of the following back up and restore utilities:
|
PROJECT_FUSION |
The OpenShift project
where IBM Fusion is installed. This variable is required only if you use the IBM Fusion Backup & Restore service to back up your IBM Software Hub installation. To use the
|
OADP_PROJECT |
The OpenShift project
where the IBM Fusion Backup & Restore service and OADP are
installed. This variable is required only if you use the IBM Fusion Backup & Restore service to back up your IBM Software Hub installation. To use the
|
PROJECT_PX_ADMIN_NS |
The OpenShift project
where Portworx Enterprise is installed. This variable is required only if you use Portworx asynchronous data replication to back up your IBM Software Hub installation. To use
the
|
PROJECT_NETAPP_TRIDENT_PROTECT |
The OpenShift project
where NetApp Trident Protect is installed. This variable is required only if you use NetApp Trident Protect to back up your IBM Software Hub installation. To use the
|
NETAPP_TRIDENT_PROTECT_APP_VAULT |
The name of the NetApp Trident Protect AppVault where you store the
backups for this instance of IBM Software Hub. This variable is required only if you plan to use NetApp Trident Protect to back up your IBM Software Hub installation. To use the
|
BR_OPERATOR_JOB_SA |
The name to use
service account for jobs that are managed by the IBM Software Hub Backup Restore orchestration
service.
|
BR_OPERATOR_SA |
The name to use
for the service account for the IBM Software Hub Backup Restore orchestration
service.
|
PROJECT_CPD_INST_OPERATORS_NEW |
If
you want to restore IBM Software Hub to a different project, specify the name of the project where
you want to restore the IBM Software Hub operators. To use the
|
OPERATOR_MAPPING |
For restore to a different project, map the existing operator project
to the project where you want to restore the operators. To use the
OPERATOR_MAPPING variable, you must uncomment the
export command in the environment variables file.
|
PROJECT_CPD_INST_OPERANDS_NEW |
If
you want to restore IBM Software Hub to a different project, specify the name of the project where
you want to restore the IBM Software Hub operands. To use the
|
OPERAND_MAPPING |
For restore to a different project, map the existing operands project
to the project where you want to restore the operands. To use the
|
PROJECT_CPD_INSTANCE_TETHERED_1_NEW |
If
you want to restore IBM Software Hub to a different project, specify the name of the project where
you want to restore the resources that are in a tethered
project. To use the
PROJECT_CPD_INSTANCE_TETHERED_1_NEW variable, you must uncomment the
export command in the environment variables file.
|
TETHER_MAPPING_1 |
For restore to a different project, map the existing tethered project
to the project where you want to restore the resources in the tethered
project. To use the
|
PROJECT_CPD_INSTANCE_TETHERED_2_NEW |
If
you want to restore IBM Software Hub to a different project, specify the name of the project where
you want to restore the resources that are in a tethered
project. To use the If you have additional
tethered projects, you can create additional
|
TETHER_MAPPING_2 |
For restore to a different project, map the existing tethered project
to the project where you want to restore the resources in the tethered
project. To use the If you have additional
tethered projects, you can create additional
|
RESTORE_PROJECT_MAPPING |
A
list of projects that IBM Software Hub will be restored
to. The
|
S3 object storage
The variables in the S3 object storage section of the script specify information about the S3 object storage where you store your backups.
| Variable | Description |
|---|---|
S3_URL |
The URL of
the S3-compatible object storage where you store your backups for this instance of IBM Software
Hub If you are using the default port
(
|
REGION |
The region where
the S3 bucket is located.
|
BUCKET_NAME |
The name of
the object storage bucket where you store your IBM Software Hub
backups.
|
BUCKET_PREFIX |
The bucket
prefix that you use for IBM Software Hub backups.
|
ACCESS_KEY_ID |
The access key ID
for your S3-compatible object storage.
|
SECRET_ACCESS_KEY |
The access key
secret for your S3-compatble object storage.
|