X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=ocd%2Finfra%2Fplaybooks%2Froles%2Fvelero%2Ftasks%2Finstall.yml;h=8d19c68fd46de04d3cd256519dc9b7f0a0c3a690;hb=refs%2Fchanges%2F08%2F4008%2F10;hp=df39d4b59b4cc4c4c7b51c33aeb7dbcf768eb443;hpb=a6cdb18531c6cd9b4f31437ca04ef30c416fce71;p=ealt-edge.git diff --git a/ocd/infra/playbooks/roles/velero/tasks/install.yml b/ocd/infra/playbooks/roles/velero/tasks/install.yml index df39d4b..8d19c68 100644 --- a/ocd/infra/playbooks/roles/velero/tasks/install.yml +++ b/ocd/infra/playbooks/roles/velero/tasks/install.yml @@ -33,6 +33,29 @@ # yamllint disable rule:line-length when: result.stdout == "" +- name: Doing deployment setup for edge gallery + copy: + src: credentials-velero + dest: /root/ + mode: 750 + +- name: Import config file + include_vars: + file: ../../../config.yml + name: vardata + +- name: Replacing access key + replace: + path: /root/credentials-velero + regexp: 'velero_access_key' + replace: "{{ vardata.velero_access_key.name }}" + +- name: Replacing secret key + replace: + path: /root/credentials-velero + regexp: 'velero_secret_key' + replace: "{{ vardata.velero_secret_key.name }}" + - name: Adding helm repo for velero command: helm repo add vmware-tanzu https://vmware-tanzu.github.io/helm-charts ignore_errors: yes @@ -40,13 +63,13 @@ when: result.stdout == "" - name: Create name space for velero - command: kubectl create ns + command: kubectl create ns velero ignore_errors: yes no_log: True when: result.stdout == "" - name: Install velero - command: helm install vmware-tanzu/velero --namespace velero --set-file credentials.secretContents.cloud=./credentials-velero --set configuration.provider=aws --set configuration.backupStorageLocation.name= default --set configuration.backupStorageLocation.bucket=newbucket > --set configuration.backupStorageLocation.config.region=minio > --set configuration.volumeSnapshotLocation.name=default > --set configuration.volumeSnapshotLocation.config.region=minio > --set image.repository=velero/velero > --set image.tag=v1.5.1 > --set image.pullPolicy=IfNotPresent> --set initContainers[0].name=velero-plugin-for-aws > --set initContainers[0].image=velero/velero-plugin-for-aws:v1.1.0 > --set initContainers[0].volumeMounts[0].mountPath=/target > --set initContainers[0].volumeMounts[0].name=plugins --generate-name =velero - ignore_errors: yes - no_log: True + # yamllint disable rule:line-length + shell: + cmd: helm install vmware-tanzu/velero --namespace velero --set-file credentials.secretContents.cloud=./credentials-velero --set configuration.provider=aws --set configuration.backupStorageLocation.name= default --set configuration.backupStorageLocation.bucket=newbucket > --set configuration.backupStorageLocation.config.region=minio > --set configuration.volumeSnapshotLocation.name=default > --set configuration.volumeSnapshotLocation.config.region=minio > --set image.repository=velero/velero > --set image.tag=v1.5.1 > --set image.pullPolicy=IfNotPresent> --set initContainers[0].name=velero-plugin-for-aws > --set initContainers[0].image=velero/velero-plugin-for-aws:v1.1.0 > --set initContainers[0].volumeMounts[0].mountPath=/target > --set initContainers[0].volumeMounts[0].name=plugins --generate-name =velero when: result.stdout == ""