Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
aa5d72a
[patch] Added support for FACILITIES.properties in Facilities
May 26, 2026
108470c
[patch] Refactor the code
May 26, 2026
462a93e
[patch] Trigger the jobs
May 26, 2026
cbf7b83
[patch] Pass the flag for facilities properties in argBuilder
May 26, 2026
8296d32
[patch] Added facilitiesproperties to summarizer
May 26, 2026
b157171
[patch] Added custom property in summarizer
May 27, 2026
65ceea8
[patch] Update custom secret name
May 27, 2026
4bb9604
[patch] Refactor the code
May 27, 2026
4a1f297
[patch] Added facilities properties workspace
May 27, 2026
df530fa
[patch] Remove optional
May 27, 2026
f8da29d
[patch] Made changes to set correct params
May 27, 2026
ea3a470
[patch] Made workspace mount optional based on custom property flag
May 29, 2026
dd00330
[patch] Refactor the code
May 29, 2026
813711d
[patch] Added custom property flag in non-interactive mode
May 29, 2026
a062c0d
[patch] Made change in reading the file before changing the value
May 29, 2026
5851dfb
[patch] Added facilities custom flags in suite-app-install
May 29, 2026
49c6815
[patch] Change env name
May 29, 2026
829aeab
[patch] Remove the mount condition
May 29, 2026
c063ca2
Merge branch 'master' into masref-5152
sdoshi96 May 29, 2026
c649b5f
[patch] Remove default values
Jun 1, 2026
35ecbc8
[patch] Made Change for default secret name
Jun 1, 2026
99c8295
[patch] Refactor the code
Jun 1, 2026
e5e3744
Merge branch 'master' into masref-5152
sdoshi96 Jun 1, 2026
475dd05
Merge branch 'master' into masref-5152
sdoshi96 Jun 2, 2026
833ee63
Merge branch 'master' into masref-5152
sdoshi96 Jun 3, 2026
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
31 changes: 31 additions & 0 deletions python/src/mas/cli/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,35 @@ def facilitiesSettings(self) -> None:
"mas_ws_facilities_vault_secret",
)

# Prompt for custom FACILITIES.properties file
if self.yesOrNo("Upload custom FACILITIES.properties file"):
self.printDescription(
[
"Provide the path to your custom FACILITIES.properties file.",
"This file will be uploaded as a secret in OpenShift.",
"If you choose not to upload a custom file, the default FACILITIES.properties will be used.",
]
)
facilitiesPropertiesFile = self.promptForString(
"Path to FACILITIES.properties file",
"mas_ws_facilities_properties_file_local",
)
if facilitiesPropertiesFile and path.exists(facilitiesPropertiesFile):
Comment thread
sanjayprab marked this conversation as resolved.
self.setParam("mas_ws_facilities_properties_file_local", facilitiesPropertiesFile)
self.setParam("mas_ws_facilities_custom_properties", "true")

# Prompt for custom secret name (optional, with default)
customSecretName = self.promptForString("Specify the custom secret name", "mas_ws_facilities_properties_secret_name")
# Use default if not provided
if not customSecretName or customSecretName.strip() == "":
customSecretName = "custom-facilities-properties"
self.setParam("mas_ws_facilities_properties_secret_name", customSecretName)
else:
print_formatted_text(HTML("<Red>File not found. Default FACILITIES.properties will be used.</Red>"))
self.setParam("mas_ws_facilities_custom_properties", "false")
else:
self.setParam("mas_ws_facilities_custom_properties", "false")

self.promptForString(
"Set Real Estate and Facilities Routes Timeout:",
"mas_ws_facilities_routes_timeout",
Expand Down Expand Up @@ -2551,6 +2580,7 @@ def install(self, argv):
self.podTemplates()
self.slsLicenseFile()
self.db2LicenseFile()
self.facilitiesPropertiesFile()
self.manualCertificates()
self.aiserviceConfig()

Expand Down Expand Up @@ -2757,6 +2787,7 @@ def install(self, argv):
namespace=pipelinesNamespace,
slsLicenseFile=self.slsLicenseFileSecret,
db2LicenseFile=self.db2LicenseFileSecret,
facilitiesProperties=self.facilitiesPropertiesSecret,
additionalConfigs=self.additionalConfigsSecret,
podTemplates=self.podTemplatesSecret,
certs=self.certsSecret,
Expand Down
5 changes: 5 additions & 0 deletions python/src/mas/cli/install/argBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,11 @@ def buildCommand(self) -> str:
if self.getParam("mas_ws_facilities_storage_userfiles_size") != "":
command += f" --facilities-userfiles-storage-size \"{self.getParam('mas_ws_facilities_storage_userfiles_size')}\"{newline}"

if self.getParam("mas_ws_facilities_properties_file_local") != "":
command += f" --facilities-properties-file \"{self.getParam('mas_ws_facilities_properties_file_local')}\"{newline}"
if self.getParam("mas_ws_facilities_properties_secret_name") != "":
command += f" --facilities-properties-secret-name \"{self.getParam('mas_ws_facilities_properties_secret_name')}\"{newline}"

# AI Service Advanced Settings
# -----------------------------------------------------------------------------
if self.installAIService:
Expand Down
13 changes: 13 additions & 0 deletions python/src/mas/cli/install/argParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,19 @@ def isValidFile(parser: argparse.ArgumentParser, arg: str) -> str:
help="Storage size for Facilities user files",
default=50,
)
facilitiesArgGroup.add_argument(
"--facilities-properties-file",
dest="mas_ws_facilities_properties_file_local",
required=False,
help="Path to the custom FACILITIES.properties file to upload as secret",
)
facilitiesArgGroup.add_argument(
"--facilities-properties-secret-name",
dest="mas_ws_facilities_properties_secret_name",
required=False,
help="Custom name for the Facilities properties secret (default: facilities-properties)",
default="custom-facilities-properties",
)

# Open Data Hub
# -----------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions python/src/mas/cli/install/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@
"mas_ws_facilities_storage_userfiles_size",
"mas_ws_facilities_dwfagents",
"mas_ws_facilities_db_maxconnpoolsize",
"mas_ws_facilities_properties_file_local",
"mas_ws_facilities_custom_properties",
"mas_ws_facilities_properties_secret_name",
# Special chars
"mas_special_characters",
# ODH
Expand Down
25 changes: 25 additions & 0 deletions python/src/mas/cli/install/settings/additionalConfigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,31 @@ def db2LicenseFile(self) -> None:
else:
self.db2LicenseFileSecret = None

def facilitiesPropertiesFile(self) -> None:
"""Handle Facilities properties file upload"""
self.facilitiesPropertiesSecret = None
facilitiesPropertiesFileLocal = self.getParam("mas_ws_facilities_properties_file_local")

if facilitiesPropertiesFileLocal and facilitiesPropertiesFileLocal != "":
# Get custom secret name or use default
secretName = self.getParam("mas_ws_facilities_properties_secret_name")
if not secretName or secretName == "":
secretName = "custom-facilities-properties"

facilitiesPropertiesSecret = {"apiVersion": "v1", "kind": "Secret", "type": "Opaque", "metadata": {"name": "pipeline-facilities-properties"}}

# Read the file from user's local path
self.facilitiesPropertiesSecret = self.addFilesToSecret(facilitiesPropertiesSecret, facilitiesPropertiesFileLocal, "")

# Now update the parameters
self.setParam("mas_ws_facilities_custom_properties", "true")
self.setParam("mas_ws_facilities_properties_file_local", "/workspace/facilities/FACILITIES.properties")
self.setParam("mas_ws_facilities_properties_secret_name", secretName)
else:
self.setParam("mas_ws_facilities_custom_properties", "false")
self.setParam("mas_ws_facilities_properties_file_local", "")
self.setParam("mas_ws_facilities_properties_secret_name", "")

def addFilesToSecret(self, secretDict: dict, configPath: str, extension: str, keyPrefix: str = "") -> dict:
"""
Add file (or files) to pipeline-additional-configs
Expand Down
3 changes: 3 additions & 0 deletions python/src/mas/cli/install/summarizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ def facilitiesSummary(self) -> None:
"mas_ws_facilities_storage_userfiles_mode",
)
# self.printParamSummary(" + User files Storage Size", "mas_ws_facilities_storage_userfiles_size")
self.printParamSummary(" + Custom FACILITIES.properties", "mas_ws_facilities_custom_properties")
self.printParamSummary(" + Custom FACILITIES.properties File path", "mas_ws_facilities_properties_file_local")
self.printParamSummary(" + Custom FACILITIES.properties Secret Name", "mas_ws_facilities_properties_secret_name")
if self.getParam("db2_action_facilities") == "none":
self.printParamSummary(" + Dedicated DB2 Database", "No")
else:
Expand Down
12 changes: 12 additions & 0 deletions tekton/src/params/install.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,18 @@
description: ConfigMap with configurations not supported by Tekton
type: string
default: ""
- name: mas_ws_facilities_custom_properties
description: Flag indicating if custom FACILITIES.properties file is provided
type: string
default: ""
- name: mas_ws_facilities_properties_file_local
description: Path to custom FACILITIES.properties file in pipeline workspace
type: string
default: ""
- name: mas_ws_facilities_properties_secret_name
description: Name of the secret containing custom FACILITIES.properties
type: string
default: ""

# AI Service Configuration
# -----------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions tekton/src/pipelines/mas-install.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ spec:
- name: shared-db2
# AIService configurations. Contains Scheduling config file for AI workloads for tenant.
- name: shared-aiservice-config
# Facilities Properties File
- name: shared-facilities-properties
optional: true

params:
# 1. Common Parameters
Expand Down
8 changes: 8 additions & 0 deletions tekton/src/pipelines/taskdefs/apps/facilities-app.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,19 @@
value: $(params.mas_ws_facilities_storage_userfiles_mode)
- name: mas_ws_facilities_config_map_name
value: $(params.mas_ws_facilities_config_map_name)
- name: mas_ws_facilities_custom_properties
value: $(params.mas_ws_facilities_custom_properties)
- name: mas_ws_facilities_properties_file_local
value: $(params.mas_ws_facilities_properties_file_local)
- name: mas_ws_facilities_properties_secret_name
value: $(params.mas_ws_facilities_properties_secret_name)
workspaces:
- name: configs
workspace: shared-configs
- name: pod-templates
workspace: shared-pod-templates
- name: facilities
workspace: shared-facilities-properties
when:
- input: "$(params.mas_app_channel_facilities)"
operator: notin
Expand Down
20 changes: 20 additions & 0 deletions tekton/src/tasks/suite-app-install.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,18 @@ spec:
type: string
description: ConfigMap with configurations not supported by Tekton
default: ""
- name: mas_ws_facilities_custom_properties
type: string
description: Flag indicating if custom FACILITIES.properties file is provided
default: ""
- name: mas_ws_facilities_properties_file_local
type: string
description: Local path to custom FACILITIES.properties file in workspace
default: ""
- name: mas_ws_facilities_properties_secret_name
type: string
description: Name of the secret containing custom FACILITIES.properties
default: ""

stepTemplate:
image: quay.io/ibmmas/cli:latest
Expand Down Expand Up @@ -572,6 +584,12 @@ spec:
value: $(params.mas_ws_facilities_config_map_name)
- name: MAS_FACILITIES_APP_OM_UPGRADE_MODE
value: $(params.mas_ws_facilities_app_om_upgrade_mode)
- name: MAS_FACILITIES_CUSTOM_PROPERTIES
value: $(params.mas_ws_facilities_custom_properties)
- name: MAS_FACILITIES_PROPERTIES_FILE_LOCAL
value: $(params.mas_ws_facilities_properties_file_local)
- name: MAS_FACILITIES_PROPERTIES_SECRET_NAME
value: $(params.mas_ws_facilities_properties_secret_name)

- name: app-wait-for-approval
# If configmap/approval-app-cfg-$(params.mas_app_id) exists then set STATUS=pending and wait for it to be changed to "approved"
Expand Down Expand Up @@ -609,3 +627,5 @@ spec:
- name: configs
- name: pod-templates
optional: true
- name: facilities
optional: true
Loading