Merge "mecm-fe role added"
[ealt-edge.git] / ocd / infra / playbooks / roles / eg_mecm-meo / tasks / install.yml
1 #
2 # Copyright 2020 Huawei Technologies Co., Ltd.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16
17 ---
18
19 - name: Doing deployment eg_mecm-meo  setup for edge gallery eg_mecm-meo
20   copy:
21     src: deploy
22     dest: /tmp/eg_mecm-meo/
23
24 - name: Import config file
25   # yamllint disable rule:line-length
26   include_vars:
27     file: ../../../config.yml
28     name: vardata
29   # yamllint disable rule:line-length
30 - name: Generates certificate one eg_mecm-meo
31   # yamllint disable rule:line-length
32   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}}
33   # yamllint disable rule:line-length
34   args:
35     chdir: /tmp/eg_mecm-meo/deploy/
36
37 - name: Generates sql certificate one eg_mecm-meo
38   # yamllint disable rule:line-length
39   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}}
40   # yamllint disable rule:line-length
41   args:
42     chdir: /tmp/eg_mecm-meo/deploy/
43
44 - name: Repo pulling for mecm-meo
45   command: helm install mecm-meo-edgegallery edgegallery/mecm-meo --set ssl.secretName=mecm-ssl-secret --set mecm.secretName=edgegallery-mecm-secret