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 # tasks file for MUNO controller
18 ### MUNO controller installation ###
20 - name: Create directory to download EG-TAR
21 command: mkdir -p /tmp/eg_download/deploy
23 chdir: "{{playbook_dir}}"
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
31 chdir: /tmp/eg_download/deploy/
32 when: ansible_architecture == 'x86_64'
34 - name: Untar Edgegallery offline controller tar file
35 command: tar -xvf EdgeGallery-v1.1.1-controller-x86
37 chdir: /tmp/eg_download/deploy/
38 when: ansible_architecture == 'x86_64'
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
45 chdir: "{{playbook_dir}}"
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
52 chdir: /tmp/eg_download/deploy/EdgeGallery-v1.1.1-edge-x86/install
54 - name: Install edgegallery controller
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'