Setting up installation environment variables
The commands for installing and upgrading IBM Cloud Pak® for Data 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
- Who needs to complete this task?
-
Cloud Pak for Data operations team The IBM Cloud Pak for Data operations team should work with the cluster administrator to compile information about the cluster where Cloud Pak for Data 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_PASSWORD
variable 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 Cloud Pak for Data.
- 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.
Creating an environment variables file
- Copy the following example to a text editor on your local file
system:
#=============================================================================== # Cloud Pak for Data installation variables #=============================================================================== # ------------------------------------------------------------------------------ # Client workstation # ------------------------------------------------------------------------------ # Set the following variables if you want to override the default behavior of the Cloud Pak for Data 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 ${OCP_URL} ${LOGIN_ARGUMENTS}" # ------------------------------------------------------------------------------ # Projects # ------------------------------------------------------------------------------ export PROJECT_CERT_MANAGER=<enter your certificate manager project> export PROJECT_LICENSE_SERVICE=<enter your License Service project> export PROJECT_SCHEDULING_SERVICE=<enter your scheduling 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 Cloud Pak for Data operator project> export PROJECT_CPD_INST_OPERANDS=<enter your Cloud Pak for Data operand project> # export PROJECT_CPD_INSTANCE_TETHERED=<enter your tethered project> # export PROJECT_CPD_INSTANCE_TETHERED_LIST=<a comma-separated list of tethered projects> # ------------------------------------------------------------------------------ # Storage # ------------------------------------------------------------------------------ export STG_CLASS_BLOCK=<RWO-storage-class-name> export STG_CLASS_FILE=<RWX-storage-class-name> # ------------------------------------------------------------------------------ # 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> # ------------------------------------------------------------------------------ # Cloud Pak for Data version # ------------------------------------------------------------------------------ export VERSION=4.8.7 # ------------------------------------------------------------------------------ # Components # ------------------------------------------------------------------------------ export COMPONENTS=ibm-cert-manager,ibm-licensing,scheduler,cpfs,cpd_platform # export COMPONENTS_TO_SKIP=<component-ID-1>,<component-ID-2> # ------------------------------------------------------------------------------ # watsonx Orchestrate # ------------------------------------------------------------------------------ # export PROJECT_IBM_APP_CONNECT=<enter your IBM App Connect in containers project> # export AC_CASE_VERSION=<version> # export AC_CHANNEL_VERSION=<version>
- 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 |
The username that you use to authenticate to your cluster. You must have sufficient
privileges to complete each installation or upgrade task. To use the Tip: It is recommended that
you prevent other users from reading the contents of the environment variable script by running
chmod 700 . However, if you still have concerns about storing your OpenShift credentials in this file, you can:
|
OCP_PASSWORD |
The password that you use to authenticate to your
cluster. To use the |
OCP_TOKEN |
You can use a token instead of your user name and password to log in to your Red Hat OpenShift Container Platform cluster. 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:
|
Projects
The variables in the Projects section of the script specify where the components that comprise Cloud Pak for Data are installed.
Variable | Description |
---|---|
PROJECT_CERT_MANAGER |
The project for the Certificate Manager
operator.
|
PROJECT_LICENSE_SERVICE |
The project for the Licensing Service
operator.
|
PROJECT_SCHEDULING_SERVICE |
The project for the scheduling
service.
|
PROJECT_IBM_EVENTS |
watsonx Assistant
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 Cloud Pak for Data privileged monitoring service.
The privileged monitoring service is optional, but provides additional monitoring and logging information for Cloud Pak for Data. To use the
|
PROJECT_CPD_INST_OPERATORS |
The project where you want to install the operators for this instance
of Cloud Pak for Data.
|
PROJECT_CPD_INST_OPERANDS |
The project for the IBM
Cloud Pak for Data control plane and services.
|
PROJECT_CPD_INSTANCE_TETHERED |
A project that is tethered to the project where the Cloud Pak for Data 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 Cloud Pak for Data 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
|
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 a supported storage option.
|
STG_CLASS_FILE |
The name of a file
storage class on a supported storage option.
|
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 Cloud Pak for Data software images that you are entitled to.
Depending on whether you pull images from the IBM Entitled Registry or from a private container registry, the variables might also be used to configure the global image pull secret.
Need more information about the IBM Entitled Registry? See Obtaining your IBM entitlement API key for IBM Cloud Pak for Data.
Variable | Description |
---|---|
IBM_ENTITLEMENT_KEY |
The entitlement
API key that is associated with your My IBM
account.
|
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.
The variables in the Private container registry section of the script enable you to mirror images from the IBM Entitled Registry to 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 |
The username of a user who has the required privileges to push images to the private
container registry. To use the
|
PRIVATE_REGISTRY_PUSH_PASSWORD |
The password of the user who has the required privileges to push images to the
private container registry. To use the Tip: It is recommended that you prevent other users from
reading the contents of the environment variable script by running
chmod 700 .
However, if you still have concerns about storing passwords in this file, you can:
|
PRIVATE_REGISTRY_PULL_USER |
The username of a user who has the required privileges to pull images from the
private container registry. To use the
|
PRIVATE_REGISTRY_PULL_PASSWORD |
The password of the user who has the required privileges to pull images from the
private container registry. To use the Tip: It is recommended that you prevent other users from
reading the contents of the environment variable script by running
chmod 700 .
However, if you still have concerns about storing passwords in this file, you can:
|
Cloud Pak for Data version
The variable in the Cloud Pak for Data version section specifies which version of Cloud Pak for Data to install or upgrade to.
Variable | Description |
---|---|
VERSION |
The version of the Cloud Pak for Data software
to install.
|
Components
The variables in the Components section help you manage the software that is associated with an instance of Cloud Pak for Data.
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 Cloud Pak for Data
- Install the software for an instance of Cloud Pak for Data
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
|
watsonx Orchestrate
4.8.4 or later The variables in the watsonx Orchestrate® section specify information about the IBM App Connect in containers software that you must install if you plan to install watsonx Orchestrate.
Variable | Description |
---|---|
PROJECT_IBM_APP_CONNECT |
watsonx Orchestrate users only. The
project where you want to install IBM App Connect in containers.
Important:
Each instance of watsonx Orchestrate requires a dedicated instance
of App Connect. You must install an
instance of App Connect for each
instance of watsonx Orchestrate that you
plan to install.
To use the
|
AC_CASE_VERSION |
Set the AC_CASE_VERSION environment variable based on the version of
Cloud Pak for Data that you plan to install.To use the
|
AC_CHANNEL_VERSION |
Set the AC_CHANNEL_VERSION environment variable based on the version of
Cloud Pak for Data that you plan to install.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 Cloud Pak for Data installs from a private container registry.