2 # Copyright 2020 Huawei Technologies Co., Ltd.
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
19 - name: Doing deployment eg_mecm-mepm setup for edge gallery eg_mecm-mepm
22 dest: /tmp/eg_mecm-mepm/
24 - name: Import config file
26 file: ../../../config.yml
29 - name: Replacing password
31 path: /tmp/eg_mecm-mepm/deploy/conf/keys/postgres_init.sql
32 regexp: 'PASSWORD_VALUE'
33 replace: "{{ vardata.db_password.name }}"
35 - name: Create mecm-mepm-ssl-secret secret
36 # yamllint disable rule:line-length
37 command: kubectl create secret generic mecm-mepm-jwt-public-secret --from-file=publicKey=/tmp/ssl-eg-keys-certs/encryptedtls.key
38 # yamllint disable rule:line-length
40 chdir: /tmp/ssl-eg-keys-certs/
42 - name: Create mecm-mepm-ssl-secret secret
43 # yamllint disable rule:line-length
44 command: kubectl create secret generic mecm-mepm-ssl-secret --from-file=server_tls.key=/tmp/ssl-eg-keys-certs/tls.key --from-file=server_tls.crt=/tmp/ssl-eg-keys-certs/tls.crt --from-file=ca.crt=/tmp/ssl-eg-keys-certs/ca.crt
45 # yamllint disable rule:line-length
47 chdir: /tmp/ssl-eg-keys-certs/
49 - name: Create edgegallery-mepm-secret secret
50 # yamllint disable rule:line-length
51 command: kubectl create secret generic edgegallery-mepm-secret --from-file=postgres_init.sql=/tmp/eg_mecm-mepm/deploy/conf/keys/postgres_init.sql --from-literal=postgresPassword={{ vardata.db_password.name}} --from-literal=postgresLcmCntlrPassword={{ vardata.db_password.name}} --from-literal=postgresk8sPluginPassword={{ vardata.db_password.name}}
52 # yamllint disable rule:line-length
54 - name: Create mepm service account
55 command: kubectl apply -f /tmp/eg_mecm-mepm/deploy/conf/manifest/mepm/mepm-service-account.yaml
57 chdir: /tmp/eg_mecm-mepm/deploy/
59 - name: Install mecm-mepm
60 # yamllint disable rule:line-length
61 command: helm install mecm-mepm-edgegallery edgegallery/mecm-mepm --set jwt.publicKeySecretName=mecm-mepm-jwt-public-secret --set mepm.secretName=edgegallery-mepm-secret --set ssl.secretName=mecm-mepm-ssl-secret --set images.lcmcontroller.tag={{ vardata.eg_image_tag.name}} --set images.k8splugin.tag={{ vardata.eg_image_tag.name}} --set images.postgres.tag=12.3
62 # yamllint disable rule:line-length