2 ################################################################################
3 # Copyright (c) 2020 AT&T Intellectual Property. #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
18 echo "===> Starting at $(date)"
20 echo && echo "===> Cleaning up any previous SMO deployment"
21 echo "======> Deleting all Helm deployments"
22 helm list | sed -e 1d | cut -f1 | xargs helm delete --purge
24 echo "======> Clearing out all ONAP deployment resources"
25 kubectl delete ns onap
26 kubectl get pv --all-namespaces |cut -f1 -d' ' |xargs kubectl delete pv
27 kubectl get clusterrolebindings | grep onap | cut -f1 -d' ' |xargs kubectl delete clusterrolebindings
28 rm -rf /dockerdata-nfs
30 echo "======> Clearing out all RICAUX deployment resources"
31 kubectl delete ns ricaux
32 kubectl delete ns ricinfra
33 rm -rf /opt/data/dashboard-data
35 echo "======> Clearing out all NONRTRIC deployment resources"
36 kubectl delete ns nonrtric
38 echo "===> Completing at $(date)"