Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c1fe732
[patch] support db2 upgrade to v12
terc1997 Mar 4, 2026
49f43f2
[patch] update unit tests
terc1997 Mar 4, 2026
a2c9b60
Merge branch 'master' into mascore-11094
terc1997 Mar 5, 2026
0feade3
[patch] update logic for db2
terc1997 Mar 5, 2026
38235ac
[patch] update regex pattern for channel
terc1997 Mar 6, 2026
96bd975
[patch] add db2 channel to db2 update
terc1997 Mar 9, 2026
ac23d16
[patch] update db2 update tests
terc1997 Mar 9, 2026
51ef493
[patch] add parameter for db2_channel
terc1997 Mar 9, 2026
81f052a
Merge branch 'master' into mascore-11094
terc1997 Mar 9, 2026
b8f7811
[patch] kick build
terc1997 Mar 10, 2026
4240800
Merge branch 'master' into mascore-11094
terc1997 Mar 11, 2026
202061c
Merge branch 'master' into mascore-11094
terc1997 Mar 17, 2026
e8b46e8
[patch] fix db2_v12_upgrade default
terc1997 Mar 18, 2026
fe66e1d
Merge branch 'master' into mascore-11094
terc1997 Mar 25, 2026
438e26e
Merge branch 'master' into mascore-11094
terc1997 Apr 1, 2026
982ab8d
Merge branch 'master' into mascore-11094
terc1997 Apr 14, 2026
9e88459
[patch] add db2 license file support to installation workflow
terc1997 Apr 15, 2026
631798e
[patch] add db2 license file support to db2 in aiservice installation
terc1997 Apr 15, 2026
17dff31
Merge branch 'master' into mascore-11094
terc1997 Apr 15, 2026
0d9900e
[patch] add db2_license_file reference into taskdefs
terc1997 Apr 15, 2026
f872f57
[patch] add entitlement workspace as optional
terc1997 Apr 15, 2026
5f15b01
[patch] add db2 license file support and entitlement workspace
terc1997 Apr 15, 2026
a45c0ac
[patch] fix formatting in pipeline generation
terc1997 Apr 16, 2026
433b4d5
[patch] move db2 license file to dedicated workspace
terc1997 Apr 16, 2026
b5ae022
Merge branch 'master' into mascore-11094
terc1997 Apr 17, 2026
6137fb2
Merge branch 'master' into mascore-11094
terc1997 Apr 20, 2026
fd95d1b
Merge branch 'master' into mascore-11094
terc1997 Apr 22, 2026
3801d31
Merge branch 'master' into mascore-11094
terc1997 Apr 22, 2026
98fc20a
Merge branch 'master' into mascore-11094
terc1997 Apr 27, 2026
795ab63
[patch] add db2 license file support for v11 to v12 upgrade
terc1997 Apr 29, 2026
2f759a8
[patch] make db2 license workspace conditional per task
terc1997 Apr 29, 2026
377388a
Merge branch 'master' into mascore-11094
terc1997 Apr 29, 2026
a5e4219
[patch] consolidate slack and install secrets into prepareUpdateSecrets
terc1997 Apr 30, 2026
572be47
[patch] update mock patch reference to prepareUpdateSecrets
terc1997 Apr 30, 2026
a80905f
Merge branch 'master' into mascore-11094
terc1997 Apr 30, 2026
20d52d0
Merge branch 'master' into mascore-11094
terc1997 May 5, 2026
1616aa5
[patch] change default branch from main to master for tag builds
terc1997 May 6, 2026
5f35201
[patch] change default branch from main to master for tag builds
terc1997 May 6, 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
10 changes: 5 additions & 5 deletions image/cli/install/pre-install-rbac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ else
PREINSTALL_BRANCH="${GITHUB_REF_NAME}"
echo "Attempting to clone matching branch: ${PREINSTALL_BRANCH}"
else
# For tag builds, use main branch
PREINSTALL_BRANCH="main"
echo "Using main branch for tag build"
# For tag builds, use master branch
PREINSTALL_BRANCH="master"
echo "Using master branch for tag build"
fi

# Clone the repository
cd /tmp/install
if git clone --depth 1 --branch "${PREINSTALL_BRANCH}" https://github.com/ibm-mas/pre-install.git 2>/dev/null; then
echo "Successfully cloned pre-install repository (branch: ${PREINSTALL_BRANCH})"
else
echo "Branch ${PREINSTALL_BRANCH} not found, falling back to main branch"
git clone --depth 1 --branch main https://github.com/ibm-mas/pre-install.git
echo "Branch ${PREINSTALL_BRANCH} not found, falling back to master branch"
git clone --depth 1 --branch master https://github.com/ibm-mas/pre-install.git
fi

PREINSTALL_SOURCE="/tmp/install/pre-install"
Expand Down
14 changes: 13 additions & 1 deletion python/src/mas/cli/aiservice/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def interactiveMode(self, simplified: bool, advanced: bool) -> None:

self.storageClassProvider = "custom"
self.slsLicenseFileLocal = None
self.db2LicenseFileLocal = None

# Catalog
self.configCatalog()
Expand Down Expand Up @@ -243,6 +244,11 @@ def interactiveMode(self, simplified: bool, advanced: bool) -> None:
self.configMongoDb()
self.setDB2DefaultChannel()
self.setDB2DefaultSettings()
self.printDescription([
"Db2 Universal Operator for v12 onwards requires to add a License activation key",
"If you don't have a license press enter to continue."
])
self.db2LicenseFileLocal = self.promptForFile("Db2 License file", envVar="DB2_LICENSE_FILE", default="", mustExist=False)
# Permission mode prompt (especially in dev mode)
if isVersionEqualOrAfter('9.2.0', self.getParam("aiservice_channel")):
self.configPermissionMode()
Expand All @@ -258,6 +264,7 @@ def nonInteractiveMode(self) -> None:

self.storageClassProvider = "custom"
self.slsLicenseFileLocal = None
self.db2LicenseFileLocal = None

self.aiserviceTenantSchedulingConfigFileLocal = None

Expand Down Expand Up @@ -374,6 +381,9 @@ def nonInteractiveMode(self) -> None:
if value is not None and value != "":
self.slsLicenseFileLocal = value
self.setParam("sls_action", "install")
elif key == "db2_license_file":
if value is not None and value != "":
self.db2LicenseFileLocal = value
elif key == "dedicated_sls":
if value:
self.setParam("sls_namespace", f"mas-{self.args.aiservice_instance_id}-sls")
Expand Down Expand Up @@ -533,8 +543,9 @@ def install(self, argv):

self.evaluatePreInstallRBACAccess()

# Set up the sls license file
# Set up the sls and db2 license file
self.slsLicenseFile()
self.db2LicenseFile()

self.aiserviceConfig()

Expand Down Expand Up @@ -582,6 +593,7 @@ def install(self, argv):
dynClient=self.dynamicClient,
namespace=pipelinesNamespace,
slsLicenseFile=self.slsLicenseFileSecret,
db2LicenseFile=self.db2LicenseFileSecret,
additionalConfigs=self.additionalConfigsSecret,
podTemplates=self.podTemplatesSecret,
certs=self.certsSecret,
Expand Down
2 changes: 2 additions & 0 deletions python/src/mas/cli/aiservice/install/argBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ def buildCommand(self) -> str:

if self.getParam('db2_channel') != "":
command += f" --db2-channel \"{self.getParam('db2_channel')}\"{newline}"
if self.db2LicenseFileLocal:
command += f" --db2-license-file \"{self.db2LicenseFileLocal}\""

command += " --accept-license --no-confirm"
return command
6 changes: 5 additions & 1 deletion python/src/mas/cli/aiservice/install/argParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,11 @@ def isValidFile(parser, arg) -> str:
required=False,
help="Subscription channel for Db2u"
)

db2ArgGroup.add_argument(
"--db2-license-file",
required=False,
help="Db2 License File for Db2"
)

# Development Mode
# -----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions python/src/mas/cli/aiservice/install/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"db2_timezone",
"db2_namespace",
"db2_channel",
"db2_license_file",
"db2_affinity_key",
"db2_affinity_value",
"db2_tolerate_key",
Expand Down
8 changes: 7 additions & 1 deletion python/src/mas/cli/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1749,6 +1749,7 @@ def nonInteractiveMode(self) -> None:
self.db2SetTolerations = False
self.installAIService = False
self.slsLicenseFileLocal = None
self.db2LicenseFileLocal = None
self.aiserviceTenantSchedulingConfigFileLocal = None

self.approvals: Dict[str, Dict[str, Any]] = {
Expand Down Expand Up @@ -1915,6 +1916,9 @@ def nonInteractiveMode(self) -> None:
if value is not None and value != "":
self.slsLicenseFileLocal = value
self.setParam("sls_action", "install")
elif key == "db2_license_file":
if value is not None and value != "":
self.db2LicenseFileLocal = value
elif key == "dedicated_sls":
if value:
self.setParam("sls_namespace", f"mas-{self.args.mas_instance_id}-sls")
Expand Down Expand Up @@ -2210,10 +2214,11 @@ def install(self, argv):
if self.deployCP4D:
self.configCP4D()

# Set up the secrets for additional configs, podtemplates, sls license file and manual certificates
# Set up the secrets for additional configs, podtemplates, sls license file, db2 license file and manual certificates
self.additionalConfigs()
self.podTemplates()
self.slsLicenseFile()
self.db2LicenseFile()
self.manualCertificates()
self.aiserviceConfig()

Expand Down Expand Up @@ -2392,6 +2397,7 @@ def install(self, argv):
dynClient=self.dynamicClient,
namespace=pipelinesNamespace,
slsLicenseFile=self.slsLicenseFileSecret,
db2LicenseFile=self.db2LicenseFileSecret,
additionalConfigs=self.additionalConfigsSecret,
podTemplates=self.podTemplatesSecret,
certs=self.certsSecret,
Expand Down
2 changes: 2 additions & 0 deletions python/src/mas/cli/install/argBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ def buildCommand(self) -> str:
command += f" --db2-type \"{self.getParam('db2_type')}\"{newline}"
if self.getParam('db2_timezone') != "":
command += f" --db2-timezone \"{self.getParam('db2_timezone')}\"{newline}"
if self.db2LicenseFileLocal != "":
command += f" --db2-license-file \"{self.db2LicenseFileLocal}\"{newline}"

if self.getParam('db2_affinity_key') != "":
command += f" --db2-affinity-key \"{self.getParam('db2_affinity_key')}\"{newline}"
Expand Down
5 changes: 5 additions & 0 deletions python/src/mas/cli/install/argParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,11 @@ def isValidFile(parser: argparse.ArgumentParser, arg: str) -> str:
required=False,
help="Timezone for Db2 instance"
)
db2ArgGroup.add_argument(
"--db2-license-file",
required=False,
help="Db2 License File for Db2"
)
db2ArgGroup.add_argument(
"--db2-affinity-key",
required=False,
Expand Down
17 changes: 17 additions & 0 deletions python/src/mas/cli/install/settings/additionalConfigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ class AdditionalConfigsMixin():
noConfirm: bool
templatesDir: str
slsLicenseFileLocal: str | None
db2LicenseFileLocal: str | None
manualCertsDir: str | None
showAdvancedOptions: bool
aiserviceTenantSchedulingConfigFileLocal: str | None
additionalConfigsSecret: Dict[str, Any] | None
podTemplatesSecret: Dict[str, Any] | None
slsLicenseFileSecret: Dict[str, Any] | None
db2LicenseFileSecret: Dict[str, Any] | None
certsSecret: Dict[str, Any] | None
aiserviceConfigSecret: Dict[str, Any] | None

Expand Down Expand Up @@ -289,6 +291,21 @@ def aiserviceConfig(self) -> None:
self.setParam("tenant_scheduling_config_file", f"/workspace/aiservice/{path.basename(self.aiserviceTenantSchedulingConfigFileLocal)}")
self.aiserviceConfigSecret = self.addFilesToSecret(aiserviceConfigSecret, self.aiserviceTenantSchedulingConfigFileLocal, 'yaml')

def db2LicenseFile(self) -> None:
if self.db2LicenseFileLocal:
db2LicenseFileSecret = {
"apiVersion": "v1",
"kind": "Secret",
"type": "Opaque",
"metadata": {
"name": "pipeline-db2-license"
}
}
self.setParam("db2_license_file", f"/workspace/db2/{path.basename(self.db2LicenseFileLocal)}")
self.db2LicenseFileSecret = self.addFilesToSecret(db2LicenseFileSecret, self.db2LicenseFileLocal, '')
else:
self.db2LicenseFileSecret = None

def addFilesToSecret(self, secretDict: dict, configPath: str, extension: str, keyPrefix: str = '') -> dict:
"""
Add file (or files) to pipeline-additional-configs
Expand Down
14 changes: 14 additions & 0 deletions python/src/mas/cli/install/settings/db2Settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ def promptForListSelect(
) -> str:
...

def promptForFile(
self,
message: str,
mustExist: bool = True,
default: str = "",
envVar: str = ""
) -> str:
...

# Methods from ConfigGeneratorMixin or InstallSettingsMixin
def selectLocalConfigDir(self) -> None:
...
Expand Down Expand Up @@ -241,6 +250,11 @@ def configDb2(self, silentMode=False) -> None:

# Do we need to configure Db2u?
if self.getParam("db2_action_system") == "install" or self.getParam("db2_action_manage") == "install" or self.getParam("db2_action_facilities") == "install":
self.printDescription([
"Db2 Universal Operator for v12 onwards requires to add a License activation key",
"If you don't have a license press enter to continue."
])
self.db2LicenseFileLocal = self.promptForFile("Db2 License file", envVar="DB2_LICENSE_FILE", default="", mustExist=False)
if self.showAdvancedOptions:
self.printH2("Installation Namespace")
self.promptForString("Install namespace", "db2_namespace", default="db2u")
Expand Down
Loading
Loading