5 Uninstalling SCP
SCP can be uninstalled as follows. Execute the following steps from a server that has access to Kubectl and helm commands.
- Execute the following command to uninstall SCP:
- In case of Helm
2:
$ helm del --purge <release_name>
- In case of Helm 3:
helm uninstall <release_name> --namespace <namespace>
- In case of Helm
2:
- Execute the following command to remove SCP custom resources definitions:
$ kubectl get crds -o name | grep <SCP_deployment_namespace>.oracle.io | xargs kubectl delete
Example:
$ kubectl get crds -o name | grep scp.oracle.io | xargs kubectl delete
- Execute the following command to delete the
namespace:
$ kubectl delete namespace <SCP_deployment_namespace>
Note: Deleting the namespace deletes all the other kubernetes objects in that namespace.
- (Optional) In case ingress-gateway is installed, execute the following
command to uninstall the ingress-gateway:
- In case of Helm
2:
$ helm del --purge <ingress-gateway_namespace>
- In case of Helm 3:
helm uninstall <release_name> --namespace <ingress-gateway_namespace>
- In case of Helm
2:
- Execute the following steps to cleanup DB:
- Login to mysql client
on SQL NODE with scp user and password:
mysql -h <IP_adress of SQL Node> -uscpuser -pscppass
- Change to scp db and drop the following
tables:
mysql> use ocscpdb; mysql> drop table CANARY_RELEASES; mysql> drop table ENGINEERING_CONFIGURATIONS; mysql> drop table MEDIATION_CONFIGURATIONS; mysql> drop table NF_PROFILES; mysql> drop table NF_PROFILE_HASHES; mysql> drop table NF_RESOURCE_MAPPINGS; mysql> drop table NF_SERVICE_GROUPS; mysql> drop table NF_SUBSCRIPTIONS; mysql> drop table NRF_NF_DETAILS; mysql> drop table ROUTING_OPTIONS; mysql> drop table ReleaseConfig; mysql> drop table SCP_NF_PROFILES; mysql> drop table SYSTEM_OPTIONS; mysql> drop table SiteJsonSchemaVersionInfo; mysql> drop table TOPOLOGY_SOURCE_INFO;
- Optionally, AMF and SMF
subscriber data tables should be dropped if SDS app was enabled
and old subscriber data need to be purged before new
installation.
mysql> drop table SubscriberAmfBindingPei; mysql> drop table SubscriberAmfBindingGpsi; mysql> drop table SubscriberAmfBindingData; mysql> drop table SubscriberSmfBindingData;
- Make sure no pod exists. This should be done to make sure that
no new connections are made when we kill connections in the
coming steps. Execute the following command to check if there
are any
pods:
kubectl get pods -n <namespace>
- Login to mysql client
on SQL NODE with scp user and password: