From: Gaurav Agrawal Date: Mon, 2 Nov 2020 04:25:21 +0000 (+0000) Subject: Merge "eg_certs installation role added" X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=32b3d8699b040d34d64c3f5a6097eeb9b214234a;hp=f51994f014b06b8be23c08f45311a2a96c8cc03a;p=ealt-edge.git Merge "eg_certs installation role added" --- diff --git a/ocd/infra/playbooks/roles/eg_helm-repo/tasks/install.yml b/ocd/infra/playbooks/roles/eg_helm-repo/tasks/install.yml new file mode 100644 index 0000000..d64cc10 --- /dev/null +++ b/ocd/infra/playbooks/roles/eg_helm-repo/tasks/install.yml @@ -0,0 +1,57 @@ +# +# 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_helm-repo/ + +- name: Import vars + include_vars: + file: ../../../config.yml + name: vardata + +- name: Adding helm repo edgegallery + command: helm repo index edgegallery/ + args: + chdir: /tmp/eg_helm-repo/deploy/helm/helm-charts/ + +- name: Adding helm repo stable + command: helm repo index stable/ + args: + chdir: /tmp/eg_helm-repo/deploy/helm/helm-charts/ + +- name: Adding helm repo + # yamllint disable rule:line-length + command: docker run --name helm-repo -v /tmp/eg_helm-repo/deploy/helm/helm-charts/:/usr/share/nginx/html:ro -d -p 8080:80 nginx:stable + # yamllint disable rule:line-length + args: + chdir: /tmp/eg_helm-repo/deploy/helm/helm-charts/ + +- name: Add repo in adgegallery private IP + command: helm repo add edgegallery http://{{ vardata.helmrepoip.name}}:8080/edgegallery + args: + chdir: /tmp/eg_helm-repo/deploy/helm/helm-charts/ + +- name: Add stable repo in given IP + command: helm repo add stable http://{{ vardata.helmrepoip.name}}:8080/stable + args: + chdir: /tmp/eg_helm-repo/deploy/helm/helm-charts/ + +- debug: + msg: "Helm repo added successfully" diff --git a/ocd/infra/playbooks/roles/eg_helm-repo/tasks/main.yml b/ocd/infra/playbooks/roles/eg_helm-repo/tasks/main.yml new file mode 100644 index 0000000..52584d1 --- /dev/null +++ b/ocd/infra/playbooks/roles/eg_helm-repo/tasks/main.yml @@ -0,0 +1,26 @@ +# +# 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. +# + +--- + +# tasks file for eg_addrepo +- include: "install.yml" + static: false + when: operation == 'install' + +- include: "uninstall.yml" + static: false + when: operation == 'uninstall'