Setting up installation environment variables
The commands for installing and upgrading IBM® Software
Hub use variables with the format
${VARIABLE_NAME}. You can create a script to automatically export the appropriate
values as environment variables before you run the installation commands. After you source the
script, you will be able to copy most install and upgrade commands from the documentation and run
them without making any changes.
- Installation phase
-
Setting up a client workstation
Setting up a cluster
Collecting required information
Preparing to run installs in a restricted network
Preparing to run installs from a private container registry
Preparing the cluster for IBM Software Hub
Preparing to install an instance of IBM Software Hub
Installing an instance of IBM Software Hub
Setting up the control plane
Installing solutions and services
- 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 will be installed.
This information should be shared with any users who will run installation or upgrade commands that require information about your environment, such as information about your Red Hat® OpenShift® Container Platform cluster or your private container registry.
- When do you need to complete this task?
-
Repeat as needed Create at least one environment variable script. You might need to create multiple scripts depending on your use case.
Before you begin
Before you create an environment variables script, consider the use case that you need to support:
- Repeatable deployments across clusters
- If you want to create repeatable deployments across clusters, you can:
Option Recommended if you want to... Additional considerations Re-use the same script Improve the consistency of deployments across your environments. You must ensure that you modify the Cluster variables before you run an installation. Create multiple scripts Avoid modifying the environment variables script before you run an installation. You must ensure that a change in one script is populated to the related scripts, if appropriate. For example, if you update the value of the PRIVATE_REGISTRY_PULL_PASSWORDvariable in one script, you must update the variable in any related scripts.In addition, clearly name each script to ensure that you source the correct variables before you run installation or upgrade commands.
- Multiple deployments on the same cluster
- If you want to create multiple deployments on the same cluster, you can:
Option Recommended if you want to... Additional considerations Re-use the same script Create standardized deployments. You must ensure that you update the Projects variables before you run the installation. Create multiple scripts - Deploy different services in each instance of IBM Software Hub.
- Avoid modifying the environment variables script before you run an installation.
Clearly name each script to ensure that you source the correct variables before you run installation or upgrade commands.
Security considerations
It is recommended that you prevent other users from reading the contents of the environment
variable script by running chmod 700. However, if you have concerns about storing
your credentials in this file, you can:
- Enter the credentials directly instead of using the environment variable in the commands.
- Manually export the credentials before you run the commands.
The environment variables associated with credentials are identified with the following icon and tag:
Credentials
Creating an environment variables file
- Copy the following example to a text editor on your local file
system:
#=============================================================================== # IBM Software Hub installation variables #=============================================================================== # ------------------------------------------------------------------------------ # Client workstation # ------------------------------------------------------------------------------ # Set the following variables if you want to override the default behavior of the IBM Software Hub CLI. # # To export these variables, you must uncomment each command in this section. # export CPD_CLI_MANAGE_WORKSPACE=<enter a fully qualified directory> # export OLM_UTILS_LAUNCH_ARGS=<enter launch arguments> # ------------------------------------------------------------------------------ # Cluster # ------------------------------------------------------------------------------ export OCP_URL=<enter your Red Hat OpenShift Container Platform URL> export OPENSHIFT_TYPE=<enter your deployment type> export IMAGE_ARCH=<enter your cluster architecture> # export OCP_USERNAME=<enter your username> # export OCP_PASSWORD=<enter your password> # export OCP_TOKEN=<enter your token> export SERVER_ARGUMENTS="--server=${OCP_URL}" # export LOGIN_ARGUMENTS="--username=${OCP_USERNAME} --password=${OCP_PASSWORD}" # export LOGIN_ARGUMENTS="--token=${OCP_TOKEN}" export CPDM_OC_LOGIN="cpd-cli manage login-to-ocp ${SERVER_ARGUMENTS} ${LOGIN_ARGUMENTS}" export OC_LOGIN="oc login ${SERVER_ARGUMENTS} ${LOGIN_ARGUMENTS}" # ------------------------------------------------------------------------------ # Proxy server # ------------------------------------------------------------------------------ # export PROXY_HOST=<enter your proxy server hostname> # export PROXY_PORT=<enter your proxy server port number> # export PROXY_USER=<enter your proxy server username> # export PROXY_PASSWORD=<enter your proxy server password> # export NO_PROXY_LIST=<a comma-separated list of domain names> # ------------------------------------------------------------------------------ # Projects # ------------------------------------------------------------------------------ export PROJECT_LICENSE_SERVICE=<enter your License Service project> export PROJECT_SCHEDULING_SERVICE=<enter your scheduling service project> export PROJECT_SCHEDULING_BR_SVC=<enter your scheduling service BR orchestration service project> # export PROJECT_IBM_EVENTS=<enter your IBM Events Operator project> # export PROJECT_PRIVILEGED_MONITORING_SERVICE=<enter your privileged monitoring service project export PROJECT_CPD_INST_OPERATORS=<enter your IBM Software Hub operator project> export PROJECT_CPD_INST_OPERANDS=<enter your IBM Software Hub operand project> # export PROJECT_CPD_INSTANCE_TETHERED=<enter your tethered project> # export PROJECT_CPD_INSTANCE_TETHERED_LIST=<a comma-separated list of tethered projects> export PROJECT_INST_BR_SVC=${PROJECT_CPD_INST_OPERATORS}-br-svc # ------------------------------------------------------------------------------ # 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 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_INST_BR_SVC_NEW=${PROJECT_CPD_INST_OPERATORS_NEW}-br-svc # 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 PROJECT_CPD_INSTANCE_TETHERED_LIST_NEW=${PROJECT_CPD_INSTANCE_TETHERED_1_NEW},${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}" # ------------------------------------------------------------------------------ # Storage # ------------------------------------------------------------------------------ export STG_CLASS_BLOCK=<RWO-storage-class-name> export STG_CLASS_FILE=<RWX-storage-class-name> # ------------------------------------------------------------------------------ # 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> # ------------------------------------------------------------------------------ # IBM Entitled Registry # ------------------------------------------------------------------------------ export IBM_ENTITLEMENT_KEY=<enter your IBM entitlement API key> # ------------------------------------------------------------------------------ # Private container registry # ------------------------------------------------------------------------------ # Set the following variables if you mirror images to a private container registry. # # To export these variables, you must uncomment each command in this section. # export PRIVATE_REGISTRY_LOCATION=<enter the location of your private container registry> # export PRIVATE_REGISTRY_PUSH_USER=<enter the username of a user that can push to the registry> # export PRIVATE_REGISTRY_PUSH_PASSWORD=<enter the password of the user that can push to the registry> # export PRIVATE_REGISTRY_PULL_USER=<enter the username of a user that can pull from the registry> # export PRIVATE_REGISTRY_PULL_PASSWORD=<enter the password of the user that can pull from the registry> # ------------------------------------------------------------------------------ # Image pull configuration # ------------------------------------------------------------------------------ export IMAGE_PULL_SECRET=<pull-secret-name> # export IMAGE_PULL_CREDENTIALS=$(echo -n "cp:$IBM_ENTITLEMENT_KEY" | base64 -w 0) # export IMAGE_PULL_CREDENTIALS=$(echo -n "$PRIVATE_REGISTRY_PULL_USER:$PRIVATE_REGISTRY_PULL_PASSWORD" | base64 -w 0) # export IMAGE_PULL_PREFIX=icr.io # export IMAGE_PULL_PREFIX=${PRIVATE_REGISTRY_LOCATION} # ------------------------------------------------------------------------------ # IBM Software Hub version # ------------------------------------------------------------------------------ export VERSION=5.4.0 export PATCH_ID=latest export OLM_UTILS_IMAGE=icr.io/cpopen/cpd/olm-utils-v4:${VERSION} # ------------------------------------------------------------------------------ # Components # ------------------------------------------------------------------------------ export COMPONENTS=ibm-licensing,scheduler,cpd_platform,br_orchestration # export COMPONENTS_TO_SKIP=<component-ID-1>,<component-ID-2> # export IMAGE_GROUPS=<image-group-1>,<image-group-2> - Update each section in the script for your environment. See the following sections to learn about the variables and valid values in each section of the script:
- Save the file as a shell script. For example, save the file as
cpd_vars.sh. - Confirm that the script does not contain any errors. For example, if you
named the script
cpd_vars.sh, run:bash ./cpd_vars.sh - If you stored passwords in the file, prevent others from reading the file.
For example, if you named the script
cpd_vars.sh, run:chmod 700 cpd_vars.sh
Sourcing the environment variables
Save a copy of the script to your workstation and run it from a bash prompt before you the run 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
Client workstation
The variables in the Client workstation section of the script specify
information about how the cpd-cli manage plug-in runs on the client workstation.
| Variable | Description |
|---|---|
CPD_CLI_MANAGE_WORKSPACE |
The directory
where you want to store files, such as CASE files, that are used by cpd-cli manage
commands. The By default, the first time you run a cpd-cli manage command, the cpd-cli automatically creates the cpd-cli-workspace/olm-utils-workspace/work directory.The location of the directory depends on several factors:
You can set the The To use the
|
OLM_UTILS_LAUNCH_ARGS |
A set of arguments
that you pass to the olm-utils runtime container. You can use the
To use the
|
Cluster
The variables in the Cluster section of the script specify information about your Red Hat OpenShift Container Platform cluster.
| Variable | Description |
|---|---|
OCP_URL |
The URL of the Red Hat
OpenShift Container Platform server. For example,
https://openshift1.example.com:8443.
|
OPENSHIFT_TYPE |
The type of Red Hat
OpenShift Container Platform cluster that you are
running.
|
IMAGE_ARCH |
The architecture
of your Red Hat
OpenShift Container Platform Cluster
hardware.
|
OCP_USERNAME |
To use the |
OCP_PASSWORD |
To use the |
OCP_TOKEN |
You can get your token from the Red Hat OpenShift Container Platform web console. From the username drop-down menu, select Copy login command. When prompted, click Display Token. To use the |
SERVER_ARGUMENTS |
The server
argument to pass to log in to the cluster. Do not modify this The |
LOGIN_ARGUMENTS |
The credential
arguments to pass to log in to the cluster. The
LOGIN_ARGUMENTS environment variable depends on the credentials that you use to log in.
|
CPDM_OC_LOGIN |
Shortcut for the cpd-cli manage login-to-ocp command. Do not modify this The
CPDM_OC_LOGIN environment variable depends
on the following environment variables:
|
OC_LOGIN |
Shortcut for the oc login command.Do not modify this
The
OC_LOGIN
environment variable depends on the following environment variables:
|
Proxy server
The variables in the Proxy server section are required only if you use HTTP proxy to manage inbound traffic to and outbound traffic from your Red Hat OpenShift Container Platform cluster.
| Variable | Description |
|---|---|
PROXY_HOST
|
The hostname or IP address of your proxy
server. To use the
|
PROXY_PORT |
The port number to connect to on your proxy
server. Specify this variable only if your cluster-wide proxy configuration requires the port number. To use the
|
PROXY_USER |
Specify this variable only if your proxy server requires authentication. To use the
|
PROXY_PASSWORD |
Specify this variable only if your proxy server requires authentication. To use the
|
NO_PROXY_LIST |
A
comma-separated list of domain names that should not be routed through the proxy
server. Specify this variable only if you want to prevent specific domain names from being routed to your proxy server. To use the
|
Projects
The variables in the Projects section of the script specify where the components that comprise IBM Software Hub are installed.
| Variable | Description |
|---|---|
PROJECT_LICENSE_SERVICE |
The project for the Licensing Service
operator.
|
PROJECT_SCHEDULING_SERVICE |
The project for the scheduling
service.
|
PROJECT_SCHEDULING_BR_SVC |
The project for the IBM Software Hub Backup Restore Orchestration
service for the scheduling service.
|
PROJECT_IBM_EVENTS |
watsonx Assistant or
watsonx
Orchestrate users only. The project
where you want to install the IBM
Events Operator or
the project where a cluster-wide instance of the IBM
Events Operator is already installed.
To use the
|
PROJECT_PRIVILEGED_MONITORING_SERVICE |
The OpenShift project for
the IBM Software Hub privileged monitoring service.
The privileged monitoring service is optional, but provides additional monitoring and logging information for IBM Software Hub. The privileged monitoring service is installed once on the cluster and can provide monitoring and information to multiple instances of IBM Software Hub. To use the
|
PROJECT_CPD_INST_OPERATORS |
The project where you want to install the operators for this instance
of IBM Software Hub.
|
PROJECT_CPD_INST_OPERANDS |
The project for the IBM Software Hub control plane and
services.
|
PROJECT_CPD_INSTANCE_TETHERED |
A project that is tethered to the project where the IBM Software
Hub control plane is installed. This variable is required only if you plan to install a service that supports deploying service instances into a tethered project. To use the
|
PROJECT_CPD_INSTANCE_TETHERED_LIST |
A comma-separated list of projects that are tethered to the
project where the IBM Software
Hub control plane is
installed.
This variable is required only if you plan to install a service that supports deploying service instances into a tethered project. To use the
|
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 you want to install the OADP operator.
If the OADP is already installed on your cluster, specify the project where it is installed.
|
OADP_VERSION |
The version
of the OADP operator to install. The following versions of OADP are supported:
You must install a version of the OpenShift API for Data Protection (OADP) operator that is compatible with the version of Red Hat OpenShift Container Platform that you are running. Specify this option if you plan to 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 plan to 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 plan to use one of the following back up and restore utilities:
|
PROJECT_FUSION |
The OpenShift project
where you want to install IBM Fusion. This variable is required only if you plan to 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 you want to install Portworx Enterprise. This variable is required only if you plan to use Portworx asynchronous data replication to back up your IBM Software Hub installation. To use
the
|
PROJECT_NETAPP_TRIDENT_PROTECT |
The OpenShift project
where you want to install NetApp Trident Protect. This variable is required only if you plan to 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 want to
store the the backups for an 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_INST_BR_SVC_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 Backup Restore Orchestration service for the instance in the new
project.
|
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
|
PROJECT_CPD_INSTANCE_TETHERED_LIST_NEW |
A list of projects that you want to tether to the project where you
want to restore IBM Software Hub when you restore IBM Software Hub to a different
project. To use the
|
RESTORE_PROJECT_MAPPING |
A
list of projects that IBM Software Hub will be restored
to. The
|
Storage
The variables in the Storage section of the script specify the storage classes that the installation should use.
| Variable | Description |
|---|---|
STG_CLASS_BLOCK
|
The name of a
block storage class on the cluster. The storage class must be associated with a supported storage
option.
|
STG_CLASS_FILE |
The name of a file
storage class on the cluster. The storage class must be associated with a supported storage
option.
|
S3 object storage
The variables in the S3 object storage section of the script specify information about the S3 object storage where you will store your backups.
| Variable | Description |
|---|---|
S3_URL |
The URL of the
S3-compatible object storage where you plan to store your IBM Software Hub
backups. 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 plan to store your IBM Software Hub
backups.
|
BUCKET_PREFIX |
The bucket prefix
that you want to use for IBM Software Hub backups.
|
ACCESS_KEY_ID |
|
SECRET_ACCESS_KEY |
|
IBM Entitled Registry
The variables in the IBM Entitled Registry section of the script enable you to connect to the IBM Entitled Registry and access the IBM Software Hub software images that you are entitled to.
- The global image pull secret (for components that use OLM)
- The namespace-scoped image pull secrets (for components that use Helm)
Need more information about the IBM Entitled Registry? See Obtaining your IBM entitlement API key for IBM Software Hub.
| Variable | Description |
|---|---|
IBM_ENTITLEMENT_KEY |
|
Private container registry
It is strongly recommended that you use a private container registry. The variables in the Private container registry section are required only if you mirror images to a private container registry.
- Mirror images from the IBM Entitled Registry to the private container registry.
- Pull images from the private container registry
Need more information about private container registries? See Private container registry requirements.
| Variable | What to specify |
|---|---|
PRIVATE_REGISTRY_LOCATION |
The location of the private container registry. To use the
|
PRIVATE_REGISTRY_PUSH_USER |
To
use the
|
PRIVATE_REGISTRY_PUSH_PASSWORD |
To use the
|
PRIVATE_REGISTRY_PULL_USER |
To use the
|
PRIVATE_REGISTRY_PULL_PASSWORD |
To use the
|
Image pull configuration
The variable in the Image pull configuration section specifies how components should pull images.
| Variable | Description |
|---|---|
IMAGE_PULL_SECRET |
The name that you want to use for the secret that will contain the base64 encoded
credentials for pulling images.
|
IMAGE_PULL_CREDENTIALS |
The
IMAGE_PULL_CREDENTIALS environment variable depends on the repository
that you pull images from:
|
IMAGE_PULL_PREFIX |
The location to
pull images from. The
IMAGE_PULL_PREFIX
environment variable depends on the repository that you pull images from:
|
IBM Software Hub version
The variable in the IBM Software Hub version section specifies which version of IBM Software Hub to install or upgrade to.
| Variable | Description |
|---|---|
VERSION |
The version of the IBM Software
Hub
software to install.
|
PATCH_ID |
The ID of the
patch that you want to apply to your environment. Important: You must install the latest patch
to be eligible for support.
By default, the latest patch is installed. However, you can choose a specific patch to apply to your environment. For example, if you have multiple instances of IBM Software Hub, you can override the default behavior to ensure that the same patch is applied to all instances. For example, if you validated a specific patch on your test environment, you can override the default behavior to apply the same patch to your production environment.
|
OLM_UTILS_IMAGE |
The fully
qualified location of the olm-utils image.
Important: If your cluster pulls images from a private container registry, you can
update this environment variable after you mirror the image to your private container
registry.
|
Components
The variables in the Components section help you manage the software that is associated with an instance of IBM Software Hub.
COMPONENTS environment variable to ensure that you specify the same
components when you:- Mirror images to a private container registry
- Create the operators for an instance of IBM Software Hub
- Install the software for an instance of IBM Software Hub
| Variable | Description |
|---|---|
COMPONENTS |
A comma separated list of the components that you want to install or upgrade.
|
COMPONENTS_TO_SKIP |
A comma-separated list of components that are already installed on the cluster with
cluster-scoped operators. If a component has a cluster-scoped operator, you can use
this environment variable to prevent the For example, if you have a
cluster-scoped instance of the Cloud Native PostgreSQL operator, you can prevent the To use the
|
IMAGE_GROUPS |
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. To use the
|
What to do next
Now that you've set up your installation environment variables, you're ready to complete Preparing to run IBM Software Hub installs from a private container registry.