Uninstalling an instance of IBM Software Hub

If you want to uninstall an instance of IBM Software Hub, you must uninstall the running instance of the control plane and services and the operators associated with the instance.

Who needs to complete this task?

Instance administrator An instance administrator can complete this task.

When do you need to complete this task?
Complete this task only if you want to completely uninstall IBM Software Hub.

If you installed multiple instances of IBM Software Hub on the cluster, you must complete this task for each instance of IBM Software Hub that you want to uninstall.

Before you begin

Best practice: You can run the commands in this task exactly as written if you set up environment variables. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in this task.

If there are any projects tethered to this instance of IBM Software Hub, complete Untethering projects from the control plane before you uninstall the instance.

About this task

Use the cpd-cli manage uninstall-components command to remove the custom resources and operators.

The instructions assume that you are removing all of the components at the same time, which enables you to complete the task in fewer steps.

Procedure

To uninstall an instance of IBM Software Hub:

  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. Uninstall the components:
    Tip: Before you run this command against your cluster, you can preview the oc commands that this command will issue on your behalf by running the command with the --preview=true option.

    The oc commands are saved to the preview.sh file in the work directory.

    cpd-cli manage uninstall-components \
    --instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --delete_all_components=true
  3. Run get-cr-status to confirm that all of the components were removed:
    cpd-cli manage get-cr-status \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  4. Uninstall the cluster-scoped resources for the instance.
    (Cluster-scoped resources include cluster roles, cluster role binding, mutating webhook configurations, and validating webhook configurations.)
    cpd-cli manage delete-cluster-scoped-resources \
    --operator_ns=${PROJECT_CPD_INST_OPERATORS} \
    --delete_all_components=false
  5. Check whether the projects for the instance still exist:
    1. Check whether the operands project still exists:
      oc get project ${PROJECT_CPD_INST_OPERANDS}
      • If the project does not exist, the command returns the following message: Error from server (Not Found)
      • If the project still exists, the command returns information about the project.
    2. If the project still exists, delete it:
      oc delete project ${PROJECT_CPD_INST_OPERANDS}
    3. Check whether the operators project still exists:
      oc get project ${PROJECT_CPD_INST_OPERATORS}
      • If the project does not exist, the command returns the following message: Error from server (Not Found)
      • If the project still exists, the command returns information about the project.
    4. If the project still exists, delete it:
      oc delete project ${PROJECT_CPD_INST_OPERATORS}