Creating OLM objects for a specialized installation
A cluster administrator, or a user with the appropriate permissions to install operators, must create the Operator Lifecycle Manager (OLM) objects, such as operators and operator subscriptions, that are required to install the IBM Cloud Pak® for Data platform and services. The OLM objects that you create depend on the services that you plan to install.
- Installation phase
- Setting up a client workstation
- Who needs to complete this task?
- A user with the appropriate permissions to install operators must complete this task.
- When do you need to complete this task?
- You must complete this task before you install Cloud Pak for Data for the first time.
Before you begin
If you plan to integrate with the IBM Cloud Pak foundational services Identity and Access Management Service, you must set the default storage class on your cluster to block storage before you install the IBM Cloud Pak foundational services operators.
- Creating Restic backups on an S3-compatible object store of Kubernetes metadata and volume data.
- Creating backups of volume data on a separate Persistent Volume Claim (PVC) or S3-compatible object store.
- Check whether there is a default storage class configured on the
cluster:
oc get storageclass
The default storage class is indicated by
(default)
. - Take the appropriate action for your environment:
- If no default storage class is defined, run the following command to set the default storage
class to block
storage:
oc patch storageclass ${STG_CLASS_BLOCK} \ --patch='{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "true"}}}'
- If the default storage class uses file storage, run the following commands:
- Write down the name of the current default storage class.
- Set the default storage class to block
storage:
oc patch storageclass ${STG_CLASS_BLOCK} \ --patch='{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "true"}}}'
- Remove the previous default storage
class:
oc patch storageclass <storage-class-name> \ --patch='{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "false"}}}'
Replace
<storage-class-name>
with the name of the current storage class from step a.
- If no default storage class is defined, run the following command to set the default storage
class to block
storage:
- Confirm that the
STG_CLASS_BLOCK
storage class is now the default storage class:oc get storageclass
Ensure that you source the environment variables before you run the commands in this task.
About this task
Use the cpd-cli
manage
apply-olm
command to create the IBM
Cloud Pak foundational services operators and the Cloud Pak for Data operators.
- The IBM
Cloud Pak foundational services operators are
installed in the project specified by the
${PROJECT_CPFS_OPS}
environment variable (typically theibm-common-services
project).If you install the scheduling service, the operator for this component is also installed in the
ibm-common-services
project. - The Cloud Pak for Data operators are installed in the
project specified by the
${PROJECT_CPD_OPS}
environment variable.
The instructions assume that you are installing the operators for all of the components at the same time, which enables you to complete the task in fewer steps. You can always install additional operators if you decide to install additional services on your environment.
Procedure
Results
- IBM
Cloud Pak foundational services operators are
created in
ibm-common-services
or the project specified by the${PROJECT_CPFS_OPS}
environment variable. - The Cloud Pak for Data operators are created in the
project specified by the
${PROJECT_CPD_OPS}
environment variable.
The operators are created when the apply-olm
command
returns [SUCCESS]... The apply-olm command ran successfully.
cpd-cli
manage
get-olm-artifacts
command to get the list of catalog
sources and operator subscriptions that are on the cluster.- To see the catalog sources and operator subscriptions for the operators in the
${PROJECT_CPFS_OPS}
project, run:cpd-cli manage get-olm-artifacts \ --subscription_ns=${PROJECT_CPFS_OPS}
- To see the catalog sources and operator subscriptions for the operators in the
${PROJECT_CPD_OPS}
project, run:cpd-cli manage get-olm-artifacts \ --subscription_ns=${PROJECT_CPD_OPS}
What to do next
- If no default storage class was defined, run the following command to remove the default storage
class:
oc patch storageclass ${STG_CLASS_BLOCK} \ --patch='{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "false"}}}'
- If the default storage class was previously set to file storage, run the following commands:
- Reapply the previous default storage
class:
oc patch storageclass <storage-class-name> \ --patch='{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "true"}}}'
Replace
<storage-class-name>
with the name of the previous default storage class. - Update the block storage class to set the
is-default-class
annotation tofalse
:oc patch storageclass ${STG_CLASS_BLOCK} \ --patch='{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "false"}}}'
- Reapply the previous default storage
class: