From 17770356db8dc3aae9be44cac8fbaae61080f8d2 Mon Sep 17 00:00:00 2001 From: khemendra kumar Date: Mon, 14 Mar 2022 07:26:17 +0530 Subject: [PATCH] AIO and MUNO mode upgrade for EG 1.5.0 version Signed-off-by: khemendra kumar Change-Id: Iee90be49b8ffa8b06b09284f3c68fa9dae86b228 --- .../muno-config/controller/hosts-muno-controller | 3 ++- .../playbooks/muno-config/controller/var.yml | 9 +++++--- .../playbooks/muno-config/edge/hosts-muno-edge | 4 +--- .../iotgateway/playbooks/muno-config/edge/var.yml | 7 ++++-- .../roles/egallery-all-aiomode/tasks/uninstall.yml | 4 ++-- .../egallery-munomode-controller/tasks/install.yml | 23 +++++++++++------- .../tasks/uninstall.yml | 2 +- .../roles/egallery-munomode-edge/tasks/install.yml | 27 ++++++++++++++++------ .../egallery-munomode-edge/tasks/uninstall.yml | 6 ++--- 9 files changed, 55 insertions(+), 30 deletions(-) diff --git a/blueprints/iotgateway/playbooks/muno-config/controller/hosts-muno-controller b/blueprints/iotgateway/playbooks/muno-config/controller/hosts-muno-controller index 9aa92f1..bebf1de 100644 --- a/blueprints/iotgateway/playbooks/muno-config/controller/hosts-muno-controller +++ b/blueprints/iotgateway/playbooks/muno-config/controller/hosts-muno-controller @@ -14,4 +14,5 @@ # limitations under the License. [master] -controller-ip +xxx.xxx.xxx.xxx + diff --git a/blueprints/iotgateway/playbooks/muno-config/controller/var.yml b/blueprints/iotgateway/playbooks/muno-config/controller/var.yml index c4ea708..85bd334 100644 --- a/blueprints/iotgateway/playbooks/muno-config/controller/var.yml +++ b/blueprints/iotgateway/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 +#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 +#CONTROLLER_MASTER_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/blueprints/iotgateway/playbooks/muno-config/edge/hosts-muno-edge b/blueprints/iotgateway/playbooks/muno-config/edge/hosts-muno-edge index a63edb4..bebf1de 100644 --- a/blueprints/iotgateway/playbooks/muno-config/edge/hosts-muno-edge +++ b/blueprints/iotgateway/playbooks/muno-config/edge/hosts-muno-edge @@ -14,7 +14,5 @@ # limitations under the License. [master] -edge-ip-1 -edge-ip-2 +xxx.xxx.xxx.xxx -# Here you can add edge nodes diff --git a/blueprints/iotgateway/playbooks/muno-config/edge/var.yml b/blueprints/iotgateway/playbooks/muno-config/edge/var.yml index c4ea708..ad1a6bf 100644 --- a/blueprints/iotgateway/playbooks/muno-config/edge/var.yml +++ b/blueprints/iotgateway/playbooks/muno-config/edge/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/blueprints/iotgateway/playbooks/roles/egallery-all-aiomode/tasks/uninstall.yml b/blueprints/iotgateway/playbooks/roles/egallery-all-aiomode/tasks/uninstall.yml index 737d4b2..3fed90c 100644 --- a/blueprints/iotgateway/playbooks/roles/egallery-all-aiomode/tasks/uninstall.yml +++ b/blueprints/iotgateway/playbooks/roles/egallery-all-aiomode/tasks/uninstall.yml @@ -18,7 +18,7 @@ # yamllint disable rule:line-length cmd: ansible-playbook --inventory hosts-aio eg_all_aio_uninstall.yml -e "ansible_user=root" >> aio_remove.log # yamllint disable rule:line-length - chdir: /tmp/eg_download/deploy/EdgeGallery-v1.3.2-all-x86/install + chdir: /tmp/eg_download/deploy/EdgeGallery-v1.5.0-all-x86/install when: ansible_architecture == 'aarch64' - name: Uninstall edgegallery on x86 @@ -26,7 +26,7 @@ # yamllint disable rule:line-length cmd: ansible-playbook --inventory hosts-aio eg_all_aio_uninstall.yml -e "ansible_user=root" >> aio_remove.log # yamllint disable rule:line-length - chdir: /tmp/eg_download/deploy/EdgeGallery-v1.3.2-all-x86/install + chdir: /tmp/eg_download/deploy/EdgeGallery-v1.5.0-all-x86/install when: ansible_architecture == 'x86_64' - name: Remove edgegallery tar diff --git a/blueprints/iotgateway/playbooks/roles/egallery-munomode-controller/tasks/install.yml b/blueprints/iotgateway/playbooks/roles/egallery-munomode-controller/tasks/install.yml index 902279f..b2212a2 100644 --- a/blueprints/iotgateway/playbooks/roles/egallery-munomode-controller/tasks/install.yml +++ b/blueprints/iotgateway/playbooks/roles/egallery-munomode-controller/tasks/install.yml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. ---- + # tasks file for MUNO controller ### MUNO controller installation ### @@ -25,33 +25,40 @@ - 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.1 edgegallery x86 controller +- name: Download 1.5.0 edgegallery x86 controller # yamllint disable rule:line-length - command: wget https://edgegallery.obs.cn-east-3.myhuaweicloud.com/releases/v1.3.2/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 + 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}}" @@ -61,5 +68,5 @@ # 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/blueprints/iotgateway/playbooks/roles/egallery-munomode-controller/tasks/uninstall.yml b/blueprints/iotgateway/playbooks/roles/egallery-munomode-controller/tasks/uninstall.yml index 5e9641c..c76b9a3 100644 --- a/blueprints/iotgateway/playbooks/roles/egallery-munomode-controller/tasks/uninstall.yml +++ b/blueprints/iotgateway/playbooks/roles/egallery-munomode-controller/tasks/uninstall.yml @@ -19,7 +19,7 @@ # 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 diff --git a/blueprints/iotgateway/playbooks/roles/egallery-munomode-edge/tasks/install.yml b/blueprints/iotgateway/playbooks/roles/egallery-munomode-edge/tasks/install.yml index 0dad5b4..620dbc1 100644 --- a/blueprints/iotgateway/playbooks/roles/egallery-munomode-edge/tasks/install.yml +++ b/blueprints/iotgateway/playbooks/roles/egallery-munomode-edge/tasks/install.yml @@ -17,19 +17,24 @@ - 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.1 edgegallery x86 edge +- name: Creates directory + file: + path: /tmp/eg_download/deploy/ + state: directory + +- name: Download 1.5.0 edgegallery x86 edge # yamllint disable rule:line-length - command: wget https://edgegallery.obs.cn-east-3.myhuaweicloud.com/releases/v1.3.2/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 + command: tar -xvf EdgeGallery-v1.5.0-edge-x86.tar.gz args: chdir: /tmp/eg_download/deploy/ when: not edge_tar_var.stat.exists @@ -39,19 +44,27 @@ 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.2-edge-x86/install + chdir: /tmp/eg_download/deploy/EdgeGallery-v1.5.0-edge-x86/install when: ansible_architecture == 'x86_64' diff --git a/blueprints/iotgateway/playbooks/roles/egallery-munomode-edge/tasks/uninstall.yml b/blueprints/iotgateway/playbooks/roles/egallery-munomode-edge/tasks/uninstall.yml index 694181f..7293afb 100644 --- a/blueprints/iotgateway/playbooks/roles/egallery-munomode-edge/tasks/uninstall.yml +++ b/blueprints/iotgateway/playbooks/roles/egallery-munomode-edge/tasks/uninstall.yml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. ---- + # uninstallation of edge - name: Uninstall edgegallery edge on x86 @@ -20,8 +20,8 @@ # 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 - when: ansible_architecture == 'x86_64 + chdir: /tmp/eg_download/deploy/EdgeGallery-v1.5.0-edge-x86/install + when: ansible_architecture == 'x86_64' - name: Remove edgegallery tar ball shell: -- 2.16.6