Skip to content
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
2 changes: 2 additions & 0 deletions python/src/mas/cli/aiservice/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def interactiveMode(self, simplified: bool, advanced: bool) -> None:

# Dependencies
self.configMongoDb()
self.setDB2DefaultChannel()
self.setDB2DefaultSettings()

@logMethodCall
Expand All @@ -176,6 +177,7 @@ def nonInteractiveMode(self) -> None:
"approval_aiservice": {"id": "aiservice"},
}

self.setDB2DefaultChannel()
self.setDB2DefaultSettings()

for key, value in vars(self.args).items():
Expand Down
3 changes: 3 additions & 0 deletions python/src/mas/cli/aiservice/install/argBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions python/src/mas/cli/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,7 @@ def nonInteractiveMode(self) -> None:

self.configGrafana()
self.configSNO()
self.setDB2DefaultChannel()
self.setDB2DefaultSettings()

for key, value in vars(self.args).items():
Expand Down
19 changes: 11 additions & 8 deletions python/src/mas/cli/install/settings/db2Settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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")
Expand Down