Merge "eg_certs installation role added"
[ealt-edge.git] / ocd / infra / playbooks / roles / eg_helm-repo / 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 setup for edge gallery
20   copy:
21     src: deploy
22     dest: /tmp/eg_helm-repo/
23
24 - name: Import vars
25   include_vars:
26     file: ../../../config.yml
27     name: vardata
28
29 - name: Adding helm repo edgegallery
30   command: helm repo index edgegallery/
31   args:
32     chdir: /tmp/eg_helm-repo/deploy/helm/helm-charts/
33
34 - name: Adding helm repo stable
35   command: helm repo index stable/
36   args:
37     chdir: /tmp/eg_helm-repo/deploy/helm/helm-charts/
38
39 - name: Adding helm repo
40   # yamllint disable rule:line-length
41   command: docker run --name helm-repo -v /tmp/eg_helm-repo/deploy/helm/helm-charts/:/usr/share/nginx/html:ro  -d -p 8080:80  nginx:stable
42   # yamllint disable rule:line-length
43   args:
44     chdir: /tmp/eg_helm-repo/deploy/helm/helm-charts/
45
46 - name: Add repo in adgegallery private IP
47   command: helm repo add edgegallery http://{{ vardata.helmrepoip.name}}:8080/edgegallery
48   args:
49     chdir: /tmp/eg_helm-repo/deploy/helm/helm-charts/
50
51 - name: Add stable repo in given IP
52   command: helm repo add stable http://{{ vardata.helmrepoip.name}}:8080/stable
53   args:
54     chdir: /tmp/eg_helm-repo/deploy/helm/helm-charts/
55
56 - debug:
57     msg: "Helm repo added successfully"