Skip to content

[major] Avoid usage of an additional variable to install Manage foundation #1807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/playbooks/oneclick-manage.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ Required environment variables

To install Manage Foundation only that is available on MAS Core 9.1 or later, export the following environment variable:

`export IS_FULL_MANAGE=false`

Also, the `MAS_APPWS_COMPONENTS` environment variable must be empty:
`MAS_APPWS_COMPONENTS` environment variable must be empty:

`export MAS_APPWS_COMPONENTS=""`

Expand Down
36 changes: 33 additions & 3 deletions ibm/mas_devops/playbooks/oneclick_add_manage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,37 @@
# Dependencies:
# - ansible-playbook ibm.mas_devops.oneclick_core
#
# To install Manage Foundation only that is available on MAS Core 9.1 or later, export the following environment variable:
# `export IS_FULL_MANAGE=false`
# Also, the `MAS_APPWS_COMPONENTS` environment variable must be empty:
# To install Manage Foundation only that is available on MAS Core 9.1 or later
# Make sure the `MAS_APPWS_COMPONENTS` environment variable is empty:
# `export MAS_APPWS_COMPONENTS=""`
# Not setting the env var will install Full Manage with base component
#
- hosts: localhost
any_errors_fatal: true

vars:
# By default we always install Manage base
# mas_appws_components logic:
#
# This setup distinguishes between unset and empty environment variables.
#
# ┌────────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────┐
# │ MAS_APPWS_COMPONENTS (env var) │ Result after parsing with ibm.mas_devops.appws_components │
# ├────────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────────┤
# │ (not set) │ { base: { version: latest } } │
# │ "" (empty string) │ Manage Foundation │
# │ "base=latest" │ { base: { version: latest } } │
# │ "base=latest,health=latest" │ { base: ..., health: ... } │
# └────────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────┘
mas_appws_components: >-
{{
(
(lookup('env', 'MAS_APPWS_COMPONENTS', default='__unset__') != '__unset__')
| ternary(lookup('env', 'MAS_APPWS_COMPONENTS'), 'base=latest')
)
| ibm.mas_devops.appws_components
}}

# Application Dependencies
db2_instance_name: "{{ lookup('env', 'DB2_INSTANCE_NAME') | default('db2w-shared', true) }}"

Expand Down Expand Up @@ -53,6 +75,14 @@
cpd_product_version: "{{ lookup('env', 'CPD_PRODUCT_VERSION') | default('4.6.3', true) }}"

pre_tasks:
- name: Show raw env var
debug:
msg: "{{ lookup('env', 'MAS_APPWS_COMPONENTS') }}"

- name: Show Components to be installed
debug:
var: mas_appws_components

# For the full set of supported environment variables refer to the playbook documentation
- name: Check for required environment variables
assert:
Expand Down
7 changes: 0 additions & 7 deletions ibm/mas_devops/roles/suite_app_config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ Note: For Maximo Real estate and facilities, we recommend to use workspace-appli
- Environment Variable: `MAS_APPWS_BINDINGS_JDBC`
- Default: `system`

### is_full_manage
If set to `false`, Manage Foundation will be installed instead of Full Manage (available on MAS Core 9.1 and later).

- Optional
- Environment Variable: `IS_FULL_MANAGE`
- Default: `true`

### mas_appws_components
Defines the app components and versions to configure in the application workspace. Takes the form of key=value pairs seperated by a comma i.e. To install health within Manage set `base=latest,health=latest`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---
- name: Show Components to be installed
debug:
var: mas_appws_components

# Manage pre-configuration: pod templates
- name: "Run Manage specific pre-configuration: Pod Templates"
include_tasks: "tasks/manage/pre-config/setup-pod-templates.yml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
mas_appws_spec:
bindings: "{{ mas_app_bindings }}"
podTemplates: "{{ ((ibm_mas_manage_manageworkspace_pod_templates is defined) and (ibm_mas_manage_manageworkspace_pod_templates | length != 0)) | ternary(ibm_mas_manage_manageworkspace_pod_templates, []) }}"
components: "{{ ((mas_app_components_manage is defined) and (mas_app_components_manage | length != 0)) | ternary(mas_app_components_manage, default_component) }}"
components: "{{ ((mas_app_components_manage is defined) and (mas_app_components_manage | length != 0)) | ternary(mas_app_components_manage, {}) }}"
settings:
deployment:
persistentVolumes: "{{ mas_app_settings_persistent_volumes }}"
Expand Down
4 changes: 1 addition & 3 deletions ibm/mas_devops/roles/suite_app_config/vars/manage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ server_bundles_jms_add_server_config_content: "{{ lookup('file', '{{ role_path }
# these settings will define the bundle servers spec
mas_app_settings_server_bundles_size: "{{ lookup('env', 'MAS_APP_SETTINGS_SERVER_BUNDLES_SIZE') | default('dev', true) }}"
# This is to specify if manage installation is full or foundation
is_full_manage: "{{ (lookup('env', 'IS_FULL_MANAGE', default='true') | lower) in ['true', '1', 'yes'] }}"
# If this is not full manage (foundation), there is no default base component
default_component: "{{ is_full_manage | ternary({'base':{'version':'latest'}}, {}) }}"
is_full_manage: "{{ (mas_appws_components is defined) and (mas_appws_components | length > 0) }}"
mas_app_settings_server_bundles:
dev:
serverBundleEarFilename: maximo-all
Expand Down
Loading