diff options
author | 2018-12-19 19:42:03 +0000 | |
---|---|---|
committer | 2018-12-19 19:42:03 +0000 | |
commit | 11e2af5b184a9260b31ab3be497cb709f3471cec (patch) | |
tree | 033209fe62bb92b19880fbf94aee6e9366ad7ab5 /ansible/roles/application-install/tasks/install.yml | |
parent | 1f3bd6c49f6731ab05fef5189ab766309bc816de (diff) |
Adding role for application handling
this ansible role contains application specific tasks, it is
written in generic way and different helm charts can be used as
application. In addition operator can provide proprietary pre_install
and post_install hooks.
Change-Id: Ibe4b330e5a725dde41aca9f6a59d702cfaba6f52
Issue-ID: OOM-1551
Signed-off-by: Michal Ptacek <m.ptacek@partner.samsung.com>
Diffstat (limited to 'ansible/roles/application-install/tasks/install.yml')
-rw-r--r-- | ansible/roles/application-install/tasks/install.yml | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/ansible/roles/application-install/tasks/install.yml b/ansible/roles/application-install/tasks/install.yml index 54b64439..7ff6b62c 100644 --- a/ansible/roles/application-install/tasks/install.yml +++ b/ansible/roles/application-install/tasks/install.yml @@ -5,9 +5,14 @@ --upgrade --skip-refresh -- name: Wait for helm - wait_for: timeout=10 - delegate_to: localhost +#A correct way to implement this would be using --wait option in helm init invocation. +#However, it does not work due to https://github.com/helm/helm/issues/4031 (fixed in newer helm release) +- name: "Wait for helm upgrade to finish" + command: "{{ helm_bin_dir }}/helm version --tiller-connection-timeout 10" + register: result + until: result.rc == 0 + delay: 10 + retries: 12 - name: Get all helm repos command: "{{ helm_bin_dir }}/helm repo list" @@ -27,8 +32,10 @@ - name: Helm Make All make: - chdir: "{{ app_helm_charts_directory }}" + chdir: "{{ app_helm_charts_infra_directory }}" target: all + environment: + PATH: "{{ helm_bin_dir }}:{{ ansible_env.PATH }}" - name: Helm Install application {{ app_name }} - command: "helm install {{ helm_repository_name }}/{{ app_helm_chart_name }} --name {{ app_helm_release_name }} --namespace {{ app_kubernetes_namespace }}" + command: "{{ helm_bin_dir }}/helm install {{ helm_repository_name }}/{{ app_helm_chart_name }} --name {{ app_helm_release_name }} --namespace {{ app_kubernetes_namespace }}" |