Unistallation Scripts for aiml-fw 88/9688/4
authorashishj1729 <jain.ashish@samsung.com>
Thu, 17 Nov 2022 09:57:55 +0000 (15:27 +0530)
committerashishj1729 <jain.ashish@samsung.com>
Thu, 17 Nov 2022 10:18:29 +0000 (15:48 +0530)
Issue-Id: AIMLFW-4

Signed-off-by: ashishj1729 <jain.ashish@samsung.com>
Change-Id: Ib2c7f79564ffec56781c04fb49844ef6afbf234a
Signed-off-by: ashishj1729 <jain.ashish@samsung.com>
bin/uninstall.sh [new file with mode: 0755]
bin/uninstall_databases.sh [new file with mode: 0755]
bin/uninstall_rolebindings.sh [new file with mode: 0755]
bin/uninstall_traininghost.sh [new file with mode: 0755]

diff --git a/bin/uninstall.sh b/bin/uninstall.sh
new file mode 100755 (executable)
index 0000000..ee5a603
--- /dev/null
@@ -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 (executable)
index 0000000..91ef683
--- /dev/null
@@ -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 (executable)
index 0000000..f0829fa
--- /dev/null
@@ -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 (executable)
index 0000000..a649855
--- /dev/null
@@ -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