Uninstalling IBM Cloud Pak for Watson AIOps
These instructions can be used to uninstall an online or offline (airgap) deployment of IBM Cloud Pak® for Watson AIOps, and to clean up the resources that it created.
Before you begin
The oc_cli
must be installed on your Red Hat® OpenShift® Container Platform cluster, and you must be logged in with oc login
.
1. Run the uninstall script
Download the uninstall and cleanup script from here.
You can configure the script to uninstall and clean up your IBM Cloud Pak for Watson AIOps deployment. Details on how to configure the script are provided in the same location.
You can configure which components and resources that were created by the IBM Cloud Pak for Watson AIOps deployment are removed by the script. Review the following, and configure the script to remove them only if you are sure that they are not used by other CloudPaks on your Red Hat OpenShift cluster, and that you do not want to persist the data in them.
- Persistent Volume Claims (PVCs)
- shared components that are used by other Cloud Paks
Warning: Follow this step with caution if other IBM Cloud Paks® are installed on your Red Hat OpenShift cluster that might be sharing components and resources with your IBM Cloud Pak for Watson AIOps deployment.
2. (Optional) Delete the IBM Cloud Pak for Watson AIOps catalog
Warning: IBM Cloud Pak for Watson AIOps is part of the ibm-operator-catalog
catalog. Do not delete this catalog if you are using other operators from it.
If you do not require the ibm-operator-catalog
catalog, then remove it with one of the following methods:
Online deployments:
- Option 1: Delete the IBM Cloud Pak for Watson AIOps catalog with the Red Hat OpenShift console
- Option 2: Delete the IBM Cloud Pak for Watson AIOps catalog with the Red Hat OpenShift CLI
Air-gapped (offline) deployments:
Option 1: Delete the IBM Cloud Pak for Watson AIOps catalog with the Red Hat OpenShift console
-
In the OpenShift console, select Administration > Cluster Settings.
-
Select the Configuration tab, and then select OperatorHub from the Configuration Resource column.
-
Select the Sources tab.
-
Select the CatalogSource that you want to remove.
-
Select Delete CatalogSource from the Actions list (the three vertical dots at the end of the row).
-
Verify that the CatalogSource that you removed is not shown in Administration > Cluster Settings > Configuration > OperatorHub.
Option 2: Delete the IBM Cloud Pak for Watson AIOps catalog with the Red Hat OpenShift CLI
-
Run the following command for the catalog that you want to remove.
oc delete catalogsource -n openshift-marketplace <catalogsource>
Where
<catalogsource>
is the name of the CatalogSource that you want to delete. -
Verify that the catalog that you removed is not returned by the following command:
oc get catalogsource -n openshift-marketplace
Option 3: Delete the IBM Cloud Pak for Watson AIOps catalog in an air-gapped deployment
Note: If you have an air-gapped deployment of IBM Cloud Pak for Watson AIOps that was initially installed at a version lower than 3.5, then follow the instructions for Option 3: Delete the AI Manager catalog in an upgraded air-gapped deployment
in the IBM Cloud Pak for Watson AIOps 3.5 documentation: Uninstalling IBM Cloud Pak® for Watson AIOps IBM Cloud Pak for Watson AIOps.
If you have an air-gapped deployment of IBM Cloud Pak for Watson AIOps, then remove the catalog by using the uninstall-catalog
case action.
-
Export the following environment variables.
The local Docker registry that you specify must be the registry in your air-gapped environment that you created when you installed Cloud Pak for Watson AIOps.
export CASE_NAME=ibm-cp-waiops export CASE_VERSION=1.7.0 export CASE_INVENTORY_SETUP=cpwaiopsSetup export TARGET_REGISTRY_HOST=<IP_or_FQDN_of_target_registry> export TARGET_REGISTRY_PORT=<port_number_of_target_registry> export TARGET_REGISTRY=$TARGET_REGISTRY_HOST:$TARGET_REGISTRY_PORT
-
Run the
uninstall-catalog
CASE action.oc ibm-pak launch $CASE_NAME \ --version $CASE_VERSION \ --action uninstall-catalog \ --inventory $CASE_INVENTORY_SETUP \ --namespace openshift-marketplace \ --args "--registry $TARGET_REGISTRY --recursive \ --inputDir ~/.ibm-pak/data/cases/$CASE_NAME/$CASE_VERSION"
-
Verify that the catalog that you removed is not returned by the following command:
oc get catalogsource -n openshift-marketplace
Note: If you are using IBM Storage Fusion or IBM Spectrum Scale Container Native storage, and some IBM® Automation foundation components remain after you complete uninstallation, then see the troubleshooting guidance in the
IBM Cloud Pak foundational services documentation.
If the uninstallation fails, or is not complete and is not progressing, then see Troubleshooting installation and upgrade to help you identify any installation problems.