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