diff --git a/python/src/mas/cli/aiservice/install/app.py b/python/src/mas/cli/aiservice/install/app.py index 7bd07eaff93..a6f1d8832b4 100644 --- a/python/src/mas/cli/aiservice/install/app.py +++ b/python/src/mas/cli/aiservice/install/app.py @@ -158,6 +158,7 @@ def interactiveMode(self, simplified: bool, advanced: bool) -> None: # Dependencies self.configMongoDb() + self.setDB2DefaultChannel() self.setDB2DefaultSettings() @logMethodCall @@ -176,6 +177,7 @@ def nonInteractiveMode(self) -> None: "approval_aiservice": {"id": "aiservice"}, } + self.setDB2DefaultChannel() self.setDB2DefaultSettings() for key, value in vars(self.args).items(): diff --git a/python/src/mas/cli/aiservice/install/argBuilder.py b/python/src/mas/cli/aiservice/install/argBuilder.py index d259e867ab3..ec1d24404e5 100644 --- a/python/src/mas/cli/aiservice/install/argBuilder.py +++ b/python/src/mas/cli/aiservice/install/argBuilder.py @@ -171,5 +171,8 @@ def buildCommand(self) -> str: if self.getParam('rsl_ca_crt') != "": command += f" --rsl-ca-crt \"{self.getParam('rsl_ca_crt')}\"{newline}" + if self.getParam('db2_channel') != "": + command += f" --db2-channel \"{self.getParam('db2_channel')}\"{newline}" + command += " --accept-license --no-confirm" return command diff --git a/python/src/mas/cli/install/app.py b/python/src/mas/cli/install/app.py index e1719d245f1..872f2b246bb 100644 --- a/python/src/mas/cli/install/app.py +++ b/python/src/mas/cli/install/app.py @@ -1174,6 +1174,7 @@ def nonInteractiveMode(self) -> None: self.configGrafana() self.configSNO() + self.setDB2DefaultChannel() self.setDB2DefaultSettings() for key, value in vars(self.args).items(): diff --git a/python/src/mas/cli/install/settings/db2Settings.py b/python/src/mas/cli/install/settings/db2Settings.py index 62aa55f69f0..e38394dc007 100644 --- a/python/src/mas/cli/install/settings/db2Settings.py +++ b/python/src/mas/cli/install/settings/db2Settings.py @@ -19,14 +19,7 @@ def configDb2(self, silentMode=False) -> None: if not silentMode: self.printH1("Configure Databases") - # Set the default db2-Channel - default_db2_channel = "v110509.0" - # Get user-specified value - user_channel = self.getParam("db2_channel") - - # Only allow custom db2_channel in devMode with a non-empty value - db2_channel = user_channel if (self.devMode and user_channel) else default_db2_channel - self.params["db2_channel"] = db2_channel + self.setDB2DefaultChannel() # If neither Iot, Manage or Facilities is being installed, we have nothing to do if not self.installIoT and not self.installManage and not self.installFacilities: @@ -206,6 +199,16 @@ def configDb2(self, silentMode=False) -> None: else: self.setParam("db2_namespace", "db2u") + def setDB2DefaultChannel(self) -> None: + # Set the default db2-Channel + default_db2_channel = "v110509.0" + # Get user-specified value + user_channel = self.getParam("db2_channel") + + # Only allow custom db2_channel in devMode with a non-empty value + db2_channel = user_channel if (self.devMode and user_channel) else default_db2_channel + self.params["db2_channel"] = db2_channel + def setDB2DefaultSettings(self) -> None: self.setParam("db2_cpu_requests", "4000m")