eg_mecm-meo role added 32/3832/2
authorarvindpatel <arvind.patel@huawei.com>
Wed, 28 Oct 2020 08:03:38 +0000 (13:33 +0530)
committerArvind Patel <arvind.patel@huawei.com>
Wed, 28 Oct 2020 08:08:01 +0000 (08:08 +0000)
Signed-off-by: arvindpatel <arvind.patel@huawei.com>
Change-Id: I2f1d4fd5eec9929c2383a94ddc11da85e0400bf5

ocd/infra/playbooks/roles/eg_mecm-meo/tasks/install.yml [new file with mode: 0644]
ocd/infra/playbooks/roles/eg_mecm-meo/tasks/main.yml [new file with mode: 0644]

diff --git a/ocd/infra/playbooks/roles/eg_mecm-meo/tasks/install.yml b/ocd/infra/playbooks/roles/eg_mecm-meo/tasks/install.yml
new file mode 100644 (file)
index 0000000..e4de10f
--- /dev/null
@@ -0,0 +1,45 @@
+#
+# 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: Doing deployment eg_mecm-meo  setup for edge gallery eg_mecm-meo
+  copy:
+    src: deploy
+    dest: /tmp/eg_mecm-meo/
+
+- name: Import config file
+  # yamllint disable rule:line-length
+  include_vars:
+    file: ../../../config.yml
+    name: vardata
+  # yamllint disable rule:line-length
+- name: Generates certificate one eg_mecm-meo
+  # yamllint disable rule:line-length
+  command: kubectl create secret generic mecm-ssl-secret --from-file=keystore.p12=/tmp/eg_mecm-meo/deploy/conf/keys/keystore.p12 --from-file=keystore.jks=/tmp/eg_mecm-meo/deploy/conf/keys/keystore.jks --from-literal=keystorePassword={{ vardata.firstvar.name}} --from-literal=keystoreType=PKCS12 --from-literal=keyAlias=edgegallery --from-literal=truststorePassword={{ vardata.firstvar.name}}
+  # yamllint disable rule:line-length
+  args:
+    chdir: /tmp/eg_mecm-meo/deploy/
+
+- name: Generates sql certificate one eg_mecm-meo
+  # yamllint disable rule:line-length
+  command: kubectl create secret generic edgegallery-mecm-secret --from-file=postgres_init.sql=/tmp/eg_mecm-meo/deploy/conf/keys/postgres_init.sql --from-literal=postgresPassword={{ vardata.firstvar.name}} --from-literal=postgresApmPassword={{ vardata.firstvar.name}} --from-literal=postgresAppoPassword={{ vardata.firstvar.name}} --from-literal=postgresInventoryPassword={{ vardata.firstvar.name}} --from-literal=edgeRepoUserName={{ vardata.sUserName.name}}  --from-literal=edgeRepoPassword={{ vardata.sPass.name}}
+  # yamllint disable rule:line-length
+  args:
+    chdir: /tmp/eg_mecm-meo/deploy/
+
+- name: Repo pulling for mecm-meo
+  command: helm install mecm-meo-edgegallery edgegallery/mecm-meo --set ssl.secretName=mecm-ssl-secret --set mecm.secretName=edgegallery-mecm-secret
diff --git a/ocd/infra/playbooks/roles/eg_mecm-meo/tasks/main.yml b/ocd/infra/playbooks/roles/eg_mecm-meo/tasks/main.yml
new file mode 100644 (file)
index 0000000..d6cb3cf
--- /dev/null
@@ -0,0 +1,21 @@
+#
+# 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.
+#
+
+---
+# tasks file for eg_mecm-meo
+- include: "install.yml"
+  static: false
+  when: operation == 'install'