Skip to content

Commit ea95689

Browse files
authored
Merge pull request #60 from snowdrop/launcher
Launcher improvements
2 parents 7e82244 + 13d37ee commit ea95689

File tree

6 files changed

+17
-26
lines changed

6 files changed

+17
-26
lines changed

ansible/README-post-installation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ ansible-playbook -i inventory/cloud_host playbook/post_installation.yml -e opens
161161
| launcher_catalog_git_repo | Git Repo where the catalog is defined | https://github.com/fabric8-launcher/launcher-booster-catalog.git |
162162
| launcher_catalog_git_branch | Git branch where the catalog is defined | master |
163163
| launcher_catalog_filter | The filter used to limit which catalog entries will appear | |
164-
| launcher_openshift_console_url | The URL where the Openshift console is accessible | https://192.168.99.50:8443/ |
164+
| launcher_openshift_console_url | The URL where the Openshift console is accessible | Looked up automatically using `oc` |
165+
| launcher_openshift_api_url | The URL of the Openshift API | https://openshift.default.svc.cluster.local |
165166
| launcher_keycloak_template_name | The project where the launcher will be installed | devex |
166167

167168
### Command install_oc

ansible/playbook/post_installation.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@
2222
# Launcher Role
2323
- {name: "Install launcher ", import_role: {name: launcher, tasks_from: install.yml}, tags: [install-launcher]}
2424
- {name: "Uninstall launcher ", import_role: {name: launcher, tasks_from: uninstall.yml}, tags: [uninstall-launcher]}
25-
- {name: "Patch launcher-clusters configmap", import_role: {name: launcher, tasks_from: patch_configmap.yml}, tags: [uninstall-launcher]}

ansible/playbook/roles/launcher/defaults/main.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ launcher_template_url: https://raw.githubusercontent.com/fabric8-launcher/launch
2020
launcher_catalog_git_repo: https://github.com/fabric8-launcher/launcher-booster-catalog.git
2121
launcher_catalog_git_branch: master
2222

23-
launcher_openshift_console_url: https://192.168.99.50:8443/
24-
25-
# Address used to configure the endpoint of the launcher-cluster configMAps
26-
launcher_openshift_consoleUrl: https://192.168.99.50:8443/
23+
launcher_openshift_console_url:
24+
launcher_openshift_api_url: https://openshift.default.svc.cluster.local
2725

2826
launcher_keycloak_template_name: launcher-keycloak
2927
launcher_catalog_filter:

ansible/playbook/roles/launcher/tasks/install.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@
1212
register: r_get_template
1313
ignore_errors: true
1414

15+
- block:
16+
17+
- name: Get openshift URL
18+
command: oc whoami --show-server
19+
register: openshift_url
20+
21+
- set_fact:
22+
launcher_openshift_console_url: "{{ openshift_url.stdout }}"
23+
24+
when: "not launcher_openshift_console_url == ''"
25+
1526
- name: Deploy the Launcher template
1627
command: oc create -n {{ launcher_project_name }} -f https://raw.githubusercontent.com/fabric8-launcher/launcher-openshift-templates/{{ launcher_template_version }}/openshift/launcher-template.yaml
1728
when: r_get_template.stdout == ""
@@ -29,7 +40,7 @@
2940
- "LAUNCHER_MISSIONCONTROL_OPENSHIFT_USERNAME={{ launcher_openshift_user }}"
3041
- "LAUNCHER_MISSIONCONTROL_OPENSHIFT_PASSWORD={{ launcher_openshift_pwd }}"
3142
- "LAUNCHER_MISSIONCONTROL_OPENSHIFT_CONSOLE_URL={{ launcher_openshift_console_url }}"
32-
- "LAUNCHER_MISSIONCONTROL_OPENSHIFT_API_URL={{ launcher_openshift_console_url }}"
43+
- "LAUNCHER_MISSIONCONTROL_OPENSHIFT_API_URL={{ launcher_openshift_api_url }}"
3344
- "LAUNCHER_MISSIONCONTROL_GITHUB_USERNAME={{ launcher_github_username }}"
3445
- "LAUNCHER_MISSIONCONTROL_GITHUB_TOKEN={{ launcher_github_token }}"
3546

@@ -44,6 +55,6 @@
4455
-p LAUNCHER_MISSIONCONTROL_OPENSHIFT_USERNAME={{ launcher_openshift_user }} \
4556
-p LAUNCHER_MISSIONCONTROL_OPENSHIFT_PASSWORD={{ launcher_openshift_pwd }} \
4657
-p LAUNCHER_MISSIONCONTROL_OPENSHIFT_CONSOLE_URL={{ launcher_openshift_console_url }} \
47-
-p LAUNCHER_MISSIONCONTROL_OPENSHIFT_API_URL={{ launcher_openshift_console_url }} \
58+
-p LAUNCHER_MISSIONCONTROL_OPENSHIFT_API_URL={{ launcher_openshift_api_url }} \
4859
-p LAUNCHER_MISSIONCONTROL_GITHUB_USERNAME={{ launcher_github_username }} \
4960
-p LAUNCHER_MISSIONCONTROL_GITHUB_TOKEN={{ launcher_github_token }}

ansible/playbook/roles/launcher/tasks/keycloak.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

ansible/playbook/roles/launcher/tasks/patch_configmap.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)