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
- 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> - Update the
sourcecommand if either of the following statements are true:- You plan to store the Control Center environment variables script in
a different directory from your installation environment variables script.
If the scripts are in different directories, specify the fully qualified path of the IBM Software Hub installation environment variables script.
- You use a name other than
cpd_vars.shfor your installation environment variables script.If the IBM Software Hub installation environment variables script has a different name, specify the name of your script.
- You plan to store the Control Center environment variables script in
a different directory from your installation environment variables script.
- 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:
- Save the file as a shell script. For example, save the file as
control_center_vars.sh. - 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 - 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
- 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> - 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:
- Save the file as a shell script. For example, save the file as
control_center_vars.sh. - 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 - 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.
- Change to the directory where you saved the script.
- 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.
|
CONTROL_IMAGE_ARCH |
The architecture
of the cluster where you want to install IBM Software Hub control
center.
|
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 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:
|
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_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_SERVER_ARGUMENTS |
The server
argument to pass to log in to the IBM Software Hub Control Center
cluster. Do not modify this The |
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.
|
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
The
CONTROL_CPDM_OC_LOGIN environment variable depends on the following environment variables:
|
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
The
CONTROL_OC_LOGIN
environment variable depends on the following environment variables:
|
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.
|
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.
|
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.
|
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.
|
CONTROL_PROJECT_OPERATORS |
The project where you want to install the IBM Software Hub Control
Center operators.
|
CONTROL_PROJECT_OPERANDS |
The project where you want to install IBM Software Hub Control
Center.
|
What to do next
Now that you've set up the installation environment variables for Control Center, you're ready to complete Manually creating projects (namespaces) for the shared cluster components for IBM Software Hub Control Center.