Setting up installation environment variables for IBM Software Hub Control Center

The commands for installing IBM Software Hub Control Center (Control Center) 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 required commands. After you source the script, you will be able to copy most of the required commands from the documentation and run them without making any changes.

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 Control Center will be installed.

When do you need to complete this task?
Repeat as needed Create an environment variable script for each cluster where you plan to install Control Center.
Remember: Control Center can be installed exactly once on a cluster.

Creating an environment variables file

The contents of your environment variable file depend on where you plan to install Control Center. Follow the appropriate steps for your environment:

Creating an environment variables file to install Control Center on the same cluster as IBM Software Hub

  1. Copy the following example to a text editor on your local file system:
    #===============================================================================
    # IBM Software Hub Control Center installation variables
    #===============================================================================
    
    # ------------------------------------------------------------------------------
    # Source your existing environment variables script
    # ------------------------------------------------------------------------------
    source ./cpd_vars.sh
    
    # ------------------------------------------------------------------------------
    # Control Center cluster
    # ------------------------------------------------------------------------------
    
    export CONTROL_OCP_URL=${OCP_URL}
    export CONTROL_IMAGE_ARCH=${IMAGE_ARCH}
    # export CONTROL_OCP_USERNAME=${OCP_USERNAME}
    # export CONTROL_OCP_PASSWORD=${OCP_PASSWORD}
    # export CONTROL_OCP_TOKEN=${OCP_TOKEN}
    export CONTROL_SERVER_ARGUMENTS="--server=${CONTROL_OCP_URL}"
    # export CONTROL_LOGIN_ARGUMENTS="--username=${CONTROL_OCP_USERNAME} --password=${CONTROL_OCP_PASSWORD}"
    # export CONTROL_LOGIN_ARGUMENTS"--token=${CONTROL_OCP_TOKEN}"
    export CONTROL_CPDM_OC_LOGIN="cpd-cli manage login-to-ocp ${CONTROL_SERVER_ARGUMENTS} ${CONTROL_LOGIN_ARGUMENTS}"
    export CONTROL_OC_LOGIN="oc login ${CONTROL_SERVER_ARGUMENTS} ${CONTROL_LOGIN_ARGUMENTS}"
    
    # ------------------------------------------------------------------------------
    # Control Center storage
    # ------------------------------------------------------------------------------
    
    export CONTROL_STG_CLASS_BLOCK=${STG_CLASS_BLOCK}
    export CONTROL_STG_CLASS_FILE=${STG_CLASS_FILE}
    
    # ------------------------------------------------------------------------------
    # Control Center projects
    # ------------------------------------------------------------------------------
    
    export CONTROL_PROJECT_OPERATORS=<enter your IBM Software Hub Control Center operator project>
    export CONTROL_PROJECT_OPERANDS=<enter your IBM Software Hub Control Center operand project>
  2. Update the source command if either of the following statements are true:
  3. Update the following sections in the script. See the following sections to learn about the variables and valid values in each section of the script:
  4. Save the file as a shell script. For example, save the file as control_center_vars.sh.
  5. Confirm that the script does not contain any errors. For example, if you named the script control_center_vars.sh, run:
    bash ./control_center_vars.sh
  6. If you stored passwords in the file, prevent others from reading the file. For example, if you named the script control_center_vars.sh, run:
    chmod 700 control_center_vars.sh

Creating an environment variables file to install Control Center on a different cluster

  1. Copy the following example to a text editor on your local file system:
    #===============================================================================
    # IBM Software Hub Control Center installation variables
    #===============================================================================
    
    # ------------------------------------------------------------------------------
    # Control Center cluster
    # ------------------------------------------------------------------------------
    
    export CONTROL_OCP_URL=<enter your Red Hat OpenShift Container Platform URL>
    export CONTROL_IMAGE_ARCH=<enter your cluster architecture>
    # export CONTROL_OCP_USERNAME=<enter your username>
    # export CONTROL_OCP_PASSWORD=<enter your password>
    # export CONTROL_OCP_TOKEN=<enter your token>
    export CONTROL_SERVER_ARGUMENTS="--server=${CONTROL_OCP_URL}"
    # export CONTROL_LOGIN_ARGUMENTS="--username=${CONTROL_OCP_USERNAME} --password=${CONTROL_OCP_PASSWORD}"
    # export CONTROL_LOGIN_ARGUMENTS="--token=${CONTROL_OCP_URL}"
    export CONTROL_CPDM_OC_LOGIN="cpd-cli manage login-to-ocp ${CONTROL_SERVER_ARGUMENTS} ${CONTROL_LOGIN_ARGUMENTS}"
    export CONTROL_OC_LOGIN="oc login ${CONTROL_SERVER_ARGUMENTS} ${CONTROL_LOGIN_ARGUMENTS}"
    
    # ------------------------------------------------------------------------------
    # Control Center storage
    # ------------------------------------------------------------------------------
    
    export CONTROL_STG_CLASS_BLOCK=<RWO-storage-class-name>
    export CONTROL_STG_CLASS_FILE=<RWX-storage-class-name>
    
    # ------------------------------------------------------------------------------
    # Control Center projects
    # ------------------------------------------------------------------------------
    
    export CONTROL_PROJECT_LICENSE_SERVICE=<enter your License Service project on the Control Center cluster>
    export CONTROL_PROJECT_SCHEDULING_SERVICE=<enter your scheduling service project on the Control Center cluster>
    export CONTROL_PROJECT_OPERATORS=<enter your IBM Software Hub Control Center operator project>
    export CONTROL_PROJECT_OPERANDS=<enter your IBM Software Hub Control Center operand project>
  2. Update the following sections in the script. See the following sections to learn about the variables and valid values in each section of the script:
  3. Save the file as a shell script. For example, save the file as control_center_vars.sh.
  4. Confirm that the script does not contain any errors. For example, if you named the script control_center_vars.sh, run:
    bash ./control_center_vars.sh
  5. If you stored passwords in the file, prevent others from reading the file. For example, if you named the script control_center_vars.sh, run:
    chmod 700 control_center_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 Control Center installation 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 control_center_vars.sh, run:
    source ./control_center_vars.sh

Control Center cluster

The variables in the Cluster section of the script specify information about the Red Hat® OpenShift® Container Platform cluster where you plan to install Control Center.

Variable Description
CONTROL_OCP_URL The URL of the Red Hat OpenShift Container Platform server where you want to install IBM Software Hub Control Center. For example, https://openshift1.example.com:8443.
Default value
There is no default value.
Valid values
The value depends on where you are installing Control Center:
Same cluster
The sample file includes the correct value:
${OCP_URL}
Different cluster
Specify the URL of the Red Hat OpenShift Container Platform cluster where you want to install Control Center.
CONTROL_IMAGE_ARCH The architecture of the cluster where you want to install IBM Software Hub control center.
Default value
There is no default value.
Valid values
The value depends on where you are installing Control Center:
Same cluster
The sample file includes the correct value:
${IMAGE_ARCH}
Different cluster
amd64
Specify amd64 if your Red Hat OpenShift Container Platform cluster runs on x86-64 hardware.
ppc64le
Specify ppc64le if your Red Hat OpenShift Container Platform cluster runs on Power hardware.
s390x
Specify s390x if your Red Hat OpenShift Container Platform cluster runs on Z hardware.
CONTROL_OCP_USERNAME The username that you use to authenticate to the cluster where you want to install IBM Software Hub Control Center. You must have sufficient privileges to complete the task.

To use the CONTROL_OCP_USERNAME variable, you must uncomment the export command in the environment variables file.

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:
  • Enter the credentials directly instead of using the environment variable in the commands.
  • Manually export the credentials before you run the commands.
Valid values
The value depends on where you are installing Control Center:
Same cluster
The sample file includes the correct value:
${OCP_USERNAME}
Different cluster
Specify your username.
CONTROL_OCP_PASSWORD The password that you use to authenticate to the cluster where you want to install IBM Software Hub Control Center.

To use the CONTROL_OCP_PASSWORD variable, you must uncomment the export command in the environment variables file.

Valid values
The value depends on where you are installing Control Center:
Same cluster
The sample file includes the correct value:
${OCP_PASSWORD}
Different cluster
Specify your password.
CONTROL_OCP_TOKEN

You can use a token instead of your user name and password to log in to the Red Hat OpenShift Container Platform cluster where you want to install IBM Software Hub Control Center.

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 CONTROL_OCP_TOKEN variable, you must uncomment the export command in the environment variables file.

Valid values
The value depends on where you are installing Control Center:
Same cluster
The sample file includes the correct value:
${OCP_TOKEN}
Different cluster
Specify your token.
CONTROL_SERVER_ARGUMENTS The server argument to pass to log in to the IBM Software Hub Control Center cluster.

Do not modify this export command.

The CONTROL_SERVER_ARGUMENTS environment variable depends on the CONTROL_SERVER_ARGUMENTS environment variable.

CONTROL_LOGIN_ARGUMENTS The credential arguments to pass to log in to the IBM Software Hub Control Center cluster.
The CONTROL_LOGIN_ARGUMENTS environment variable depends on the credentials that you use to log in.
A username and password
If you specify a username and password, the CONTROL_LOGIN_ARGUMENTS environment variable depends on the following environment variables:
  • CONTROL_OCP_USERNAME
  • CONTROL_OCP_PASSWORD

If you are working from the sample environment variables script, uncomment the export CONTROL_LOGIN_ARGUMENTS entry that includes the username and password entries.

Do not modify this export command.

A token
If you specify a token, the CONTROL_LOGIN_ARGUMENTS environment variable depends on the CONTROL_OCP_TOKEN environment variable.

If you are working from the sample environment variables script, uncomment the CONTROL_LOGIN_ARGUMENTS entry that includes the token entry.

Do not modify this export command.

CONTROL_CPDM_OC_LOGIN Shortcut for the cpd-cli manage login-to-ocp command for the cluster where you want to install IBM Software Hub Control Center.

Do not modify this export command.

The CONTROL_CPDM_OC_LOGIN environment variable depends on the following environment variables:
  • CONTROL_SERVER_ARGUMENTS
  • CONTROL_LOGIN_ARGUMENTS
CONTROL_OC_LOGIN Shortcut for the oc login command for the cluster where you want to install IBM Software Hub Control Center.

Do not modify this export command.

The CONTROL_OC_LOGIN environment variable depends on the following environment variables:
  • CONTROL_SERVER_ARGUMENTS
  • CONTROL_LOGIN_ARGUMENTS

Control Center storage

Storage

The variables in the Storage section of the script specify the storage classes that the Control Center installation should use.

Control Center uses the same storage as IBM Software Hub.

Variable Description
CONTROL_STG_CLASS_BLOCK The name of a block storage class on the cluster where you want to install IBM Software Hub Control Center. The storage class must be associated with a supported storage option.
Default value
There is no default value.
Valid values
The value depends on where you are installing Control Center:
Same cluster
The sample file includes the correct value:
${STG_CLASS_BLOCK}
Different cluster
Specify the name of a storage class that points to block storage (storage that supports ReadWriteOnce, also called RWO, access).
The following list provides the recommended storage classes for the supported storage options. If you use different storage classes, identify an equivalent storage class on the cluster.
  • OpenShift Data Foundation: ocs-storagecluster-ceph-rbd
  • IBM Fusion Data Foundation: ocs-storagecluster-ceph-rbd
  • IBM Fusion Global Data Platform: Either of the following storage classes, depending on your environment:
    • ibm-spectrum-scale-sc
    • ibm-storage-fusion-cp-sc
  • IBM Storage Scale Container Native: ibm-spectrum-scale-sc
  • Portworx: portworx-metastoredb-sc
  • NFS: managed-nfs-storage
  • Amazon Elastic Block Store: Either of the following storage classes, depending on your environment:
    • gp2-csi
    • gp3-csi
  • Nutanix: nutanix-volume
CONTROL_STG_CLASS_FILE The name of a file storage class on the cluster where you want to install IBM Software Hub Control Center. The storage class must be associated with a supported storage option.
Default value
There is no default value.
Valid values
The value depends on where you are installing Control Center:
Same cluster
The sample file includes the correct value:
${STG_CLASS_BLOCK}
Different cluster
Specify the name of a storage class that points to file storage (storage that supports ReadWriteMany, also called RWX, access).
The following list provides the recommended storage classes for the supported storage options. If you use different storage classes, identify an equivalent storage class on the cluster.
  • OpenShift Data Foundation: ocs-storagecluster-cephfs
  • IBM Fusion Data Foundation: ocs-storagecluster-cephfs
  • IBM Fusion Global Data Platform: Either of the following storage classes, depending on your environment:
    • ibm-spectrum-scale-sc
    • ibm-storage-fusion-cp-sc
  • IBM Storage Scale Container Native: ibm-spectrum-scale-sc
  • Portworx: portworx-rwx-gp3-sc
  • NFS: managed-nfs-storage
  • Amazon Elastic File System: efs-nfs-client
  • Nutanix: nutanix-file

Control Center projects

The variables in the Projects section of the script specify where the components that comprise IBM Software Hub Control Center are installed.

Variable Description
CONTROL_PROJECT_LICENSE_SERVICE The OpenShift project where you want to install the IBM Cloud Pak foundational services License Service on the cluster where you want to install IBM Software Hub Control Center.

This environment variable applies only if you plan to install Control Center on a different cluster.

Default value
ibm-licensing
Valid values
You can use any Red Hat OpenShift project; however, it is strongly recommended that you use ibm-licensing. Do not co-locate the License Service with other software.
CONTROL_PROJECT_SCHEDULING_SERVICE The OpenShift project where you want to install the scheduling service on the cluster where you want to install IBM Software Hub Control Center.

This environment variable applies only if you plan to install Control Center on a different cluster.

Default value
There is no default value.
Valid values
You can use any Red Hat OpenShift project; however, it is strongly recommended that you use ibm-cpd-scheduler. Do not co-locate the scheduling service with other software.
CONTROL_PROJECT_OPERATORS The project where you want to install the IBM Software Hub Control Center operators.
Default value
There is no default value.
Valid values
You can use any Red Hat OpenShift project, but do not co-locate the Control Center operators with other software.
CONTROL_PROJECT_OPERANDS The project where you want to install IBM Software Hub Control Center.
Default value
There is no default value.
Valid values
You can use any Red Hat OpenShift project, but do not co-locate Control Center with other software.