Merge "mecm-mepm uninstall playbook added"
authorGaurav Agrawal <gaurav.agrawal@huawei.com>
Wed, 28 Oct 2020 12:56:49 +0000 (12:56 +0000)
committerGerrit Code Review <gerrit@akraino.org>
Wed, 28 Oct 2020 12:56:49 +0000 (12:56 +0000)
ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/main.yml
ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/uninstall.yml [new file with mode: 0644]

index 1fa1bf9..7faf1bd 100644 (file)
@@ -18,4 +18,9 @@
 
 # tasks file for eg_mecm-mepm
 - include: "install.yml"
+  static: false
   when: operation == 'install'
+
+- include: "uninstall.yml"
+  static: false
+  when: operation == 'uninstall'
diff --git a/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/uninstall.yml b/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/uninstall.yml
new file mode 100644 (file)
index 0000000..8524b68
--- /dev/null
@@ -0,0 +1,32 @@
+#
+# Copyright 2020 Huawei Technologies Co., Ltd.
+#
+# 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.
+#
+
+---
+
+- name: Helm chart uninstallation mecm mepm
+  command: helm uninstall mecm-mepm-edgegallery
+
+- name: Mecm mepm jwt delete
+  # yamllint disable rule:line-length
+  command: kubectl delete secret mecm-mepm-jwt-public-secret mecm-mepm-ssl-secret edgegallery-mepm-secret
+  # yamllint disable rule:line-length
+
+- name: Delete mepm service
+  # yamllint disable rule:line-length
+  command: kubectl delete -f /tmp/eg_mecm-mepm/deploy/conf/manifest/mepm/mepm-service-account.yaml
+  # yamllint disable rule:line-length
+  args:
+    chdir: /tmp/eg_mecm-mepm/deploy/