6 Uninstalling OCNADD
This chapter provides information on how to uninstall Oracle Communications Network Analytics Data Director (OCNADD).
When you uninstall a helm chart from the OCNADD deployment, it removes only the Kubernetes objects created during the installation.
Note:
kubectl
commands might vary based on the platform deployment. Replace
kubectl
with Kubernetes environment-specific
command line tool to configure kubernetes resources through kube-api server. The
instructions provided in this document are as per the Oracle Communications Cloud
Native Core, Cloud Native Environment (CNE) version of kube-api server.
Caution:
- While deleting any OCNADD resources make sure to provide the corresponding namespace used in the deployment.
- Based on requirement, make sure to retain the OCNADD backup before the uninstallation procedure. For more information, see Performing OCNADD Backup Procedures.
- Ensure any configured datafeeds are deleted using the OCNADD GUI prior to performing the OCNADD uninstallation steps. For deletion of the datafeeds, refer to Oracle Communications Network Analytics Data Director User Guide.
Uninstalling OCNADD in Non-Centralized Deployment Mode
To uninstall OCNADD in a Non-Centralized deployment mode, run the following command:
helm uninstall <ocnadd-release-name> --namespace <ocnadd-namespace>
Where,
<ocandd-release-name>
is the release name of the OCNADD
deployment.
<ocndd-namespace>
is the name the namespace of OCNADD deployment.
helm uninstall ocnadd -namespace ocnadd-deploy
Cleaning Up Database
- Log in to the MySQL client on SQL Node with the OCNADD user and
password:
mysql -h <IP_adress of SQL Node> -u <ocnadduser> -p (Give password in prompt)
- To clean up the configuration, alarm, and health database,
run the following
command:
mysql> drop database <dbname>;
- To remove MySQL users while uninstalling OCNADD, run the following
commands:
SELECT user FROM mysql.user; DROP USER 'ocnaddappuser@'%';
Cleaning up Kafka Configuration
- To list the secrets in the namespace, run the following
command:
kubectl get secrets -n <namespace>
- To delete all the secrets related to Kafka, run the
following
command:
kubectl delete secret --all -n <namespace>
- To delete configmap used for Kafka, run the following
command:
kubectl delete configmap --all -n <namespace>
- To delete PVCs used for Kafka,
- run the following command, and list the PVCs used
in the
namespace:
kubectl get pvc -n <namespace>
- run the following command, and delete the PVCs used
by the brokers and
zookeepers:
kubectl delete pvc --all -n <namespace>
- run the following command, and list the PVCs used
in the
namespace:
Verifying Uninstallation
To verify the Oracle Communications Network Analytics Data Director (OCNADD) uninstallation, run the following command:
kubectl get all -n <release-namespace>
In case of successful uninstallation, no OCNADD resource is displayed in the command output.
- Run the following command to delete all the objects:
- To delete all the Kubernetes
objects:
kubectl delete all --all -n <release-namespace>
Caution:
The command deletes all the Kubernetes objects of the specified namespace. In case, you have created the RBAC resources and service accounts before the helm installation in the same namespace, and these resources are required, then do not delete them.
- To delete all the Kubernetes
objects:
- Run the following command to delete the specific
resources:
kubectl delete <resource-type> <resource-name> -n <release-namespace>
- Run the following command to delete the Kubernetes
namespace:
kubectl delete namespace <release-namespace>
Example:kubectl delete namespace ocnadd
Caution:
The command removes all the resources or objects created in the namespace. Therefore, ensure that you run the command only when you want to delete the namespace completely.
Uninstalling OCNADD in Centralized Deployment Mode
- Uninstall the worker groups one after another using the following command:
helm uninstall <worker-group-release-name> --namespace <worker-group-namespace>
For example:helm uninstall ocnadd-wg1 -namespace dd-worker-group1
- Clean up Kafka Configuration for all the worker groups.
To clean up the Kafka configuration, perform the following steps for all the worker groups:
- To list the secrets in the namespace, run the following
command:
kubectl get secrets -n <worker-group-namespace>
- To delete all the secrets related to Kafka, run the following
command:
kubectl delete secret --all -n <worker-group-namespace>
- To delete configmap used for Kafka, run the following
command:
kubectl delete configmap --all -n <worker-group-namespace>
- To delete PVCs used for Kafka,
- run the following command, and list the PVCs used in the
namespace:
kubectl get pvc -n <worker-group-namespace>
- run the following command, and delete the PVCs used by the
brokers and zookeepers:
kubectl delete pvc --all -n <worker-group-namespace>
- run the following command, and list the PVCs used in the
namespace:
- To list the secrets in the namespace, run the following
command:
- Delete all the worker group's hns namespaces using the below
command:
kubectl hns delete <worker-group-namespace> -n <mgmt-group-namespace>
- Uninstall the management group using the following
command:
helm uninstall <management-release-name> --namespace <management-group-namespace>
For example:helm uninstall ocnadd-mgmt --namespace dd-mgmt-group
- Clean up the Database.
To clean up the database, perform the following steps:
- Log in to the MySQL client on SQL Node with the OCNADD user and
password:
mysql -h <IP_address of SQL Node> -u <ocnadduser> -p
- To clean up the configuration, alarm, and health database, run the
following command: pass the database names in
mysql> drop database <dbname>;
- To remove MySQL users while uninstalling OCNADD, run the following
commands:
SELECT user FROM mysql.user; DROP USER 'ocnaddappuser@'%';
- Log in to the MySQL client on SQL Node with the OCNADD user and
password:
Verifying Uninstallation
- Check the sub namespaces exists
kubectl hns tree <mgmt-group-namespace>
- If the output list any sub namespaces then perform the
following:
kubectl hns delete <worker-group-namespace> -n <mgmt-group-namespace>
- If the output list any sub namespaces then perform the
following:
- Check the parent namespace
kubectl get all -n <management-group-namespace>
In case of successful uninstallation, no OCNADD resource is displayed in the command output.
If the command output displays the OCNADD resources or objects, then perform the following procedure:- Run the following command to delete all the objects:
- To delete all the Kubernetes
objects:
kubectl delete all --all -n <mgmt-group-namespace>
Caution:
The command deletes all the Kubernetes objects of the specified namespace. In case, you have created the RBAC resources and service accounts before the helm installation in the same namespace, and these resources are required, then do not delete them. - Run the following command to delete the specific
resources:
kubectl delete <resource-type> <resource-name> -n <management-group-namespace>
- Run the following command to delete the management
group
namespace:
kubectl delete namespace <management-group-namespace>
For example:kubectl delete namespace ocnadd-deploy
Caution:
The command removes all the resources or objects created in the namespace. Therefore, ensure that you run the command only when you want to delete the namespace completely.
- To delete all the Kubernetes
objects:
- Run the following command to delete all the objects: