From 4b73692b90f9d28934d6c6009d2ef125a029d459 Mon Sep 17 00:00:00 2001 From: khemendra kumar Date: Wed, 9 Mar 2022 21:32:37 +0530 Subject: [PATCH] MUNO mode update for EG1.5 version upgrade Signed-off-by: khemendra kumar Change-Id: I5b8de3a57c1843c06f1eeb47157095df712a736d --- ocd/infra/playbooks/muno-config/controller/var.yml | 7 ++++-- .../egallery-munomode-controller/tasks/install.yml | 22 ++++++++++++------ .../tasks/uninstall.yml | 4 ++-- .../roles/egallery-munomode-edge/tasks/install.yml | 26 ++++++++++++++++------ .../egallery-munomode-edge/tasks/uninstall.yml | 2 +- 5 files changed, 42 insertions(+), 19 deletions(-) diff --git a/ocd/infra/playbooks/muno-config/controller/var.yml b/ocd/infra/playbooks/muno-config/controller/var.yml index 95d8e1d..032b4ef 100644 --- a/ocd/infra/playbooks/muno-config/controller/var.yml +++ b/ocd/infra/playbooks/muno-config/controller/var.yml @@ -21,12 +21,15 @@ NETWORK_INTERFACE: ens.* # false: No need to keep the persistence of all pods' data ENABLE_PERSISTENCE: true +# One IP of the cluster master node +MASTER_IP: xxx.xxx.xxx.xxx + # ip for portals, will be set to private IP of master node default or reset it to be the public IP of master node here #PORTAL_IP: xxx.xxx.xxx.xxx # IP of the Controller master which is used for Edge to connect -# If you deploy Controller and Edge together in one cluster, then ther is no need to set this param -#CONTROLLER_MASTER_IP: xxx.xxx.xxx.xxx +# If you deploy Controller and Edge together in one cluster, then there is no need to set this param +OCD_IP: xxx.xxx.xxx.xxx # NIC name of master node # If master node is with single NIC, not need to set it here and will get the default NIC name during the run time diff --git a/ocd/infra/playbooks/roles/egallery-munomode-controller/tasks/install.yml b/ocd/infra/playbooks/roles/egallery-munomode-controller/tasks/install.yml index 84ca431..b94eef7 100644 --- a/ocd/infra/playbooks/roles/egallery-munomode-controller/tasks/install.yml +++ b/ocd/infra/playbooks/roles/egallery-munomode-controller/tasks/install.yml @@ -23,41 +23,49 @@ - name: Check edgegallery tar ball present stat: - path: /tmp/eg_download/deploy/EdgeGallery-v1.3.2-controller-x86.tar.gz + path: /tmp/eg_download/deploy/EdgeGallery-v1.5.0-controller-x86.tar.gz register: tar_var -- name: Download 1.3.2 edgegallery x86 controller +- name: Download 1.5.0 edgegallery x86 controller # yamllint disable rule:line-length - command: wget http://edgegallery-v1.3.2.obs.cn-north-4.myhuaweicloud.com/x86/EdgeGallery-v1.3.2-controller-x86.tar.gz + command: wget http://edgegallery-v1.5.0.obs.cn-north-4.myhuaweicloud.com/x86/EdgeGallery-v1.5.0-controller-x86.tar.gz # yamllint disable rule:line-length args: chdir: /tmp/eg_download/deploy/ when: not tar_var.stat.exists - name: Untar Edgegallery offline controller tar file - command: tar -xvf EdgeGallery-v1.3.2-controller-x86.tar.gz + command: tar -xvf EdgeGallery-v1.5.0-controller-x86.tar.gz args: chdir: /tmp/eg_download/deploy/ when: not tar_var.stat.exists - name: Set inventory file for muno controller ## yamllint disable rule:line-length - command: cp muno-config/controller/hosts-muno-controller /tmp/eg_download/deploy/EdgeGallery-v1.3.2-controller-x86/install + command: cp muno-config/controller/hosts-muno-controller /tmp/eg_download/deploy/EdgeGallery-v1.5.0-controller-x86/install # yamllint disable rule:line-length args: chdir: "{{playbook_dir}}" - name: Set var.yml file for muno controller # yamllint disable rule:line-length - command: cp muno-config/controller/var.yml /tmp/eg_download/deploy/EdgeGallery-v1.3.2-controller-x86/install + command: cp muno-config/controller/var.yml /tmp/eg_download/deploy/EdgeGallery-v1.5.0-controller-x86/install # yamllint disable rule:line-length args: chdir: "{{playbook_dir}}" +- name: Set password-var.yml file for muno controller +# yamllint disable rule:line-length + command: cp password-var.yml /tmp/eg_download/deploy/EdgeGallery-v1.5.0-controller-x86/install +# yamllint disable rule:line-length + args: + chdir: "{{playbook_dir}}" + + - name: Install edgegallery controller shell: # yamllint disable rule:line-length cmd: ansible-playbook --inventory hosts-muno-controller -e "ansible_user=root" eg_controller_aio_install.yml >> muno_controller_log # yamllint disable rule:line-length - chdir: /tmp/eg_download/deploy/EdgeGallery-v1.3.2-controller-x86/install + chdir: /tmp/eg_download/deploy/EdgeGallery-v1.5.0-controller-x86/install when: ansible_architecture == 'x86_64' diff --git a/ocd/infra/playbooks/roles/egallery-munomode-controller/tasks/uninstall.yml b/ocd/infra/playbooks/roles/egallery-munomode-controller/tasks/uninstall.yml index 6c7c337..ab6014e 100644 --- a/ocd/infra/playbooks/roles/egallery-munomode-controller/tasks/uninstall.yml +++ b/ocd/infra/playbooks/roles/egallery-munomode-controller/tasks/uninstall.yml @@ -19,11 +19,11 @@ # yamllint disable rule:line-length cmd: ansible-playbook --inventory hosts-muno-controller eg_controller_aio_uninstall.yml -e "ansible_user=root" >> muno_controller_remove.log # yamllint disable rule:line-length - chdir: /tmp/eg_download/deploy/EdgeGallery-v1.3.2-controller-x86/install + chdir: /tmp/eg_download/deploy/EdgeGallery-v1.5.0-controller-x86/install when: ansible_architecture == 'x86_64' - name: Remove edgegallery tar ball shell: - cmd: rm -rf EdgeGallery-v1.3.2-* + cmd: rm -rf EdgeGallery-v1.5.0-* chdir: /tmp/eg_download/deploy/ when: ansible_architecture == 'x86_64' diff --git a/ocd/infra/playbooks/roles/egallery-munomode-edge/tasks/install.yml b/ocd/infra/playbooks/roles/egallery-munomode-edge/tasks/install.yml index fa35f1b..ba12669 100644 --- a/ocd/infra/playbooks/roles/egallery-munomode-edge/tasks/install.yml +++ b/ocd/infra/playbooks/roles/egallery-munomode-edge/tasks/install.yml @@ -14,21 +14,26 @@ ### MUNO edge installation ### +- name: Creates directory + file: + path: /tmp/eg_download/deploy/ + state: directory + - name: Check edgegallery tar ball present stat: - path: /tmp/eg_download/deploy/EdgeGallery-v1.3.2-edge-x86.tar.gz + path: /tmp/eg_download/deploy/EdgeGallery-v1.5.0-edge-x86.tar.gz register: edge_tar_var -- name: Download 1.3.2 edgegallery x86 edge +- name: Download 1.5.0 edgegallery x86 edge # yamllint disable rule:line-length - command: wget http://edgegallery-v1.3.2.obs.cn-north-4.myhuaweicloud.com/x86/EdgeGallery-v1.3.2-edge-x86.tar.gz + command: wget http://edgegallery-v1.5.0.obs.cn-north-4.myhuaweicloud.com/x86/EdgeGallery-v1.5.0-edge-x86.tar.gz # yamllint disable rule:line-length args: chdir: /tmp/eg_download/deploy/ when: not edge_tar_var.stat.exists - name: Untar Edgegallery offline edge tar file - command: tar -xvf EdgeGallery-v1.3.2-edge-x86.tar.gz + command: tar -xvf EdgeGallery-v1.5.0-edge-x86.tar.gz args: chdir: /tmp/eg_download/deploy/ when: not edge_tar_var.stat.exists @@ -38,19 +43,26 @@ command: scp root@{{ OCD_IP }}:"{{playbook_dir}}"/muno-config/edge/hosts-muno-edge . # yamllint disable rule:line-length args: - chdir: "{{playbook_dir}}" + chdir: /tmp/eg_download/deploy/EdgeGallery-v1.5.0-edge-x86/install - name: Set var.yml file for muno edge # yamllint disable rule:line-length command: scp root@{{ OCD_IP }}:"{{playbook_dir}}"/muno-config/edge/var.yml . # yamllint disable rule:line-length args: - chdir: "{{playbook_dir}}" + chdir: /tmp/eg_download/deploy/EdgeGallery-v1.5.0-edge-x86/install + +- name: Set password-var.yml file for muno edge + # yamllint disable rule:line-length + command: scp root@{{ OCD_IP }}:"{{playbook_dir}}"/password-var.yml . + # yamllint disable rule:line-length + args: + chdir: /tmp/eg_download/deploy/EdgeGallery-v1.5.0-edge-x86/install - name: Install edgegallery edge shell: # yamllint disable rule:line-length cmd: ansible-playbook --inventory hosts-muno-edge -e "ansible_user=root" eg_edge_aio_install.yml >> muno_edge_log # yamllint disable rule:line-length - chdir: /tmp/eg_download/deploy/EdgeGallery-v1.3.0-edge-x86/install + chdir: /tmp/eg_download/deploy/EdgeGallery-v1.5.0-edge-x86/install when: ansible_architecture == 'x86_64' diff --git a/ocd/infra/playbooks/roles/egallery-munomode-edge/tasks/uninstall.yml b/ocd/infra/playbooks/roles/egallery-munomode-edge/tasks/uninstall.yml index 89b62ff..e0b0dbb 100644 --- a/ocd/infra/playbooks/roles/egallery-munomode-edge/tasks/uninstall.yml +++ b/ocd/infra/playbooks/roles/egallery-munomode-edge/tasks/uninstall.yml @@ -20,7 +20,7 @@ # yamllint disable rule:line-length cmd: ansible-playbook --inventory hosts-muno-edge eg_edge_aio_uninstall.yml -e "ansible_user=root" >> muno_edge_remove.log # yamllint disable rule:line-length - chdir: /tmp/eg_download/deploy/EdgeGallery-v1.3.2-edge-x86/install + chdir: /tmp/eg_download/deploy/EdgeGallery-v1.5.0-edge-x86/install when: ansible_architecture == 'x86_64' - name: Remove edgegallery tar ball -- 2.16.6