mas-cli 13.20.0__py3-none-any.whl → 13.22.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mas-cli might be problematic. Click here for more details.
- mas/cli/__init__.py +1 -1
- mas/cli/cli.py +1 -1
- mas/cli/install/app.py +2 -2
- mas/cli/install/argBuilder.py +3 -3
- mas/cli/install/argParser.py +3 -0
- mas/cli/install/params.py +3 -3
- mas/cli/install/settings/db2Settings.py +50 -29
- mas/cli/templates/ibm-mas-tekton.yaml +1937 -212
- mas/cli/upgrade/app.py +41 -8
- mas/cli/upgrade/argParser.py +7 -0
- mas/cli/upgrade/settings/__init__.py +19 -0
- {mas_cli-13.20.0.dist-info → mas_cli-13.22.0.dist-info}/METADATA +1 -1
- {mas_cli-13.20.0.dist-info → mas_cli-13.22.0.dist-info}/RECORD +16 -15
- {mas_cli-13.20.0.dist-info → mas_cli-13.22.0.dist-info}/WHEEL +1 -1
- {mas_cli-13.20.0.data → mas_cli-13.22.0.data}/scripts/mas-cli +0 -0
- {mas_cli-13.20.0.dist-info → mas_cli-13.22.0.dist-info}/top_level.txt +0 -0
mas/cli/upgrade/app.py
CHANGED
|
@@ -20,15 +20,16 @@ from halo import Halo
|
|
|
20
20
|
from ..cli import BaseApp
|
|
21
21
|
from ..validators import InstanceIDValidator
|
|
22
22
|
from .argParser import upgradeArgParser
|
|
23
|
+
from .settings import UpgradeSettingsMixin
|
|
23
24
|
|
|
24
25
|
from mas.devops.ocp import createNamespace
|
|
25
|
-
from mas.devops.mas import listMasInstances, getMasChannel
|
|
26
|
+
from mas.devops.mas import listMasInstances, getMasChannel, getWorkspaceId, verifyAppInstance
|
|
26
27
|
from mas.devops.tekton import installOpenShiftPipelines, updateTektonDefinitions, launchUpgradePipeline
|
|
27
28
|
|
|
28
29
|
logger = logging.getLogger(__name__)
|
|
29
30
|
|
|
30
31
|
|
|
31
|
-
class UpgradeApp(BaseApp):
|
|
32
|
+
class UpgradeApp(BaseApp, UpgradeSettingsMixin):
|
|
32
33
|
def upgrade(self, argv):
|
|
33
34
|
"""
|
|
34
35
|
Upgrade MAS instance
|
|
@@ -38,6 +39,7 @@ class UpgradeApp(BaseApp):
|
|
|
38
39
|
self.noConfirm = args.no_confirm
|
|
39
40
|
self.skipPreCheck = args.skip_pre_check
|
|
40
41
|
self.licenseAccepted = args.accept_license
|
|
42
|
+
self.devMode = args.dev_mode
|
|
41
43
|
|
|
42
44
|
if instanceId is None:
|
|
43
45
|
self.printH1("Set Target OpenShift Cluster")
|
|
@@ -45,6 +47,8 @@ class UpgradeApp(BaseApp):
|
|
|
45
47
|
self.connect()
|
|
46
48
|
else:
|
|
47
49
|
logger.debug("MAS instance ID is set, so we assume already connected to the desired OCP")
|
|
50
|
+
# Need to lookup target architecture because configDb2 will try to access self.architecture
|
|
51
|
+
self.lookupTargetArchitecture()
|
|
48
52
|
|
|
49
53
|
if self.dynamicClient is None:
|
|
50
54
|
print_formatted_text(HTML("<Red>Error: The Kubernetes dynamic Client is not available. See log file for details</Red>"))
|
|
@@ -71,16 +75,21 @@ class UpgradeApp(BaseApp):
|
|
|
71
75
|
|
|
72
76
|
currentChannel = getMasChannel(self.dynamicClient, instanceId)
|
|
73
77
|
if currentChannel is not None:
|
|
74
|
-
if
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
if self.devMode:
|
|
79
|
+
# This is mainly used for the scenario where Manage Foundation would be installed, because core-upgrade does not use the value of nextChannel,
|
|
80
|
+
# it uses a compatibility_matrix object in ansible-devops to determine the next channel, so nextChannel is only informative for core upgrade purposes
|
|
81
|
+
nextChannel = prompt(HTML('<Yellow>Custom channel</Yellow> '))
|
|
82
|
+
else:
|
|
83
|
+
if currentChannel not in self.upgrade_path:
|
|
84
|
+
self.fatalError(f"No upgrade available, {instanceId} is are already on the latest release {currentChannel}")
|
|
85
|
+
nextChannel = self.upgrade_path[currentChannel]
|
|
77
86
|
else:
|
|
78
87
|
# We still allow the upgrade to proceed even though we can't detect the MAS instance. The upgrade may be being
|
|
79
88
|
# queued up to run after install for instance
|
|
80
89
|
currentChannel = "Unknown"
|
|
81
90
|
nextChannel = "Unknown"
|
|
82
91
|
|
|
83
|
-
if not self.licenseAccepted:
|
|
92
|
+
if not self.licenseAccepted and not self.devMode:
|
|
84
93
|
self.printH1("License Terms")
|
|
85
94
|
self.printDescription([
|
|
86
95
|
"To continue with the upgrade, you must accept the license terms:",
|
|
@@ -93,6 +102,30 @@ class UpgradeApp(BaseApp):
|
|
|
93
102
|
if not self.yesOrNo("Do you accept the license terms"):
|
|
94
103
|
exit(1)
|
|
95
104
|
|
|
105
|
+
# The only scenario where Manage Foundation needs to be installed during an upgrade is from 9.0.x to 9.1.x (if Manage was not already installed in 9.0.x).
|
|
106
|
+
self.setParam("should_install_manage_foundation", "false")
|
|
107
|
+
if nextChannel.startswith("9.1") and not verifyAppInstance(self.dynamicClient, instanceId, "manage"):
|
|
108
|
+
self.manageAppName = "Manage foundation"
|
|
109
|
+
self.showAdvancedOptions = False
|
|
110
|
+
self.installIoT = False
|
|
111
|
+
self.installManage = True
|
|
112
|
+
self.isManageFoundation = True
|
|
113
|
+
self.printDescription([f"{self.manageAppName} installs the following capabilities: User, Security groups, Application configurator and Mobile configurator."])
|
|
114
|
+
self.printH1("Configure IBM Container Registry")
|
|
115
|
+
self.promptForString("IBM entitlement key", "ibm_entitlement_key", isPassword=True)
|
|
116
|
+
if self.devMode:
|
|
117
|
+
self.promptForString("Artifactory username", "artifactory_username")
|
|
118
|
+
self.promptForString("Artifactory token", "artifactory_token", isPassword=True)
|
|
119
|
+
self.setParam("should_install_manage_foundation", "true")
|
|
120
|
+
self.setParam("is_full_manage", "false")
|
|
121
|
+
self.setParam("mas_appws_components", "")
|
|
122
|
+
self.setParam("mas_app_settings_aio_flag", "false")
|
|
123
|
+
self.setParam("mas_app_channel_manage", nextChannel)
|
|
124
|
+
self.setParam("mas_workspace_id", getWorkspaceId(self.dynamicClient, instanceId))
|
|
125
|
+
# It has been decided that we don't need to ask for any specific Manage Settings
|
|
126
|
+
# self.manageSettings()
|
|
127
|
+
self.configDb2(silentMode=True)
|
|
128
|
+
|
|
96
129
|
self.printH1("Review Settings")
|
|
97
130
|
print_formatted_text(HTML(f"<LightSlateGrey>Instance ID ..................... {instanceId}</LightSlateGrey>"))
|
|
98
131
|
print_formatted_text(HTML(f"<LightSlateGrey>Current MAS Channel ............. {currentChannel}</LightSlateGrey>"))
|
|
@@ -101,7 +134,7 @@ class UpgradeApp(BaseApp):
|
|
|
101
134
|
|
|
102
135
|
if not self.noConfirm:
|
|
103
136
|
print()
|
|
104
|
-
continueWithUpgrade = self.yesOrNo("Proceed with these settings
|
|
137
|
+
continueWithUpgrade = self.yesOrNo("Proceed with these settings")
|
|
105
138
|
|
|
106
139
|
if self.noConfirm or continueWithUpgrade:
|
|
107
140
|
self.createTektonFileWithDigest()
|
|
@@ -122,7 +155,7 @@ class UpgradeApp(BaseApp):
|
|
|
122
155
|
h.stop_and_persist(symbol=self.successIcon, text=f"Latest Tekton definitions are installed (v{self.version})")
|
|
123
156
|
|
|
124
157
|
with Halo(text='Submitting PipelineRun for {instanceId} upgrade', spinner=self.spinner) as h:
|
|
125
|
-
pipelineURL = launchUpgradePipeline(self.dynamicClient, instanceId, self.skipPreCheck)
|
|
158
|
+
pipelineURL = launchUpgradePipeline(self.dynamicClient, instanceId, self.skipPreCheck, params=self.params)
|
|
126
159
|
if pipelineURL is not None:
|
|
127
160
|
h.stop_and_persist(symbol=self.successIcon, text=f"PipelineRun for {instanceId} upgrade submitted")
|
|
128
161
|
print_formatted_text(HTML(f"\nView progress:\n <Cyan><u>{pipelineURL}</u></Cyan>\n"))
|
mas/cli/upgrade/argParser.py
CHANGED
|
@@ -53,6 +53,13 @@ otherArgGroup.add_argument(
|
|
|
53
53
|
default=False,
|
|
54
54
|
help="Accept all license terms without prompting"
|
|
55
55
|
)
|
|
56
|
+
otherArgGroup.add_argument(
|
|
57
|
+
"--dev-mode",
|
|
58
|
+
required=False,
|
|
59
|
+
action="store_true",
|
|
60
|
+
default=False,
|
|
61
|
+
help="Configure upgrade for development mode",
|
|
62
|
+
)
|
|
56
63
|
otherArgGroup.add_argument(
|
|
57
64
|
'-h', "--help",
|
|
58
65
|
action='help',
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# *****************************************************************************
|
|
2
|
+
# Copyright (c) 2025 IBM Corporation and other Contributors.
|
|
3
|
+
#
|
|
4
|
+
# All rights reserved. This program and the accompanying materials
|
|
5
|
+
# are made available under the terms of the Eclipse Public License v1.0
|
|
6
|
+
# which accompanies this distribution, and is available at
|
|
7
|
+
# http://www.eclipse.org/legal/epl-v10.html
|
|
8
|
+
#
|
|
9
|
+
# *****************************************************************************
|
|
10
|
+
|
|
11
|
+
from ...install.settings.db2Settings import Db2SettingsMixin
|
|
12
|
+
from ...install.settings.manageSettings import ManageSettingsMixin
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class UpgradeSettingsMixin(Db2SettingsMixin, ManageSettingsMixin):
|
|
16
|
+
"""
|
|
17
|
+
This class collects all the Mixins providing interactive prompts for mas-upgrade
|
|
18
|
+
"""
|
|
19
|
+
pass
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
mas/cli/__init__.py,sha256=
|
|
2
|
-
mas/cli/cli.py,sha256=
|
|
1
|
+
mas/cli/__init__.py,sha256=sMsj85AGAJfWcbR3NTTBiivVUqDC_yKZA643Nml5Tk4,527
|
|
2
|
+
mas/cli/cli.py,sha256=oWsMIaR8_wiKLvZY9a2MCPxpUqBDbnCjigZH3AXKKBM,18175
|
|
3
3
|
mas/cli/displayMixins.py,sha256=e3lAx1DIOwsriDcNI0M2JyP1jeLOZKvId6sPrvWLyqs,5984
|
|
4
4
|
mas/cli/gencfg.py,sha256=p38Ss_ooiNHOZTJT8l0YxDaEaPwD4ZXgxEbW-S9YLNY,3311
|
|
5
5
|
mas/cli/validators.py,sha256=vi1pFA8QtqMhqtGk1NlkkNDUrlFCi53kS5wJqFGDgOU,5108
|
|
6
6
|
mas/cli/install/__init__.py,sha256=v0WJlcdrSycWGT5ofFjRDV3jTZ8AqVCz1AGxok4Khtc,508
|
|
7
|
-
mas/cli/install/app.py,sha256=
|
|
8
|
-
mas/cli/install/argBuilder.py,sha256=
|
|
9
|
-
mas/cli/install/argParser.py,sha256=
|
|
7
|
+
mas/cli/install/app.py,sha256=VXNMR7PVbQqT21sbtpsASN5jLzhI5ypFEFoRYxTRuHo,61273
|
|
8
|
+
mas/cli/install/argBuilder.py,sha256=G_aNIjWQPMILm-SntgvFyKd4Ywmgfi51ouE075v2fqY,25059
|
|
9
|
+
mas/cli/install/argParser.py,sha256=awQRyiin70wYh1UX6U9PoNN9MWmZ55Z-iZSZq_81PBs,36107
|
|
10
10
|
mas/cli/install/catalogs.py,sha256=jAYpqTuMwhJcsjv-ez7BZY0Y0T-w782G6h2s8x3g2tY,751
|
|
11
|
-
mas/cli/install/params.py,sha256=
|
|
11
|
+
mas/cli/install/params.py,sha256=YsgMLtToqiMI2g5SeX-q_IIil2uQB5TVpN8_ad4op8s,5061
|
|
12
12
|
mas/cli/install/summarizer.py,sha256=zlMMx7raa_2MCGr6_S5OsEw9skeA1GTDo9Hh4cCEq84,21874
|
|
13
13
|
mas/cli/install/settings/__init__.py,sha256=RdyBSh-rM0wkuvILVzJ1gxjOtLuQ1mF6QbEL0MyiKIY,1034
|
|
14
14
|
mas/cli/install/settings/additionalConfigs.py,sha256=u9DTwGZkPLIGfbNrz6yXsBi39EZgk2bwJuDUrNm_Nio,10008
|
|
15
|
-
mas/cli/install/settings/db2Settings.py,sha256
|
|
15
|
+
mas/cli/install/settings/db2Settings.py,sha256=YaCu1mLyRIk_bkkKPlBRv7x4gsh8YTrJ_NDelaIL8HQ,14513
|
|
16
16
|
mas/cli/install/settings/kafkaSettings.py,sha256=r1uK-IApqB9IQiSNt_8sP0wa4FPJcXU_qnadhElEOuI,7241
|
|
17
17
|
mas/cli/install/settings/manageSettings.py,sha256=whoAT3B-qQjLD6SaS_9OEmmIvbSXbcI9m-wCDyu4alI,17853
|
|
18
18
|
mas/cli/install/settings/mongodbSettings.py,sha256=UVt8vMLNpgyewlcymSystIhICnHsd0uoM9qpgezVjGg,2567
|
|
19
19
|
mas/cli/install/settings/turbonomicSettings.py,sha256=ul4eWf53b1NCzJTFsEPX6DWM23YUlWILYBygplqXYlU,1631
|
|
20
|
-
mas/cli/templates/ibm-mas-tekton.yaml,sha256=
|
|
20
|
+
mas/cli/templates/ibm-mas-tekton.yaml,sha256=ynZ8Ks15E05Tb4Bq7EWQvjmj5mlmwTvgAjkoy1KgBIo,939884
|
|
21
21
|
mas/cli/templates/jdbccfg.yml.j2,sha256=cANbwkUkKEPQp-P3_BB_Llbt94457Ciagah2hOdySIM,1644
|
|
22
22
|
mas/cli/templates/suite_mongocfg.yml.j2,sha256=WrgJUfGyvfaRIHjY5VR_zLZ5irTpV5khKNq76ejIxKU,1606
|
|
23
23
|
mas/cli/templates/pod-templates/best-effort/ibm-data-dictionary-assetdatadictionary.yml,sha256=8VG_FDFcEjWNaAOZTcS58Pe0tWOXC10SJLloNqzEMC8,757
|
|
@@ -97,10 +97,11 @@ mas/cli/update/__init__.py,sha256=v0WJlcdrSycWGT5ofFjRDV3jTZ8AqVCz1AGxok4Khtc,50
|
|
|
97
97
|
mas/cli/update/app.py,sha256=QeG-hH-QudpeoD7MEFx1e2NATyudnQSgNMLmRJbt480,39096
|
|
98
98
|
mas/cli/update/argParser.py,sha256=oOIXzB_rsI2p3og_5X5SFt_g7LURyEdLxZeiGCKq1nU,4711
|
|
99
99
|
mas/cli/upgrade/__init__.py,sha256=v0WJlcdrSycWGT5ofFjRDV3jTZ8AqVCz1AGxok4Khtc,508
|
|
100
|
-
mas/cli/upgrade/app.py,sha256=
|
|
101
|
-
mas/cli/upgrade/argParser.py,sha256=
|
|
102
|
-
|
|
103
|
-
mas_cli-13.
|
|
104
|
-
mas_cli-13.
|
|
105
|
-
mas_cli-13.
|
|
106
|
-
mas_cli-13.
|
|
100
|
+
mas/cli/upgrade/app.py,sha256=9P6Jy42JwUiErsOk8uIDQXpITuC7JR-1gn7W8w_SWwQ,8883
|
|
101
|
+
mas/cli/upgrade/argParser.py,sha256=5JxAcbwKjFKCKnbucCxg7Xacdhjphb9nRORfsgB1h_0,2196
|
|
102
|
+
mas/cli/upgrade/settings/__init__.py,sha256=QI2CUsj-NXBU1qrPOsOk4MbeWnfNq0UOF3rYYc_1l2A,775
|
|
103
|
+
mas_cli-13.22.0.data/scripts/mas-cli,sha256=BbibIX0psLEOZdcNaFcO4mJvStD0pKLAe-p-NwVTrBs,3439
|
|
104
|
+
mas_cli-13.22.0.dist-info/METADATA,sha256=J-0kA89Gtu1NSNm-hmgmkrSG3A31Q55sULEipbENGuI,2259
|
|
105
|
+
mas_cli-13.22.0.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
|
106
|
+
mas_cli-13.22.0.dist-info/top_level.txt,sha256=_Hlsp7pvMvyV14LFg-vk1hULq30j61EILnnxMFIhhc8,4
|
|
107
|
+
mas_cli-13.22.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|