From e38092f8e43a23f48e33611f9e8d788e0f8832ed Mon Sep 17 00:00:00 2001 From: ashishj1729 Date: Thu, 17 Nov 2022 15:27:55 +0530 Subject: [PATCH] Unistallation Scripts for aiml-fw Issue-Id: AIMLFW-4 Signed-off-by: ashishj1729 Change-Id: Ib2c7f79564ffec56781c04fb49844ef6afbf234a Signed-off-by: ashishj1729 --- bin/uninstall.sh | 24 ++++++++++++++++++++++++ bin/uninstall_databases.sh | 24 ++++++++++++++++++++++++ bin/uninstall_rolebindings.sh | 23 +++++++++++++++++++++++ bin/uninstall_traininghost.sh | 13 +++++++++++++ 4 files changed, 84 insertions(+) create mode 100755 bin/uninstall.sh create mode 100755 bin/uninstall_databases.sh create mode 100755 bin/uninstall_rolebindings.sh create mode 100755 bin/uninstall_traininghost.sh diff --git a/bin/uninstall.sh b/bin/uninstall.sh new file mode 100755 index 0000000..ee5a603 --- /dev/null +++ b/bin/uninstall.sh @@ -0,0 +1,24 @@ +# ================================================================================== +# +# Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ================================================================================== + +COMPONENTS="tm data-extraction kfadapter aiml-dashboard aiml-notebook" + +for component in $COMPONENTS; do + echo "Uninstalling $component" + helm uninstall $component +done diff --git a/bin/uninstall_databases.sh b/bin/uninstall_databases.sh new file mode 100755 index 0000000..91ef683 --- /dev/null +++ b/bin/uninstall_databases.sh @@ -0,0 +1,24 @@ +# ================================================================================== +# +# Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ================================================================================== + +#Uninstall databases +helm delete tm-db -n traininghost +kubectl delete pvc data-tm-db-postgresql-0 -n traininghost +helm delete cassandra -n traininghost +sleep 10 +kubectl delete pvc data-cassandra-0 -n traininghost diff --git a/bin/uninstall_rolebindings.sh b/bin/uninstall_rolebindings.sh new file mode 100755 index 0000000..f0829fa --- /dev/null +++ b/bin/uninstall_rolebindings.sh @@ -0,0 +1,23 @@ +# ================================================================================== +# +# Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ================================================================================== + +# For removing secrets in Kubeflow-Pipeline and SDK + +kubectl delete rolebinding traininghost_default_secret_rb -n kubeflow +kubectl delete rolebinding secret_pipline_runner_rb -n traininghost +kubectl delete clusterrole secret_reader diff --git a/bin/uninstall_traininghost.sh b/bin/uninstall_traininghost.sh new file mode 100755 index 0000000..a649855 --- /dev/null +++ b/bin/uninstall_traininghost.sh @@ -0,0 +1,13 @@ +bin/uninstall.sh +bin/uninstall_databases.sh +helm repo remove local +sudo helm plugin uninstall servecm + + +tools/kubeflow/bin/uninstall_kubeflow.sh +tools/leofs/bin/uninstall_leofs.sh +bin/uninstall_rolebindings.sh +kubectl delete namespace traininghost + +tools/nfs/delete_nfs_subdir_external_provisioner.sh +tools/kubernetes/uninstall_k8s.sh \ No newline at end of file -- 2.16.6