ad1d0da17fe7281fe7a92f3f9f1f0f9ae8b0f5c4
[ealt-edge.git] / ocd / infra / playbooks / roles / applcm / tasks / install.yml
1 # Copyright 2020 Huawei Technologies Co., Ltd.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 ---
16 - name: copy deploy folder to mecm host for installing APPLCM
17   copy:
18     src: deploy
19     dest: /tmp/applcm/
20
21 - name: Install applcm - pvc
22   shell:
23     cmd: kubectl apply -f /tmp/applcm/deploy/my-db-persistentvolumeclaim.yaml
24
25 - name: Install applcm - db
26   shell:
27     cmd: kubectl apply -f /tmp/applcm/deploy/db-deployment.yaml
28
29 - name: Install applcm - db-service
30   shell:
31     cmd: kubectl apply -f /tmp/applcm/deploy/db-service.yaml
32
33
34 - name: Install applcm - db-init-config
35   shell:
36 # yamllint disable rule:line-length
37     cmd: kubectl exec -it $(kubectl get pod -l io.kompose.service=db | awk 'FNR==2 {print $1}') -- /bin/bash < /tmp/applcm/deploy/init.sh
38   ignore_errors: yes
39   failed_when: false
40   no_log: True
41
42 - name: Install applcm - db-init-config
43   shell:
44 # yamllint disable rule:line-length
45     cmd: kubectl exec -it $(kubectl get pod -l io.kompose.service=db | awk 'FNR==2 {print $1}') -- /bin/bash < /tmp/applcm/deploy/config.sh
46   ignore_errors: yes
47   failed_when: false
48   no_log: True
49
50
51 - name: Install applcm - helmplugin
52   shell:
53     cmd: sleep 10
54
55 - name: Install applcm - helmplugin
56   shell:
57     cmd: kubectl apply -f /tmp/applcm/deploy/helm-plugin-deployment.yaml
58
59
60 - name: Install applcm - helmplugin
61   shell:
62     cmd: sleep 10
63
64 - name: Install applcm - helmplugin
65   shell:
66     cmd: kubectl apply -f /tmp/applcm/deploy/helm-plugin-service.yaml
67
68
69 - name: Install applcm - helmplugin
70   shell:
71     cmd: sleep 10
72
73 - name: Install applcm - broker
74   shell:
75     cmd: kubectl apply -f /tmp/applcm/deploy/applcm-broker-deployment.yaml
76
77 - name: Install applcm - broker
78   shell:
79     cmd: kubectl apply -f /tmp/applcm/deploy/applcm-broker-service.yaml