From 93fd60a89cd2ecea49a5f947f83ae749dc4941b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Wed, 23 Aug 2017 10:57:26 +0200 Subject: [PATCH] fix #14: wait for the complete deployment of the webhooks and oauth-client pods --- roles/3scale/tasks/oauth-client.yml | 15 +++++++++++++++ roles/3scale/tasks/webhooks.yml | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/roles/3scale/tasks/oauth-client.yml b/roles/3scale/tasks/oauth-client.yml index c4d332a..018c492 100644 --- a/roles/3scale/tasks/oauth-client.yml +++ b/roles/3scale/tasks/oauth-client.yml @@ -25,6 +25,21 @@ command: oc new-app -n '{{ threescale_project }}' https://github.com/3scale/apicast.git --name=oauth-client --context-dir=/examples/oauth2/client/ -e GATEWAY='https://{{ apicast_hostname }}' when: deploy_needed + - name: Wait for OpenShift to create all objects + pause: + seconds: '{{ threescale_delay }}' + when: deploy_needed + + - include: common/wait_for.yml + static: no + vars: + pod_to_wait: + - oauth-client + delay: "{{ threescale_delay }}" + retries: "{{ threescale_retries }}" + project: "{{ threescale_project }}" + tags: status + - name: Expose the OAuth client command: oc expose service oauth-client -n '{{ threescale_project }}' when: deploy_needed diff --git a/roles/3scale/tasks/webhooks.yml b/roles/3scale/tasks/webhooks.yml index c1d1b6f..f8f9486 100644 --- a/roles/3scale/tasks/webhooks.yml +++ b/roles/3scale/tasks/webhooks.yml @@ -13,6 +13,21 @@ command: oc new-app -n '{{ threescale_project }}' https://github.com/nmasse-itix/3scale-webhooks-sample.git --name=webhooks -e SSO_REALM={{ sso_realm }} -e SSO_HOSTNAME={{ sso_route_name }} -e SSO_SERVICE_USERNAME={{ sso_service_username }} -e SSO_SERVICE_PASSWORD={{ sso_service_password }} -e SSO_CLIENT_ID={{ sso_default_client_id }} -e SHARED_SECRET={{ threescale_webhooks_secret }} -e WEBHOOKS_MODULES=log,sso when: deploy_needed + - name: Wait for OpenShift to create all objects + pause: + seconds: '{{ threescale_delay }}' + when: deploy_needed + + - include: common/wait_for.yml + static: no + vars: + pod_to_wait: + - webhooks + delay: "{{ threescale_delay }}" + retries: "{{ threescale_retries }}" + project: "{{ threescale_project }}" + tags: status + - name: Expose the Webhooks service command: oc expose service webhooks -n '{{ threescale_project }}' when: deploy_needed