Setting up the cluster by running a script
To install the Cloud Pak capabilities with the Cloud Pak operators, a cluster administrator user can run a script to set up the cluster. They can also run the script in silent mode if set of environment variables are created before the script is run. The administrator must also provide information that they get from the script to a non-administrator user so they can run the deployment script.
Before you begin
Make sure you prepared your cluster with the necessary infrastructure and software. For more information, see Option 1: Preparing your cluster for an online deployment.
About this task
The cluster setup script is one of four core scripts (cluster setup, prerequisites, deployment, and post-install) 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 Targeted role-based user archetypes.
The cluster setup script identifies or creates a namespace and applies the custom resource
definitions (CRD). It then adds the specified user to the ibm-cp4a-operator role,
binds the role to the service account, and applies a security context constraint (SCC) for the Cloud
Pak.
The script also prompts the administrator to take note of the cluster hostname and a dynamic storage class on the cluster. These names must be provided to the user who runs the deployment script.
A new installation of Cloud Pak for Business Automation always includes a
namespace-scoped instance of foundational services when you use the scripts. The only exception is when the
OpenShift Container Platform (OCP) cluster already has an existing IBM Cloud Pak deployment that
uses a cluster-scoped instance of foundational services. In this case, the new CP4BA deployment uses
the instance in the ibm-common-services namespace. In other words, you cannot have
a cluster-scoped and a namespace-scoped foundational services in the same cluster.
oc get cm ibm-common-services-status -n kube-public -o yamlIf the output fails to find the configMap, it means that foundational services are not installed. If foundational services are installed, then the output of the command shows the status of the installed foundational services:
apiVersion: v1
data:
2201s-iamstatus: Ready
cp4ba-iamstatus: Ready
iamstatus: Ready
ibm-common-services-iamstatus: Ready
kind: ConfigMapTo check that the instance is not namespace-scoped, you can look for the
common-service-maps
configMap.
oc get configmap common-service-mapsIf no
common-service-maps configMaps are found, then the instance is
cluster-scoped.
The namespace-scoped foundational services instance is set up by the
cp4a-clusteradmin-setup.sh script by adding a configMap
(common-service-maps) on the OpenShift Container Platform (OCP) cluster to define
the namespace. It checks for an existing common-service-maps configMap, and if it
does not exist it creates it.
It is recommended that if you create the configMap before you run the script, then set the namespace of the foundational services to the target namespace. This namespace can be the same as the Cloud Pak for Business Automation deployment, but does not have to be.
Use the following steps to complete the setup.
Procedure
Results
When the script is finished, all of 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:
- Project name or namespace.
- Username to log in to the cluster.
When the common-service-maps configMap is applied to the cluster, each CP4BA
deployment uses the foundational services that are defined in the configMap namespace mapping.
For more information about installing multiple IBM Cloud Pak foundational services instances in your cluster, see Installing IBM Cloud Pak foundational services in multiple namespaces.
What to do next
You can see the list of operators that are installed in your cluster on the page. For more information about foundational services, see IBM Cloud Pak foundational services.
To verify the Common Services installation, check whether all the pods in the target CP4BA deployment namespace are running. Use the following command:
oc get pods -n $NAMESPACE
Change the admin user for IAM
The installation of IBM Cloud Pak foundational services creates an admin user,
who is a cluster administrator. To avoid the admin user from being removed when you
uninstall foundational services, you can customize the username by adding the
defaultAdminUser parameter to the OperandConfig instance in
the target namespace. Set a custom name that is not
admin.
- name: ibm-iam-operator
spec:
authentication:
config:
defaultAdminUser: <custom-username>
You can access the common-service instance by using the OpenShift Container
Platform console or by using the command-line interface (CLI).
-
In the console, use the following steps:
- From the navigation menu, click .
- Click the overflow menu icon of the
common-serviceinstance, and click Edit OperandConfig.
-
To use the CLI, run the following command:
oc edit OperandConfig common-service -n <namespace>
Continue to prepare everything that you need for each capability that you want to install in Preparing your chosen capabilities.