Uninstalling Data Virtualization

A project administrator can uninstall Data Virtualization from IBM® Cloud Pak for Data.

Before you begin

Required role: To complete this task, you must be an administrator of the project (namespace) where Data Virtualization is installed.

Before you uninstall Data Virtualization, ensure that the machine from which you will run the commands meets the following requirements:

  • Can connect to the cluster.
  • Has the oc command-line interface.
  • Has the Cloud Pak for Data command-line interface.
  • Has a cpd-cli profile. Ensure that the profile points to the instance of Cloud Pak for Data where Data Virtualization is installed. For details, see Creating a cpd-cli profile.

Removing Data Virtualization will remove all of the data that is associated with this instance of Data Virtualization.

Tip: For a list of all available options, enter the following command:
./cpd-cli uninstall --help

Procedure

From your installation node:

  1. From the web client, remove any provisioned instances of Data Virtualization:
    1. Log in to the Cloud Pak for Data web client as an administrator.
    2. From the menu, select Services > Instances.
    3. Filter the list to show only dv service instances.
    4. Delete all of the instances of the service.
  2. Change to the directory where you placed the Cloud Pak for Data command-line interface.
  3. Log in to your Red Hat® OpenShift® cluster as a project administrator:
    oc login OpenShift_URL:port
  4. Run the following command to ensure that there are no remaining Data Virtualization service instances in the project where Data Virtualization is deployed:
    ./cpd-cli service-instance list\
    --service-type dv \
    --profile Profile_name \
    Replace Profile_name with the name of your local profile. For details, see Creating a cpd-cli profile.
    Important: To ensure that the command returns all of the service instances, the profile must be associated with a Cloud Pak for Data user who has one of the following permissions:
    • Administer platform
    • Manage and monitor platform
  5. Verify that all service resources were removed by running the following commands:
    • Verify that all persistent volume claims (PVCs) for the Data Virtualization service were removed:
      oc get pvc | grep -i dv
    • Verify that all service secrets were removed:
      oc get secret | grep dv-secret
    • Verify that all service jobs were removed:
      oc get jobs | grep -i dv
    • Run the following command to verify that the required service instance pods are deleted:
      oc get pods | grep -i dv | grep -v dv-addon | grep -v dv-service-provider
      Note: The dv-addon and dv-service-provider service instance pods must remain running on the cluster.
    Tip: If you want to reprovision Data Virtualization, you can stop here and follow instructions in Provisioning the service. If you want to remove the service completely, you can complete this procedure to run the cpd uninstall command.
  6. Run the following command to preview the changes that will be made to the cluster when you remove Data Virtualization:
    ./cpd-cli uninstall \
    --assembly dv \ 
    --namespace Project \
    --include-dependent-assemblies \ 
    --profile Profile_name
    --dry-run

    Replace the following values:

    Variable Replace with
    Project The Red Hat OpenShift project where Data Virtualization is deployed.
    Profile_name The name of your local profile.
    Important: Review the output of the command to understand what software will be removed.

    The --include-dependent-assemblies flag automatically removes any dependencies that are not required by other services.

    For example, if Data Virtualization is the only service installed on Cloud Pak for Data, this command will uninstall Data Virtualization and the Cloud Pak for Data control plane.

    In this scenario, if you don't want to uninstall the Cloud Pak for Data control plane, you can remove the --include-dependent-assemblies flag from the command.

  7. Rerun the previous command without the --dry-run flag to remove Data Virtualization.
  8. Monitor the uninstallation by running the following commands:
    oc get pods | grep -i dv-addon
    oc get pods | grep -i dv-service-provider 
  9. Run the following commands to ensure that all service roles and settings were removed:
    oc delete rolebinding dv-rb
    oc delete role dv-role
    oc delete sa dv-sa
    oc delete scc dv-scc