Skip to content

Commit

Permalink
Merge pull request #60 from snowdrop/launcher
Browse files Browse the repository at this point in the history
Launcher improvements
  • Loading branch information
cmoulliard authored May 3, 2018
2 parents 7e82244 + 13d37ee commit ea95689
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 26 deletions.
3 changes: 2 additions & 1 deletion ansible/README-post-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ ansible-playbook -i inventory/cloud_host playbook/post_installation.yml -e opens
| launcher_catalog_git_repo | Git Repo where the catalog is defined | https://github.com/fabric8-launcher/launcher-booster-catalog.git |
| launcher_catalog_git_branch | Git branch where the catalog is defined | master |
| launcher_catalog_filter | The filter used to limit which catalog entries will appear | |
| launcher_openshift_console_url | The URL where the Openshift console is accessible | https://192.168.99.50:8443/ |
| launcher_openshift_console_url | The URL where the Openshift console is accessible | Looked up automatically using `oc` |
| launcher_openshift_api_url | The URL of the Openshift API | https://openshift.default.svc.cluster.local |
| launcher_keycloak_template_name | The project where the launcher will be installed | devex |

### Command install_oc
Expand Down
1 change: 0 additions & 1 deletion ansible/playbook/post_installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@
# Launcher Role
- {name: "Install launcher ", import_role: {name: launcher, tasks_from: install.yml}, tags: [install-launcher]}
- {name: "Uninstall launcher ", import_role: {name: launcher, tasks_from: uninstall.yml}, tags: [uninstall-launcher]}
- {name: "Patch launcher-clusters configmap", import_role: {name: launcher, tasks_from: patch_configmap.yml}, tags: [uninstall-launcher]}
6 changes: 2 additions & 4 deletions ansible/playbook/roles/launcher/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ launcher_template_url: https://raw.githubusercontent.com/fabric8-launcher/launch
launcher_catalog_git_repo: https://github.com/fabric8-launcher/launcher-booster-catalog.git
launcher_catalog_git_branch: master

launcher_openshift_console_url: https://192.168.99.50:8443/

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

launcher_keycloak_template_name: launcher-keycloak
launcher_catalog_filter:
15 changes: 13 additions & 2 deletions ansible/playbook/roles/launcher/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@
register: r_get_template
ignore_errors: true

- block:

- name: Get openshift URL
command: oc whoami --show-server
register: openshift_url

- set_fact:
launcher_openshift_console_url: "{{ openshift_url.stdout }}"

when: "not launcher_openshift_console_url == ''"

- name: Deploy the Launcher template
command: oc create -n {{ launcher_project_name }} -f https://raw.githubusercontent.com/fabric8-launcher/launcher-openshift-templates/{{ launcher_template_version }}/openshift/launcher-template.yaml
when: r_get_template.stdout == ""
Expand All @@ -29,7 +40,7 @@
- "LAUNCHER_MISSIONCONTROL_OPENSHIFT_USERNAME={{ launcher_openshift_user }}"
- "LAUNCHER_MISSIONCONTROL_OPENSHIFT_PASSWORD={{ launcher_openshift_pwd }}"
- "LAUNCHER_MISSIONCONTROL_OPENSHIFT_CONSOLE_URL={{ launcher_openshift_console_url }}"
- "LAUNCHER_MISSIONCONTROL_OPENSHIFT_API_URL={{ launcher_openshift_console_url }}"
- "LAUNCHER_MISSIONCONTROL_OPENSHIFT_API_URL={{ launcher_openshift_api_url }}"
- "LAUNCHER_MISSIONCONTROL_GITHUB_USERNAME={{ launcher_github_username }}"
- "LAUNCHER_MISSIONCONTROL_GITHUB_TOKEN={{ launcher_github_token }}"

Expand All @@ -44,6 +55,6 @@
-p LAUNCHER_MISSIONCONTROL_OPENSHIFT_USERNAME={{ launcher_openshift_user }} \
-p LAUNCHER_MISSIONCONTROL_OPENSHIFT_PASSWORD={{ launcher_openshift_pwd }} \
-p LAUNCHER_MISSIONCONTROL_OPENSHIFT_CONSOLE_URL={{ launcher_openshift_console_url }} \
-p LAUNCHER_MISSIONCONTROL_OPENSHIFT_API_URL={{ launcher_openshift_console_url }} \
-p LAUNCHER_MISSIONCONTROL_OPENSHIFT_API_URL={{ launcher_openshift_api_url }} \
-p LAUNCHER_MISSIONCONTROL_GITHUB_USERNAME={{ launcher_github_username }} \
-p LAUNCHER_MISSIONCONTROL_GITHUB_TOKEN={{ launcher_github_token }}
15 changes: 0 additions & 15 deletions ansible/playbook/roles/launcher/tasks/keycloak.yml

This file was deleted.

3 changes: 0 additions & 3 deletions ansible/playbook/roles/launcher/tasks/patch_configmap.yml

This file was deleted.

0 comments on commit ea95689

Please sign in to comment.