James Falkner
2020-02-19 cabda0009efa24be57e46f8a3499a142639b3f87
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- name: search for guide {{ guide }}
  k8s_facts:
    kind: DeploymentConfig
    name: guides-{{ guide }}
    namespace: labs-infra
  register: r_guide_dc
 
- name: deploy guide {{ guide }}
  when: r_guide_dc.resources | list | length == 0
  shell: >
    oc -n labs-infra new-app quay.io/jamesfalkner/workshopper --name=guides-{{ guide }}
    -e MASTER_URL={{ master_url }}
    -e CONSOLE_URL={{ console_url }}
    -e ECLIPSE_CHE_URL=http://codeready-labs-infra.{{ route_subdomain }}
    -e KEYCLOAK_URL=http://keycloak-labs-infra.{{ route_subdomain }}
    -e GIT_URL=http://gogs-labs-infra.{{ route_subdomain }}
    -e ROUTE_SUBDOMAIN={{ route_subdomain }}
    -e CONTENT_URL_PREFIX="https://raw.githubusercontent.com/RedHat-Middleware-Workshops/cloud-native-workshop-v2{{ guide }}-guides/ocp-4.3"
    -e WORKSHOPS_URLS="https://raw.githubusercontent.com/RedHat-Middleware-Workshops/cloud-native-workshop-v2{{ guide }}-guides/ocp-4.3/_cloud-native-workshop-module{{ guide | regex_search('([0-9])') }}.yml"
    -e CHE_USER_NAME={{ workshop_che_user_name }}
    -e CHE_USER_PASSWORD={{ workshop_che_user_password }}
    -e OPENSHIFT_USER_NAME={{ workshop_openshift_user_name }}
    -e OPENSHIFT_USER_PASSWORD={{ workshop_openshift_user_password }}
    -e RHAMT_URL=http://rhamt-web-console-labs-infra.{{ route_subdomain }}
    -e LOG_TO_STDOUT=true
 
- name: expose guide {{ guide }}
  when: r_guide_dc.resources | list | length == 0
  command: oc expose -n labs-infra svc/guides-{{ guide }}