1 # Copyright 2021 Huawei Technologies Co., Ltd.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 ### MUNO controller installation ###
18 - name: Create directory to download EG-TAR
19 command: mkdir -p /tmp/eg_download/deploy
21 chdir: "{{playbook_dir}}"
24 - name: Check edgegallery tar ball present
26 path: /tmp/eg_download/deploy/EdgeGallery-v1.3.2-controller-x86.tar.gz
29 - name: Download 1.3.2 edgegallery x86 controller
30 # yamllint disable rule:line-length
31 command: wget http://edgegallery-v1.3.2.obs.cn-north-4.myhuaweicloud.com/x86/EdgeGallery-v1.3.2-controller-x86.tar.gz
32 # yamllint disable rule:line-length
34 chdir: /tmp/eg_download/deploy/
35 when: not tar_var.stat.exists
37 - name: Untar Edgegallery offline controller tar file
38 command: tar -xvf EdgeGallery-v1.3.2-controller-x86.tar.gz
40 chdir: /tmp/eg_download/deploy/
41 when: not tar_var.stat.exists
43 - name: Set inventory file for muno controller
44 ## yamllint disable rule:line-length
45 command: cp muno-config/controller/hosts-muno-controller /tmp/eg_download/deploy/EdgeGallery-v1.3.2-controller-x86/install
46 # yamllint disable rule:line-length
48 chdir: "{{playbook_dir}}"
50 - name: Set var.yml file for muno controller
51 # yamllint disable rule:line-length
52 command: cp muno-config/controller/var.yml /tmp/eg_download/deploy/EdgeGallery-v1.3.2-controller-x86/install
53 # yamllint disable rule:line-length
55 chdir: "{{playbook_dir}}"
57 - name: Install edgegallery controller
59 # yamllint disable rule:line-length
60 cmd: ansible-playbook --inventory hosts-muno-controller -e "ansible_user=root" eg_controller_aio_install.yml >> muno_controller_log
61 # yamllint disable rule:line-length
62 chdir: /tmp/eg_download/deploy/EdgeGallery-v1.3.2-controller-x86/install
63 when: ansible_architecture == 'x86_64'