Uninstalling Data Virtualization

An instance administrator can uninstall Data Virtualization.

Who needs to complete this task?

Instance administrator To uninstall Data Virtualization, 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.

The tethered projects for the instance
If any projects are tethered to the operands project, you have permission to manage the software in the tethered projects.
When do you need to complete this task?

Complete this task if you want to remove Data Virtualization 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 Data Virtualization on the cluster.

Information you need to complete this task

Review the following information before you uninstall Data Virtualization:

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 Data Virtualization:

  1. Deleting service instances
  2. Deleting optional configuration files.
  3. Uninstalling the service

Deleting service instances

Before you uninstall Data Virtualization, you must delete any service instances that are associated with Data Virtualization to ensure that each instance releases the resources that it reserved.
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 Data Virtualization.
From the IBM Software Hub web client:
  1. Log in to the web client as a user with sufficient permissions to complete the task.
  2. From the menu, select Services > Instances.
  3. Filter the list to show the data-virtualization type.
  4. Delete each data-virtualization instance in the list.
Note: If you want to reprovision a Data Virtualization instance in a given namespace, delete the data-virtualization instance in that namespace and then reprovision the instance. Do not complete the steps in Uninstalling the service.

Deleting optional configuration files

If you are deleting service instances in tethered namespaces, you must manually delete the following configuration files:
  • cpd-dv-aux-ckpt-cm configmap
  • dv-aux-br-cm configmap

If you have configured either of the following two optional resources in your deployment, you must manually delete them only if no other services are using these two secrets:

  • krb5-config-files configmap
  • connection-ca-certs secret

Delete these files from the namespace where you just deleted the tethered instance in the Deleting service instances step. For example, if you deleted a data-virtualization instance from namespace tethered-1, delete the configmaps and the secret from the tethered-1 namespace.

Uninstalling the service

To uninstall Data Virtualization:

  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 Data Virtualization service.
    cpd-cli manage delete-cr \
    --components=dv \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
    Note: When you delete the service by using the cpd-cli command, running instances are not deleted from the OpenShiftcluster.
    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. Conditional: Depending on how you installed Data Virtualization, complete the following.
    OLM install
    If you installed Data Virtualization through the OLM method:
    1. Delete the OLM objects for Data Virtualization:
      cpd-cli manage delete-olm-artifacts \
      --cpd_operator_ns=${PROJECT_CPD_INST_OPERATORS} \
      --components=dv

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

      [SUCCESS]... The delete-olm-artifacts command ran successfully
    Non-OLM install
    If you installed Data Virtualization through the non-OLM method:
    1. Run this command to remove Data Virtualization:
      cpd-cli manage uninstall-components \
      --instance_ns=${PROJECT_CPD_INST_OPERATORS} \
      --components=dv \
      --include_dependency=true
    2. Optional: If you want to delete the cluster-scoped Kubernetes resources associated with Data Virtualization, run this command:

      See also: managedelete-cluster-scoped-resources.

      cpd-cli manage delete-cluster-scoped-resources \
      --operator_ns=${PROJECT_CPD_INST_OPERATORS} \
      --components=dv \
      --include_dependency=true

What to do next

If IBM Db2 Data Management Console was installed as part of Prerequisite services when you installed Data Virtualization and it is longer required, you can uninstall Db2 Data Management Console. For more information, see Uninstalling Db2 Data Management Console.