Maximo

 View Only

 MAS Uninstallation using Ansible Playbook

Dhiraj Panjwani's profile image
Dhiraj Panjwani posted Fri January 31, 2025 03:36 AM

Hi,

I have been trying to uninstall MAS 9 workspace through Ansible playbook using the IBM provided documentation : Uninstalling Maximo Application Suite.

But as these uninstall pipeline runs it tried to uninstall applications like Predict, Assist which are not at all installed and resulting pipeline failure and uninstall process getting stopped.  Here is one of the error in the pipeline: Failed to find API for resource with apiVersion "apps.mas.ibm.com/v1" and kind "PredictWorkspace"

While I understand there is another way to delete the MAS from OpenShift but wanted to check if anyone has tried uninstalling Workspace using the mas uninstall ( using IBM link provided above) and were successfully able to delete the MAS workspace.

Thanks,

Dhiraj Panjwani

Matheus Silva's profile image
Matheus Silva

This play book (https://ibm-mas.github.io/ansible-devops/playbooks/uninstall-core/) will only uninstall MAS Core, and, as stated in the top, if you have applications installed in your suite (Manage, MVI, Monitor, etc) it will fail as you first need to uninstall (remove) them.

So, make sure you have nothing installed in your workspace before attempting running the uninstall playbook.

Try the MAS CLI via Docker, which is the most updated version of install/update/uninstall modes for MAS Suite.

docker run --pull always -ti --rm -v /c/mas8/Env:/path/in/container quay.io/ibmmas/cli #WindowsOS
docker run --pull always -ti --rm -v /home/docker-engine:/path/in/container quay.io/ibmmas/cli # Linux/CentOS
You just need to follow the inputs. You'll need the OpenShift credentials  to run any of the commands after you pull the images.
But if you already have all dependencies uninstalled and you are still getting errors, you need to check for the Custom Resources Logs in your OpenShift, specially the ManageWorkspace CRD, maybe the server Bundles, Manage Deploy CRD as well or from other applications.
Andrey Ilinskiy's profile image
Andrey Ilinskiy

If you need to delete MAS complete from OCP, you can just delete namespaces and it will delete all custom resources and all other stuff. 

If deleting the project will "stuck", then you need to manually edit custom resources and delete the finalizer section, for example:

  finalizers:
    - manageworkspace.apps.mas.ibm.com/finalizer
to find all CRs that should be patched, I use that query:
kubectl api-resources --verbs=list --namespaced -o name   | xargs -n 1 kubectl get --show-kind --ignore-not-found -n [YOUR_NAMESPACE]