Uninstalling WebSphere Automation
You can uninstall the WebSphere Automation instance and
operator with Red Hat®
OpenShift® CLI (oc
)
commands.
Before you begin
Set the environment variables for the WebSphere Automation operator namespace, the instance namespace, and the instance name. These values might be the same, or they might be different. For example, the default steps for installation with the Red Hat OpenShift console use the following namespaces and instance name:
WSA_OPERATOR_NAMESPACE=openshift-operators
WSA_INSTANCE_NAMESPACE=websphere-automation
WSA_INSTANCE_NAME=wsa
- Log in to the Red Hat OpenShift cluster as a cluster administrator.
- Uninstall the WebSphere Automation instance.
- Uninstall the WebSphere Automation operator.
Uninstalling the WebSphere Automation instance
To uninstall the WebSphere Automation instance, run
oc
commands that delete resources. Be sure to set the
WSA_INSTANCE_NAMESPACE
environment variable.
- Delete the
WebSphereHealth
,WebSphereSecure
, andWebSphereAutomation
custom resources.oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found webspherehealth --all oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found webspheresecure --all oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found websphereautomation --all
These delete commands remove all WebSphere Automation containers but leave some persistent storage resources.
- Delete WebSphere Automation resources that
are related to persistent storage.Tip: You do not need to remove Persistent Volume Claims (PVC) and other related resources if you are planning to reinstall WebSphere Automation in the same namespace and want to use the same data in the new instance.
WSA_PVCS=$(oc -n $WSA_INSTANCE_NAMESPACE get pvc -o name | grep mongo | cut -d/ -f2) oc -n $WSA_INSTANCE_NAMESPACE delete pvc $WSA_PVCS
- For versions before 1.6.0, delete IBM Automation foundation and IBM Cloud Pak foundational services resources.
If no other Cloud Paks are installed in the cluster and you want to completely remove IBM Automation foundation, including IBM Cloud Pak foundational services, see Uninstalling IBM Automation foundation.
- For versions 1.6.0 and higher, delete IBM Cloud Pak foundational services resources.Remove IBM Cloud Pak foundational services resources by running the following commands:If no other Cloud Paks are installed and you want to completely remove IBM Cloud Pak foundational services, see Uninstalling foundational services
oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found zenservice iaf-zen-cpdservice oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found kafkatopics --selector ibmevents.ibm.com/cluster=iaf-system oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found serviceaccount ibm-common-service-operator oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found secret metastore-secret oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found secret external-tls-secret oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found secret wsa-external-tls-secret oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found secret iaf-system-automationui-aui-zen-ca oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found secret iaf-system-automationui-aui-zen-cert
Uninstalling the WebSphere Automation operator
To uninstall the WebSphere Automation operator, run
oc
commands that delete the WebSphere Automation
subscription, ClusterServiceVersion
(CSV), and
CustomResourceDefinition
(CRD) resources. Be sure to set the
WSA_OPERATOR_NAMESPACE
environment variable.
- Delete the WebSphere Automation
subscription.
WSA_SUBSCRIPTION_NAME=$(oc -n $WSA_OPERATOR_NAMESPACE get subscription -o name | grep websphere-automation | cut -d/ -f2) oc -n $WSA_OPERATOR_NAMESPACE delete subscription $WSA_SUBSCRIPTION_NAME
- Remove the WebSphere Automation
ClusterServiceVersion
(CSV).WSA_CSV_NAME=$(oc -n $WSA_OPERATOR_NAMESPACE get csv -o name | grep websphere-automation | cut -d/ -f2) oc -n $WSA_OPERATOR_NAMESPACE delete csv $WSA_CSV_NAME
- Delete the WebSphere Automation
CustomResourceDefinition
(CRD) resources.WSA_CRD_NAMES=$(oc get crd -o name | grep automation.websphere | cut -d/ -f2) oc delete crd $WSA_CRD_NAMES
- Remove WebSphere Automation
ServiceAccounts and Secrets
by either deleting the OpenShift project or manually removing the WebSphere Automation operator resources.- Delete the OpenShift
project.
oc delete project $WSA_INSTANCE_NAMESPACE
If namespace deletion fails or hangs, patch out the remaining finalizers by following Step 9 of Uninstalling foundational services.
- Remove the WebSphere Automation operator resources by running the
following
commands.
oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found serviceaccount websphere-automation-operator-sa oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found serviceaccount $WSA_INSTANCE_NAME-health-webhooks-apis-sa oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found serviceaccount $WSA_INSTANCE_NAME-secure-metering-apis-sa oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found secret $WSA_INSTANCE_NAME-health-mongo-creds oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found secret $WSA_INSTANCE_NAME-mongo-admin-creds oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found secret $WSA_INSTANCE_NAME-secure-mongo-creds oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found secret $WSA_INSTANCE_NAME-mongo-ca-cert oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found secret $WSA_INSTANCE_NAME-secure-crypto oc -n $WSA_INSTANCE_NAMESPACE delete --ignore-not-found secret $WSA_INSTANCE_NAME-secure-encrypt
- Delete the OpenShift
project.