6 Uninstalling NSSF

This chapter provides information about uninstalling Oracle Communications Cloud Native Core, Network Slice Selection Function (NSSF).

6.1 Uninstalling NSSF Using Helm

To uninstall NSSF, run the following command:

helm uninstall <helm-release> --namespace <release-namespace> 

Where,

<helm-release> is a name provided by the user to identify the helm deployment.

<release-namespace> is a name provided by the user to identify the namespace of NSSF deployment.

For example:

helm uninstall ocnssf --namespace ocnssf

Helm keeps a record of its releases, so you can still reactivate the release after uninstalling it.

To completely remove a release from the cluster, add the --purge parameter to helm delete command:

helm delete --purge release_name

For example:

helm delete --purge ocnssf

To verify the NSSF uninstallation, run the following command:

$ kubectl get all -n <release-namespace>

In case of successful uninstallation, no NSSF resource is displayed in the command output.

If the command output displays the NSSF resources or objects, then perform Deleting Kubernetes Resources.

If the command output displays any Kubernetes namespace, then perform the Deleting Kubernetes Namespace.

6.2 Deleting Kubernetes Namespace

This section describes how to delete Kubernetes namespace where NSSF is deployed.

To delete Kubernetes namespace, run the following command:

kubectl delete namespace <release_namespace>

Where,

<release_namespace> is the deployment namespace used by the Helm command.

For example:

kubectl delete namespace ocnssf

6.3 Deleting Kubernetes Resources

This section describes how to delete Kubernetes resources or objects where NSSF is deployed.

  1. Run the following command to delete all the Kubernetes objects:
    kubectl delete all --all -n <release-namespace>
  2. Run the following command to delete all the configmaps:
    kubectl delete cm --all -n <release-namespace>

    Caution:

    If the user has created RBAC and service account details before Helm, installing in the same namespace is required, do not delete RBAC and service account details. In case a custom service account is not provided by the user, and it is safe to remove it, then run the following commands to delete the resources or objects which are not required.
  3. Run the following command to delete the specific resources:
    kubectl delete <resource-type> <resource-name> -n <release-namespace>

6.4 Removing Database Users

This section describes how to remove MySQL users.

To remove MySQL users while uninstalling NSSF, run the following commands:

Remove Privileged User:

$ DROP USER IF EXISTS <NSSF Privileged-User Name>;

For example:

$ DROP USER IF EXISTS nssfprivilegedusr';

Remove Application User:

$ DROP USER IF EXISTS <NSSF Application User Name>;

For example:

$ DROP USER IF EXISTS nssfusr;

Caution:

Removal of users must be done on all the SQL nodes for all NSSF sites.

6.5 Cleaning up Database

This section describes how to clean up database when uninstalling NSSF.

6.5.1 Single Site

Run the following command to remove NSSF database on single site setup:

Remove State Database:

$ DROP DATABASE if exists <NSSF state database>;

For example:

$ DROP DATABASE if exists nssfStateDB;

Remove Provisional Database:

$ DROP DATABASE if exists <NSSF provision database>;

For example:

$ DROP DATABASE if exists nssfProvSiteDB;

Remove Release Database:

$ DROP DATABASE if exists <NSSF release database>;

For example:

$ DROP DATABASE if exists ocnssfReleaseDB;

Remove Leaderpod Database:

$ DROP DATABASE if exists <NSSF Leaderpod Database>;

For example:

$ DROP DATABASE if exists LeaderPodDb;

6.5.2 Multisite

Run the following command to remove NSSF database on multisite setup:

Note:

For georedundant deployments, do not remove the State and Release database directly. Wait until all the sites are down first, then remove the database.

Note:

For georedundant deployment, run the commands provided in this section only if the site being uninstalled is the last site in the complete georedundant group.

Remove State Database:

$ DROP DATABASE if exists <NSSF state database>;

For example:

$ DROP DATABASE if exists nssfStateDB;

Remove Provisional Database:

$ DROP DATABASE if exists <NSSF provision database>;

For example:

Site 1:

$ DROP DATABASE if exists nssfProvSite1DB;

Site 2:

$ DROP DATABASE if exists nssfProvSite2DB;

Site 3:

$ DROP DATABASE if exists nssfProvSite3DB;

Remove Release Database:

$ DROP DATABASE if exists <NSSF release database>;

For example:

$ DROP DATABASE if exists ocnssfReleaseDB;

Remove Leaderpod Database:

$ DROP DATABASE if exists <NSSF Leaderpod Database>;

For example:

Site 1:

$ DROP DATABASE if exists LeaderPod1Db;

Site 2:

$ DROP DATABASE if exists LeaderPod2Db;

Site 3:

$ DROP DATABASE if exists LeaderPod3Db;