From c9be6062566c720cf2df44900e93e467a7bd4b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Tue, 27 Jun 2017 11:39:17 +0200 Subject: [PATCH] configure apicast for OAuth --- .../tasks/configure_apicast_for_oauth.yml | 7 +++++++ roles/3scale/tasks/main.yml | 18 ++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 roles/3scale/tasks/configure_apicast_for_oauth.yml diff --git a/roles/3scale/tasks/configure_apicast_for_oauth.yml b/roles/3scale/tasks/configure_apicast_for_oauth.yml new file mode 100644 index 0000000..1505c9e --- /dev/null +++ b/roles/3scale/tasks/configure_apicast_for_oauth.yml @@ -0,0 +1,7 @@ +--- + + - name: Update the APICast DeploymentConfig to point to RH-SSO + command: oc env dc/{{ item }} -n {{ threescale_project }} RHSSO_ENDPOINT=https://{{ sso_route_name }}/auth/realms/{{ sso_realm }} + + - name: Deploy latest revision of APICast DeploymentConfig + command: oc rollout latest dc/{{ item }} -n {{ threescale_project }} diff --git a/roles/3scale/tasks/main.yml b/roles/3scale/tasks/main.yml index e069a00..89e9228 100644 --- a/roles/3scale/tasks/main.yml +++ b/roles/3scale/tasks/main.yml @@ -128,7 +128,7 @@ command: oc scale dc "{{ item }}" --replicas=1 -n "{{ threescale_project }}" with_items: - apicast-staging - #- apicast-production + - apicast-production when: item not in replication_controllers tags: rollout @@ -137,7 +137,21 @@ vars: pod_to_wait: - apicast-staging - #- apicast-production + - apicast-production + tags: status + + - include: configure_apicast_for_oauth.yml + with_items: + - apicast-staging + - apicast-production + tags: oauth + + - include: wait_for.yml + static: no + vars: + pod_to_wait: + - apicast-staging + - apicast-production tags: status - name: Get Admin Username