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.
- The command
kubectl delete alldeletes all the Kubernetes objects in 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. - The command
kubectl delete namespaceremoves 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.
6.1 Uninstalling Worker Group
To uninstall a worker group, all the associated sub-groups (relay agent and mediation)
should be uninstalled. The steps below are listed only once, but they should be repeated
for all relay agent and mediation groups that should be uninstalled. All mediation
groups should be uninstalled one after another, and then the relay agent group should be
uninstalled. Replace the <ocnadd-group-namespace> with the relay
agent or mediation group namespace.
- Run the following command to uninstall the OCNADD
group:
helm uninstall <ocnadd-group-release-name> --namespace <ocnadd-group-namespace>For example:
helm uninstall dd-med --namespace ocnadd-med helm uninstall dd-ra --namespace ocnadd-relay - Clean up Kafka Configuration for all mediation and relay agent groups.
To clean up the Kafka configuration, perform the following steps:
- To list the secrets in the namespace,
run:
kubectl get secrets -n <ocnadd-group-namespace> - To delete all the secrets related to Kafka,
run:
kubectl delete secret --all -n <ocnadd-group-namespace> - To delete the configmap used for Kafka,
run:
kubectl delete configmap --all -n <ocnadd-group-namespace> - To delete PVCs used for Kafka:
- Run the following command to list the PVCs used in the
namespace:
kubectl get pvc -n <ocnadd-group-namespace> - Run the following command to delete the PVCs used by the brokers and
Kraft
controllers:
kubectl delete pvc --all -n <ocnadd-group-namespace>
- Run the following command to list the PVCs used in the
namespace:
- To list the secrets in the namespace,
run:
- Run the following command to delete all the objects:
- To delete all the Kubernetes
objects:
kubectl delete all --all -n <ocnadd-group-namespace> - Run the following command to delete specific
resources:
kubectl delete <resource-type> <resource-name> -n <ocnadd-group-namespace>
- To delete all the Kubernetes
objects:
- Delete all the relay agent and mediation group namespaces using the
command:
kubectl delete namespace <ocnadd-group-namespace>
6.2 Uninstalling Management Group
- Uninstall the management group using the following
command:
helm uninstall <management-release-name> --namespace <management-group-namespace>For example:
helm uninstall dd-mgmt --namespace ocnadd-mgmt - Check the management group
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 OCNADD resources or objects, then perform the following procedure to delete all the objects:
- To delete all the Kubernetes
objects:
kubectl delete all --all -n <mgmt-group-namespace> - 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-mgmt
- To delete all the Kubernetes
objects:
- Clean up the Database.
To clean up the database, perform the following steps:
- Log in to the MySQL client on the SQL Node with the
ocnadduserand password:mysql -h <IP_address of SQL Node> -u <ocnadduser> -p - To clean up the configuration, alarm, and health database, run the following
command and pass the database
names:
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 the SQL Node with the