X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=blueprints%2Fiotgateway%2Fplaybooks%2Froles%2Feg_registry%2Ftasks%2Finstall.yml;fp=blueprints%2Fiotgateway%2Fplaybooks%2Froles%2Feg_registry%2Ftasks%2Finstall.yml;h=0000000000000000000000000000000000000000;hb=233fedcbae7166783277ed538d454b106b9d52ae;hp=def9fc6c476ba6bf87e561cb74df78df885abd46;hpb=8d3b452ed742e3b9e3e7e5ed9633038437fbdca9;p=eliot.git diff --git a/blueprints/iotgateway/playbooks/roles/eg_registry/tasks/install.yml b/blueprints/iotgateway/playbooks/roles/eg_registry/tasks/install.yml deleted file mode 100644 index def9fc6..0000000 --- a/blueprints/iotgateway/playbooks/roles/eg_registry/tasks/install.yml +++ /dev/null @@ -1,118 +0,0 @@ -# -# Copyright 2020 Huawei Technologies Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- - -- name: Doing deployment setup for edge gallery - copy: - src: deploy - dest: /tmp/eg_registry/ - mode: 750 - -- name: Import config file - include_vars: - file: ../../../config.yml - name: vardata - -- name: Make dir for arm images - command: mkdir -p /tmp/eg_registry/armtarball - args: - chdir: /tmp/ - -- name: Set a variable - ansible.builtin.set_fact: - processor: "{{ vardata.master_edge_processor.name}}" - -- name: Downloading based on master_edge_processor value x86_64 tarball - command: wget http://release.edgegallery.org/x86/all/0.9.tar.gz - args: - chdir: /tmp/eg_registry/deploy/ - when: processor == "x86_64" - -- name: Download 0.9 tar arms based on master_edge_processor value - command: wget http://release.edgegallery.org/arm64/all/0.9.tar.gz - args: - chdir: /tmp/eg_registry/armtarball/ - when: ansible_architecture == 'aarch64' and processor == "x86_64" - -- name: Download 0.9 tar arms - command: wget http://release.edgegallery.org/arm64/all/0.9.tar.gz - args: - chdir: /tmp/eg_registry/deploy/ - when: ansible_architecture == 'aarch64' and processor != "x86_64" - -- name: Download 0.9 tar x86 - command: wget http://release.edgegallery.org/x86/all/0.9.tar.gz - args: - chdir: /tmp/eg_registry/deploy/ - when: ansible_architecture == 'x86_64' - -- name: Untar the donwloaded tar - command: tar -zxf 0.9.tar.gz - args: - chdir: /tmp/eg_registry/deploy/ - -- name: Untar the donwloaded tar - command: tar -zxf 0.9.tar.gz - args: - chdir: /tmp/eg_registry/armtarball/ - when: processor == "x86_64" - -- name: Registry replaced for cross playform - command: rm -rf /tmp/eg_registry/deploy/registry - when: processor == "x86_64" - -- name: Docker image replaced for cross playform - command: rm -rf /tmp/eg_registry/deploy/eg_swr_images/nginx#stable.tar.gz - when: processor == "x86_64" - -- name: Docker image replaced for cross playform tool chain - # yamllint disable rule:line-length - command: rm -rf /tmp/eg_registry/deploy/eg_swr_images/edgegallery@deploy-tool#latest.tar.gz - # yamllint disable rule:line-length - when: processor == "x86_64" - -- name: Copy registry from x86 tarball - command: cp -r /tmp/eg_registry/armtarball/registry /tmp/eg_registry/deploy/ - when: processor == "x86_64" - -- name: Copy docker image from x86 tarball - # yamllint disable rule:line-length - command: cp -r /tmp/eg_registry/armtarball/eg_swr_images/nginx#stable.tar.gz /tmp/eg_registry/deploy/eg_swr_images/ - # yamllint disable rule:line-length - when: processor == "x86_64" - -- name: Copy docker image from x86 tarball tool chain - # yamllint disable rule:line-length - command: cp -r /tmp/eg_registry/armtarball/eg_swr_images/edgegallery@deploy-tool#latest.tar.gz /tmp/eg_registry/deploy/eg_swr_images/ - # yamllint disable rule:line-length - when: processor == "x86_64" - -- name: Replacing private ip - replace: - path: /tmp/eg_registry/deploy/load-images.sh - regexp: 'REGISTRIES_IP' - replace: "{{ vardata.private_repo_ip.name }}" - -- name: Replacing private port - replace: - path: /tmp/eg_registry/deploy/load-images.sh - regexp: 'REGISTRIES_PORT' - replace: "{{ vardata.docker_registry_port.name }}" - -- name: Execute the script - shell: - cmd: /tmp/eg_registry/deploy/load-images.sh