Option 1: Uninstalling capabilities from the OCP console

You can uninstall Cloud Pak resources and components from your platform deployment from the OpenShift Container Platform (OCP) console.

About this task

If you installed the CP4BA catalogs, and used an IBM Cloud Pak for Business Automation multi-pattern operator instance to create an ICP4ACluster then you can use the OCP user interface to uninstall it. Uninstalling and cleaning up the cluster involves several separate high-level tasks.

  • Uninstalling the CP4BA deployment.
  • Uninstalling the operators.
  • Deleting PVs and PVCs. If you do delete the PVs and PVCs, the persistent data along with configuration and log files are also deleted. Delete the PVCs before you delete the PVs.
  • Dropping the databases.
  • Deleting the secrets created by the CP4BA deployment. Go to the CP4BA project, click Workloads > Secrets, then right-click each secret and click Delete secret.

    If you do delete all of the secrets that you created for Cloud Pak for Business Automation, then you must create them again if you want to install another CP4BA deployment.

  • Deleting the CP4BA project.
  • Uninstalling the Cloud Pak foundational services is necessary only if you want to completely clean up the cluster. The uninstallation of CP4BA uninstalls Cloud Pak foundation services only and does not remove the Cloud Pak foundation services operators and some of its resources. To completely remove Cloud Pak foundational services, see Uninstalling foundational services.

To uninstall the CP4BA deployment, use the following steps.

Procedure

  1. Log in to your OCP or ROKS cluster.
  2. In the Administrator view, click Home > Projects, and then click the project that you used to install the Cloud Pak deployment.
  3. Click Operators > Installed Operators > IBM Cloud Pak for Business Automation (CP4BA) multi-pattern, and then click the CP4BA deployment tab.

    The name of the deployment is shown in the list of ICP4AClusters. The default name is icp4adeploy.

    Note: If the deployment contains only the FNCM capability, then select Operators > Installed Operators > IBM CP4BA FileNet Content Manager, and then click the Content deployment tab.

    The name of the deployment is shown in the list of Content clusters. The default name is Content.

  4. To the right of the ICP4ACluster name, click ellipsis > Delete ICP4ACluster.
    Delete ICP4ACluster

    The action deletes the resources and the instance is no longer seen in the ICP4ACluster list.

    Wait for all the pods in the CP4BA namespace to be terminated, except the operator pods, before you go to the next step.

    Note: If the deployment contains only the FNCM capability, then select Delete Content.
  5. Check whether the Client and ZenExtension resources are fully deleted because some resources get stuck in the Terminating state. Click Home > Search and select the CP4BA project.
    1. Click Resource and enter Client. Select Client and check whether the resource shows as Resource is being deleted.
    2. Click Resource and enter ZenExtension. Select ZenExtension and check whether the resource shows as Resource is being deleted.
  6. If the Client and ZenExtension resources are remaining, you must run the following commands to clean up the resources:
    1. Change the directory to the extracted cert-kubernetes/scripts folder.
      cd ${PATH_TO_EXTRACTED_FILES}/cert-kubernetes/scripts 
    2. Run the following command to clean up the resources:
      ./cp4a-uninstall-clean-up.sh 
  7. Optional: If you want to uninstall the IBM Cloud Pak for Business Automation (CP4BA) multi-pattern operator as well, then click Operators > Installed Operators. To the right of the IBM Cloud Pak for Business Automation (CP4BA) multi-pattern operator, click ellipsis > Uninstall Operator.

    The action deletes the operator and the instance is no longer seen in the Installed Operators list.

    Note: Deleting the ICP4ACluster and uninstalling the CP4BA operator does not delete the existing PVs and PVC, or the databases that are used by the various components. Check the persisted data before you delete the PVs and PVCs manually to make sure that you no longer want to keep them. Likewise, if the data no longer needs to be retained or reused you can delete the databases.
    Repeat the same step for the following operators:
    • IBM CP4BA FileNet Content Manager
    • IBM CP4BA Workflow Process Service
    • IBM CP4BA Process Federation Server

What to do next

If you now plan to install another instance of the Cloud Pak on the same cluster, check if the dependencies like Namespaces and OperandRequests are properly deleted. If you are sharing the project with another Cloud Pak, then do not delete the dependencies.

Deleting PVCs

If you uninstalled all the operators, then you can delete the PVCs from the project. Click Storage > PersistentVolumeClaims for each PVC, and then click Delete PersistentVolumeClaim. If you deleted only CP4BA and its related operators, then you can click Storage > PersistentVolumeClaims, change the "Filter" to Label and enter "release=24.0.0" in the Search by label field. You can then delete the listed PVCs by clicking Actions > Delete PersistentVolumeClaim.

Optional: Deleting PVs

To identify which PV can be removed, check the status of the PV. If the status is “Available”, then the PVs can be deleted.

  1. Get a list of all the PVs.
    oc get pv
  2. Delete a PV.
    oc delete pv <PV name>

For more information about cleaning up your data, see Cleaning up data.

Deleting secrets
  1. Remove the foundation subscription in the CP4BA namespace by clicking Home > Search, selecting Subscription for operators.coreos.com/v1alpha1 in the Resource list, and then selecting Remove Subscription from the icp4a-foundation-operator menu. Now, all the CP4BA secrets can be deleted.
  2. To delete the secrets from the project click Workloads > Secrets, and then click Delete Secret.

    The CP4BA secrets include the strings ibm-cp4a or icp4a in the names. The custom secrets can also be deleted, for example ibm-fncm-secret, ibm-ban-secret, and ldap-bind-secret.

Deleting the databases
Uninstall foundational services
Note: If you plan to clean up your Cloud Pak for Business Automation and Cloud Pak foundational services namespaces after you uninstall the foundational services, then do not delete the Cloud Pak foundational services namespace and the common-service-maps ConfigMap in kube-public namespace. The Cloud Pak foundational services and the common-service-maps ConfigMap in kube-public namespace are required when you run the cp4a-clean-up.sh script.

If you want to uninstall the Cert Manager from Cloud Pak foundational services, see Manual steps for uninstalling singleton services - Cert Manager. If your IBM Cert Manager was installed in the ibm-cert-manager namespace, you can delete the namespace.

If you want to uninstall the License Service from Cloud Pak foundational services, see Uninstalling License Service. If your License Manager was installed in the ibm-licensing namespace, you can delete the namespace.

For more information about uninstalling foundational services, see Uninstalling foundational services.

Note: You can also run a script if the foundational services uninstallation does not remove all the components. For more information, see Uninstallation is not successful.
Cleaning up your Cloud Pak for Business Automation and Cloud Pak foundational services namespaces
You can use the cp4a-clean-up.sh script to clean up resources that are left over after uninstallation. The script makes sure that all resources from the Cloud Pak for Business Automation and Cloud Pak foundational services namespaces are cleaned up. If a namespace is not cleaned up, you might not be able to terminate the namespace or some resources might show up when you use the same namespace name. If your Cloud Pak foundational services is not shared with other Cloud Paks, then you can clean up your Cloud Pak for Business Automation and Cloud Pak foundational services namespaces.
Note: Run the script if any of the following checks are true:
  • The CP4BA namespace is not deleted.
  • The common-service-maps ConfigMap in kube-public namespace is not deleted.
  1. Change the directory to the scripts folder under cert-kubernetes/scripts.
    cd /<path_to_cert-kubernetes>/cert-kubernetes/scripts

    Where <path_to_cert-kubernetes> is the path to cert-kubernetes.

  2. Run the cp4a-clean-up.sh script to clean up the Cloud Pak for Business Automation and Cloud Pak foundational services namespaces.
    ./cp4a-clean-up.sh -n <cp4ba-ns>

    Where <cp4ba-ns> is the target namespace.

    Important: If you installed your CP4BA deployment with separation of duties, make sure that you use the namespace that contains the CP4BA deployment and not the CP4BA operators namespace. If you do not specify a namespace, the script asks you to enter the services namespace.
The script takes the following actions:
  • Checks whether the Cloud Pak foundational services associated with Cloud Pak for Business Automation is shared and if the script detects that Cloud Pak foundational services is shared, the script cleans only the Cloud Pak for Business Automation namespace.
  • The script detects if the deployment has separation of duty where the Cloud Pak for Business Automation operators and Cloud Pak for Business Automation deployment are in different namespaces. If the Cloud Pak for Business Automation operators and Cloud Pak for Business Automation deployment are in different namespaces, the script cleans both the Cloud Pak for Business Automation and Cloud Pak foundational services namespaces.
  • The script asks whether you have multiple Cloud Pak for Business Automation deployments on the same cluster. If you select Yes, then the Cloud Pak for Business Automation related custom resource definitions are not deleted. If you select No, then the Cloud Pak for Business Automation related custom resource definitions are deleted.
  • The script displays the list of resources in each namespace to be deleted. You need to confirm whether to clean up the Cloud Pak for Business Automation and Cloud Pak foundational services namespaces including deleting the namespace where the Cloud Pak for Business Automation instance is installed.
Deleting the CP4BA project
Note: If deleting a project fails and the project is stuck in the Terminating state, some objects might still exist in the namespace after a force deletion. Do not use the same project name to rebuild instead use a new project name.

Click Home > Projects, identify the project, and then click Delete Project.

The project might not terminate successfully until you uninstall the Cloud Pak foundational services.

Note: If foundational services are installed in a namespace-scoped instance in the same namespace as the CP4BA deployment, then delete the CP4BA project after you uninstalled the foundational services. For more information, see Uninstall foundational services.
Deleting the catalog sources
If you decide to remove CP4BA completely, then remove the related catalog sources.
  1. Click Administration > Cluster Settings, click the Configuration tab, scroll down the list, and then click OperatorHub.
  2. Select the Sources tab.
  3. Delete the following sources:
    • ibm-cp4a-operator-catalog
    • ibm-opencontent-flink
    • ibm-cs-opensearch-catalog
    • ibm-cert-manager-catalog
    • ibm-cs-install-catalog
    • bts-operator
    • ibm-iam-operator-catalog
    • ibm-zen-operator-catalog
    • ibm-events-operator-catalog
    • cloud-native-postgresql-catalog
    • ibm-fncm-operator-catalog
Optional: Deleting custom resource definitions
If you plan to remove all the Cloud Pak dependencies, the custom resource definitions (CRD) for both Cloud Pak for Business Automation and the Cloud Pak foundational services can be deleted.
Note: Do not delete the custom resource definitions if you have other Cloud Pak for Business Automation deployment on the cluster.

Click Administration > CustomResourceDefinitions, search by the name and click Delete CustomResourceDefinition.

Delete the following CRDs from the cluster.
contentrequests.icp4a.ibm.com 
contents.icp4a.ibm.com 
foundationrequests.icp4a.ibm.com 
foundations.icp4a.ibm.com 
icp4aclusters.icp4a.ibm.com 
processfederationservers.icp4a.ibm.com 
wfpsruntimes.icp4a.ibm.com