Setting up the cluster in silent mode

A cluster administrator user can set up a cluster by running a script in silent mode. A set of environment variables are needed before the script can be run in silent mode.

Before you begin

Make sure that you prepared your cluster with the necessary infrastructure and software. For more information, see Preparing for a starter deployment.

Create the environment variables that are needed for your installation. The following example shows the variables that are needed to install on the Red Hat OpenShift Kubernetes Service (ROKS) on IBM Cloud.

Note: Enter the name for a new project or an existing project for the CP4BA_AUTO_NAMESPACE parameter. If you already have a CP4BA operator in a different namespace on the cluster, the script stops to ask whether you want to create another operator in the new namespace.
Do you want to deploy another CP4BA operator in a new project? (Yes/No, default: No)
export CP4BA_AUTO_PLATFORM="ROKS"
export CP4BA_AUTO_DEPLOYMENT_TYPE="starter"
export CP4BA_AUTO_FIPS_CHECK="Yes"
export CP4BA_AUTO_PRIVATE_CATALOG="No"
export CP4BA_AUTO_NAMESPACE="silent-install"
export CP4BA_AUTO_CLUSTER_USER="username"
export CP4BA_AUTO_ENTITLEMENT_KEY="XXXXXXXXXXXXX"
export CP4BA_AUTO_AIRGAP_MODE="No"
export CP4BA_AUTO_SEPARATE_OPERATOR="No"

For more information, see Environment variables for installation in silent mode.

About this task

The cluster setup script is one of several scripts that are provided to help you install the Cloud Pak capabilities. You must be a cluster administrator to run the setup script. For more information, see user archetypes.

The cluster setup script identifies or creates a namespace and applies the custom resource definitions (CRD). The script provides the administrator with the cluster hostname on the cluster and available storage classes. This information must be provided to the user who runs the deployment script.

Note: The admin setup script does not set any parameters in the custom resource (CR) because the administrator might not be using the same host as the user who runs the deployment script.

Use the following steps to complete the setup.

Procedure

  1. Log in to the target cluster as the <cluster-admin> user.
    If you are not already logged in on OpenShift (OCP), then log in using the oc CLI:
    oc login https://<cluster-ip>:<port> -u <cluster-admin> -p <password>

    On IBM Cloud (ROKS), if you are not already logged in use the following command:

    oc login --token=<token> --server=https://<cluster-ip>:<port>
  2. Change the directory to the extracted cert-kubernetes/scripts folder.
    cd ${PATH_TO_EXTRACTED_FILES}/cert-kubernetes/scripts
  3. Run the cluster setup script in the command window.
    ./cp4a-clusteradmin-setup.sh
    Note: If the necessary environment variables exist, the script runs without asking for user input.

Results

When the script is finished, all the available storage class names are displayed along with the infrastructure node name. Take a note of the following information and provide it to the Cloud Pak admin user as they are needed for the deployment script:

  1. Project name or namespace.
  2. Storage class names.
  3. Username to log in to the cluster.

Verify the deployment to make sure that all pods are Running. Using the OpenShift CLI:

oc get pods

To get the operator log, run the following commands:

podname=$(oc get pod | grep ibm-cp4a-operator | awk '{print $1}')
oc logs $podname -c operator -n NAMESPACE

What to do next

Go to and complete the next step in Installing the capabilities by running the deployment script.