munomode
[ealt-edge.git] / ocd / infra / playbooks / roles / egallery-munomode-controller / tasks / install.yml
1 # Copyright 2021 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 # tasks file for MUNO controller
17
18 ### MUNO controller installation ###
19
20 - name: Create directory to download EG-TAR
21   command: mkdir -p /tmp/eg_download/deploy
22   args:
23     chdir: "{{playbook_dir}}"
24   ignore_errors: yes
25
26 - name: Download 1.1 edgegallery x86 controller
27 # yamllint disable rule:line-length
28   command: wget https://edgegallery.obs.cn-east-3.myhuaweicloud.com/releases/v1.1.1/x86/EdgeGallery-v1.1.1-controller-x86.tar.gz
29 # yamllint disable rule:line-length
30   args:
31     chdir: /tmp/eg_download/deploy/
32   when: ansible_architecture == 'x86_64'
33
34 - name: Untar Edgegallery offline controller tar file
35   command: tar -xvf EdgeGallery-v1.1.1-controller-x86
36   args:
37     chdir: /tmp/eg_download/deploy/
38   when: ansible_architecture == 'x86_64'
39
40 - name: Set inventory file for muno controller
41 # yamllint disable rule:line-length
42   command: cp muno-config/controller/hosts-muno-controller /tmp/eg_download/deploy/EdgeGallery-v1.1.1-controller-x86/install
43 # yamllint disable rule:line-length
44   args:
45     chdir: "{{playbook_dir}}"
46
47 - name: Set var.yml file for muno controller
48 # yamllint disable rule:line-length
49   command: cp muno-config/controller/var.yml /tmp/eg_download/deploy/EdgeGallery-v1.1.1-controller-x86/install
50 # yamllint disable rule:line-length
51   args:
52     chdir: /tmp/eg_download/deploy/EdgeGallery-v1.1.1-edge-x86/install
53
54 - name: Install edgegallery controller
55   shell:
56     # yamllint disable rule:line-length
57     cmd: ansible-playbook --inventory hosts-muno-controller -e "ansible_user=root" eg_controller_aio_install.yml >> muno_controller_log
58     # yamllint disable rule:line-length
59     chdir: /tmp/eg_download/deploy/EdgeGallery-v1.1.1-controller-x86/install
60   when: ansible_architecture == 'x86_64'