From 1090356c873bcdc31ee0c89a15c56a01a775b5fa Mon Sep 17 00:00:00 2001 From: arvindpatel Date: Wed, 28 Oct 2020 13:33:38 +0530 Subject: [PATCH] eg_mecm-meo role added Signed-off-by: arvindpatel Change-Id: I2f1d4fd5eec9929c2383a94ddc11da85e0400bf5 --- .../playbooks/roles/eg_mecm-meo/tasks/install.yml | 45 ++++++++++++++++++++++ .../playbooks/roles/eg_mecm-meo/tasks/main.yml | 21 ++++++++++ 2 files changed, 66 insertions(+) create mode 100644 ocd/infra/playbooks/roles/eg_mecm-meo/tasks/install.yml create mode 100644 ocd/infra/playbooks/roles/eg_mecm-meo/tasks/main.yml 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 index 0000000..e4de10f --- /dev/null +++ b/ocd/infra/playbooks/roles/eg_mecm-meo/tasks/install.yml @@ -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 index 0000000..d6cb3cf --- /dev/null +++ b/ocd/infra/playbooks/roles/eg_mecm-meo/tasks/main.yml @@ -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' -- 2.16.6