-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[patch] added podTemplates support for manage
- Loading branch information
1 parent
cea943c
commit b1d7c82
Showing
11 changed files
with
212 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
|
||
- name: "Load podTemplates configuration" | ||
include_tasks: "{{ role_path }}/../../common_tasks/pod_templates/main.yml" | ||
vars: | ||
config_files: | ||
- "ibm-mas-manage-manageworkspace.yml" | ||
- "ibm-mas-manage-imagestitching.yml" | ||
- "ibm-mas-manage-slackproxy.yml" | ||
- "ibm-mas-manage-healthextworkspace.yml" | ||
|
||
# This will filter out and get selected serverbundle podTemplates from all available serverbundle podTemplates list | ||
# Final list of podTemplates added to manageworkspace CR under spec section | ||
# ==================================================================== | ||
- name: Set manage workspace components and server bundle object | ||
set_fact: | ||
manageWorkspaceComponents : "{{ mas_appws_components | to_json | from_json }}" | ||
manageServerBundleData: "{{ mas_app_settings_server_bundles[mas_app_settings_server_bundles_size]['serverBundles'] }}" | ||
|
||
- name: Get available server bundle name | ||
set_fact: | ||
manageAvailableServerBundle: "{{ manageServerBundleData | json_query(serverBundleQuery) }}" | ||
vars: | ||
serverBundleQuery: "[*].name" | ||
|
||
- name: Merge manage workspace podTemplates containers | ||
set_fact: | ||
manageWSAvailablePodTemplatesContainers: "{{ manageAvailableServerBundle + manage_workspace_default_podTemplates_containers}}" | ||
|
||
- name: Filter podTemplates from manage workspace available podTemplates containers | ||
set_fact: | ||
ibm_mas_manage_manageworkspace_pod_templates: "{{ ibm_mas_manage_manageworkspace_pod_templates | selectattr('name' , 'in' , manageWSAvailablePodTemplatesContainers) | list }}" | ||
when: | ||
- ibm_mas_manage_manageworkspace_pod_templates is defined | ||
- manageWSAvailablePodTemplatesContainers is defined | ||
|
||
# ===================================================================== | ||
|
||
- name: Load mas app component configurations | ||
set_fact: | ||
"mas_app_components_{{ mas_app_id }}": "{{ lookup('ansible.builtin.template', 'vars/customspecs/{{ mas_app_id }}_components.yml.j2') | from_yaml }}" | ||
when: mas_appws_spec is not defined |
118 changes: 118 additions & 0 deletions
118
ibm/mas_devops/roles/suite_app_config/vars/customspecs/manage_components.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
# These are the all components that manage supports. | ||
# If new component been added into manage that needs to be handled here we well. | ||
|
||
{% if manageWorkspaceComponents['base'] is defined and manageWorkspaceComponents['base']['version'] is defined %} | ||
base: | ||
version: {{ manageWorkspaceComponents['base']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['anywhere'] is defined and manageWorkspaceComponents['anywhere']['version'] is defined %} | ||
anywhere: | ||
version: {{ manageWorkspaceComponents['anywhere']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['envizi'] is defined and manageWorkspaceComponents['envizi']['version'] is defined %} | ||
envizi: | ||
version: {{ manageWorkspaceComponents['envizi']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['hse'] is defined and manageWorkspaceComponents['hse']['version'] is defined %} | ||
hse: | ||
version: {{ manageWorkspaceComponents['hse']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['nuclear'] is defined and manageWorkspaceComponents['nuclear']['version'] is defined %} | ||
nuclear: | ||
version: {{ manageWorkspaceComponents['nuclear']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['oilandgas'] is defined and manageWorkspaceComponents['oilandgas']['version'] is defined %} | ||
oilandgas: | ||
version: {{ manageWorkspaceComponents['oilandgas']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['oracleadapter'] is defined and manageWorkspaceComponents['oracleadapter']['version'] is defined %} | ||
oracleadapter: | ||
version: {{ manageWorkspaceComponents['oracleadapter']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['sapadapter'] is defined and manageWorkspaceComponents['sapadapter']['version'] is defined %} | ||
sapadapter: | ||
version: {{ manageWorkspaceComponents['sapadapter']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['serviceprovider'] is defined and manageWorkspaceComponents['serviceprovider']['version'] is defined %} | ||
serviceprovider: | ||
version: {{ manageWorkspaceComponents['serviceprovider']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['spatial'] is defined and manageWorkspaceComponents['spatial']['version'] is defined %} | ||
spatial: | ||
version: {{ manageWorkspaceComponents['spatial']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['strategize'] is defined and manageWorkspaceComponents['strategize']['version'] is defined %} | ||
strategize: | ||
version: {{ manageWorkspaceComponents['strategize']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['transportation'] is defined and manageWorkspaceComponents['transportation']['version'] is defined %} | ||
transportation: | ||
version: {{ manageWorkspaceComponents['transportation']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['tririga'] is defined and manageWorkspaceComponents['tririga']['version'] is defined %} | ||
tririga: | ||
version: {{ manageWorkspaceComponents['tririga']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['utilities'] is defined and manageWorkspaceComponents['utilities']['version'] is defined %} | ||
utilities: | ||
version: {{ manageWorkspaceComponents['utilities']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['workday'] is defined and manageWorkspaceComponents['workday']['version'] is defined %} | ||
workday: | ||
version: {{ manageWorkspaceComponents['workday']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
|
||
{% if manageWorkspaceComponents['aviation'] is defined and manageWorkspaceComponents['aviation']['version'] is defined %} | ||
aviation: | ||
{% if ibm_mas_manage_aviation_pod_templates is defined %} | ||
podTemplates: {{ ibm_mas_manage_aviation_pod_templates }} | ||
{% endif %} | ||
version: {{ manageWorkspaceComponents['aviation']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['acm'] is defined and manageWorkspaceComponents['acm']['version'] is defined %} | ||
acm: | ||
{% if ibm_mas_manage_acm_pod_templates is defined %} | ||
podTemplates: {{ ibm_mas_manage_acm_pod_templates }} | ||
{% endif %} | ||
version: {{ manageWorkspaceComponents['acm']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['civil'] is defined and manageWorkspaceComponents['civil']['version'] is defined %} | ||
civil: | ||
{% if ibm_mas_manage_imagestitching_pod_templates is defined %} | ||
podTemplates: {{ ibm_mas_manage_imagestitching_pod_templates }} | ||
{% endif %} | ||
version: {{ manageWorkspaceComponents['civil']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['icd'] is defined and manageWorkspaceComponents['icd']['version'] is defined %} | ||
icd: | ||
{% if ibm_mas_manage_slackproxy_pod_templates is defined %} | ||
podTemplates: {{ ibm_mas_manage_slackproxy_pod_templates }} | ||
{% endif %} | ||
version: {{ manageWorkspaceComponents['icd']['version'] }} | ||
{% endif %} | ||
# ----------------------------------------------------------------------------- | ||
{% if manageWorkspaceComponents['health'] is defined and manageWorkspaceComponents['health']['version'] is defined %} | ||
health: | ||
{% if ibm_mas_manage_healthextworkspace_pod_templates is defined %} | ||
podTemplates: {{ ibm_mas_manage_healthextworkspace_pod_templates }} | ||
{% endif %} | ||
version: {{ manageWorkspaceComponents['health']['version'] }} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
|
||
# ----------------------------------------------------------------------------- | ||
- name: "Load podTemplates configuration" | ||
include_tasks: "{{ role_path }}/../../common_tasks/pod_templates/main.yml" | ||
vars: | ||
config_files: | ||
- "ibm-mas-manage-manageapp.yml" |
3 changes: 2 additions & 1 deletion
3
ibm/mas_devops/roles/suite_app_install/vars/defaultspecs/manage.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
# Default application spec for Manage | ||
mas_app_spec: {} | ||
mas_app_spec: | ||
podTemplates: "{{ ((ibm_mas_manage_manageapp_pod_templates is defined) and (ibm_mas_manage_manageapp_pod_templates | length != 0)) | ternary(ibm_mas_manage_manageapp_pod_templates, []) }}" |