Uninstalling watsonx.governance

An instance administrator can uninstall watsonx.governance.

Who needs to complete this task?

Instance administrator To uninstall watsonx.governance, you must be an instance administrator. An instance administrator has permission to manage software in the following projects:

The operators project for the instance

The operators for this instance of IBM® Software Hub are installed in the operators project. In the uninstall commands, the ${PROJECT_CPD_INST_OPERATORS} environment variable refers to the operators project.

The operands project for the instance

The IBM Software Hub control plane and the services for this instance of IBM Software Hub are installed in the operands project. In the uninstall commands, the ${PROJECT_CPD_INST_OPERANDS} environment variable refers to the operands project.

When do you need to complete this task?

Complete this task if you want to remove watsonx.governance from an instance of IBM Software Hub.

Repeat as needed If you are responsible for multiple instances of IBM Software Hub, you can repeat this task to remove other instances of watsonx.governance on the cluster.

Information you need to complete this task

Review the following information before you uninstall watsonx.governance:

Environment variables
The commands in this task use environment variables so that you can run the commands exactly as written.
  • If you don't have the script that defines the environment variables, see Setting up installation environment variables.
  • To use the environment variables from the script, you must source the environment variables before you run the commands in this task. For example, run:
    source ./cpd_vars.sh

Procedure

Complete the following tasks to uninstall watsonx.governance:

  1. Deleting the service instance
  2. Uninstalling the service

Deleting the service instance

If you installed the OpenPages service when you installed watsonx.governance, you must delete the OpenPages service instance if either of the following statements are true:
  • You plan to uninstall the OpenPages service
  • You plan to uninstall watsonx.governance
Who needs to complete this task?
A user with the Manage service instances permission must complete this task.
When do you need to complete this task?
Complete this task before you uninstall watsonx.governance.
Delete the OpenPages service instance that is associated with watsonx.governance:
For OpenPages:
Delete the instance by running the following command:
./cpd-cli service-instance delete openpagesinstance-cr --profile=${CPD_PROFILE_NAME}
If a custom instance was used instead of the default openpagesinstance-cr instance, retrieve that information from the watsonx.governance custom resource property openpagesInstanceCR.

Then replace openpagesinstance-cr in the command with your custom instance.

Uninstalling the service

To uninstall watsonx.governance:

  1. Log the cpd-cli in to the Red Hat® OpenShift® Container Platform cluster:
    ${CPDM_OC_LOGIN}
    Remember: CPDM_OC_LOGIN is an alias for the cpd-cli manage login-to-ocp command.
  2. Delete the custom resource for the service you want removed:
    All watsonx.governance components
    cpd-cli manage delete-cr \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --components=watsonx_governance \
    --include_dependency=true
    Wait for the cpd-cli to return the following message before you proceed to the next step:
    [SUCCESS]... The delete-cr command ran successfully

    AI Factsheets only
    - oc patch watsonxgovernance watsonxgovernance-cr \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    --type=merge -p '{"spec":{"enableFactsheet": false}}'
    
    - oc delete FACTSHEET factsheet-cr \
    --namespace ${PROJECT_CPD_INST_OPERANDS}
    Wait for the cpd-cli to return the following message before you proceed to the next step:
    [SUCCESS]... The delete-cr command ran successfully

    OpenPages only
    - oc patch watsonxgovernance watsonxgovernance-cr \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    --type merge -p '{"spec":{"enableOpenpages": false}}'
    
    - oc delete OpenPagesService openpagesservice-cr \
    --namespace ${PROJECT_CPD_INST_OPERANDS}
    Wait for the cpd-cli to return the following message before you proceed to the next step:
    [SUCCESS]... The delete-cr command ran successfully

    Watson OpenScale only
    - oc patch watsonxgovernance watsonxgovernance-cr \
    --namespace ${PROJECT_CPD_INST_OPERANDS} \
    --type merge -p '{"spec":{"enableOpenscale": false}}'
    
    - oc delete WOService aiopenscale \
    --namespace ${PROJECT_CPD_INST_OPERANDS}
    
    - oc delete WOService openscale-defaultinstance \
    --namespace ${PROJECT_CPD_INST_OPERANDS}
    Wait for the cpd-cli to return the following message before you proceed to the next step:
    [SUCCESS]... The delete-cr command ran successfully

  3. Delete the OLM objects for the service you want removed:
    All watsonx.governance components
    cpd-cli manage delete-olm-artifacts \
    --cpd_operator_ns=${PROJECT_CPD_INST_OPERATORS} \
    --components=watsonx_governance \
    --include_dependency=true -vvv

    Wait for the cpd-cli to return the following message:

    [SUCCESS]... The delete-olm-artifacts command ran successfully

    AI Factsheets only
    cpd-cli manage delete-olm-artifacts \
    --cpd_operator_ns=${PROJECT_CPD_INST_OPERATORS} \
    --components=factsheet \
    --include_dependency=true -vvv

    Wait for the cpd-cli to return the following message:

    [SUCCESS]... The delete-olm-artifacts command ran successfully

    OpenPages only
    cpd-cli manage delete-olm-artifacts \
    --cpd_operator_ns=${PROJECT_CPD_INST_OPERATORS} \
    --components=openpages \
    --include_dependency=true -vvv

    Wait for the cpd-cli to return the following message:

    [SUCCESS]... The delete-olm-artifacts command ran successfully

    Watson OpenScale only
    cpd-cli manage delete-olm-artifacts \
    --cpd_operator_ns=${PROJECT_CPD_INST_OPERATORS} \
    --components=openscale \
    --include_dependency=true -vvv

    Wait for the cpd-cli to return the following message:

    [SUCCESS]... The delete-olm-artifacts command ran successfully