Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[major] Add license terms in mas upgrade #1393

Merged
merged 129 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
08b83a0
[patch] nov patch prep
anilprajapatiibm Oct 8, 2024
65cbbe4
[patch] update local ansible-devops tar.gz & Catalog Digest
anilprajapatiibm Oct 16, 2024
f833ebd
[patch] add mongo 7 to docs
twhart Oct 17, 2024
3d815ee
[patch] update local ansible-devops tar.gz & Catalog Digest
anilprajapatiibm Oct 21, 2024
a9755e9
[patch] handle cp4d 5.0.0 install from nov patch
anilprajapatiibm Oct 22, 2024
6d89f36
[patch] fix default values cpd and mongo
anilprajapatiibm Oct 22, 2024
ef9bd27
[patch] update local ansible-devops tar.gz
anilprajapatiibm Oct 25, 2024
fffb47a
[patch] update local ibm-mas_devop.tar.gz
parveenkumaribm Oct 28, 2024
6d04367
[patch] change default cpd back to 4.8.0
IanBoden Oct 30, 2024
f0480f3
december catalog
IanBoden Oct 30, 2024
ff42e77
another fix
IanBoden Oct 30, 2024
f060ee9
I'm sure I fixed this
IanBoden Oct 30, 2024
b1a6e6f
new version of ansible-devops
IanBoden Oct 30, 2024
0ab0a41
new version
IanBoden Oct 30, 2024
2721a2f
new ansible-devops
IanBoden Oct 31, 2024
2a6f466
new version
IanBoden Oct 31, 2024
9ee1654
new version
IanBoden Oct 31, 2024
80062a9
new version
IanBoden Oct 31, 2024
c158a36
new version
IanBoden Oct 31, 2024
135473f
new version
IanBoden Oct 31, 2024
5ccd564
new version
IanBoden Nov 1, 2024
36ba10d
new version
IanBoden Nov 1, 2024
ddbbded
new ansible version
IanBoden Nov 5, 2024
1a90a35
new devops
IanBoden Nov 12, 2024
330557a
[patch] merge mess up
IanBoden Nov 13, 2024
4f4cba4
[patch] missing coma
IanBoden Nov 13, 2024
b1b630a
new ansible
IanBoden Nov 14, 2024
b4a8845
new ansible
IanBoden Nov 18, 2024
f1fc507
new ansible
IanBoden Nov 19, 2024
60082f3
new ansible
IanBoden Nov 19, 2024
8f5babc
new ansible
IanBoden Nov 19, 2024
41f5327
[patch] PREVIOUS_CATALOG update
parveenkumaribm Nov 20, 2024
f989a86
[patch] digest amd64 & 9-241205 added
parveenkumaribm Nov 20, 2024
9c24f42
[patch] digest update
parveenkumaribm Nov 20, 2024
e1813e8
[patch] update mkdocs.yml
parveenkumaribm Nov 20, 2024
d78669c
Merge branch 'master' into deccatalog
anilprajapatiibm Nov 20, 2024
3f534ab
[patch] tar file update
parveenkumaribm Nov 20, 2024
6f3fa0d
Merge branch 'deccatalog' of https://github.com/ibm-mas/cli into decc…
parveenkumaribm Nov 20, 2024
1046d0a
new ansible
IanBoden Nov 21, 2024
701be0f
new ansible
IanBoden Nov 21, 2024
ccfa1c8
Merge branch 'master' into deccatalog
anilprajapatiibm Nov 25, 2024
57da0f1
[patch] tar file update
parveenkumaribm Nov 25, 2024
54f79ee
[patch] add local python-devops
anilprajapatiibm Nov 25, 2024
f9cac89
[patch] update local python-devops
anilprajapatiibm Nov 25, 2024
eb507d6
[patch] update digest
anilprajapatiibm Nov 25, 2024
63214cc
Merge branch 'master' into deccatalog
anilprajapatiibm Nov 25, 2024
ae29d74
[patch] update devops build for deccatalog
terenceq Nov 25, 2024
82a05fa
[patch] update local python devops tar
anilprajapatiibm Nov 26, 2024
0c170dd
[patch] update python-devops tar
anilprajapatiibm Nov 26, 2024
1980603
Merge branch 'master' into deccatalog
anilprajapatiibm Nov 26, 2024
4b480eb
[minor] None of the commits carry a minor prefix yet
durera Nov 26, 2024
b094fb5
[patch] update docs
IanBoden Nov 26, 2024
a59e968
Updates
durera Nov 26, 2024
579c6c8
Merge branch 'master' into deccatalog
durera Nov 26, 2024
a196679
[patch] what's new
IanBoden Nov 26, 2024
b646dad
[patch] added release notes link for ocp 4.16 and cpd 5
Nov 26, 2024
b9f469b
[patch] update mas devops zip
anilprajapatiibm Nov 26, 2024
8bea404
[patch] update local python-devops tar
anilprajapatiibm Nov 27, 2024
629ddf4
Merge branch 'master' into deccatalog
anilprajapatiibm Nov 27, 2024
fb91738
[patch] update local ansible-devops tar
anilprajapatiibm Nov 27, 2024
412c198
Merge branch 'deccatalog' of https://github.com/ibm-mas/cli into decc…
anilprajapatiibm Nov 27, 2024
97ce668
[patch] update mas and ibm-mas .tar file
parveenkumaribm Nov 28, 2024
02771aa
[patch] digest update
parveenkumaribm Nov 28, 2024
b775575
Merge branch 'master' into deccatalog
parveenkumaribm Nov 28, 2024
19147fd
[patch] fix airgap cp4d 5.0
IanBoden Nov 28, 2024
1f47f75
new ansible
IanBoden Nov 28, 2024
591fedc
new ansible
IanBoden Nov 28, 2024
11b4d1a
new ansible
IanBoden Nov 29, 2024
335ab7d
Merge branch 'master' into deccatalog
parveenkumaribm Nov 29, 2024
fce995d
[patch] update .tar file
parveenkumaribm Nov 29, 2024
2e7d1c4
[patch] devops tar file update
parveenkumaribm Dec 2, 2024
4a68b2c
Merge branch 'master' into deccatalog
parveenkumaribm Dec 2, 2024
8cb1555
[patch] tar file update
parveenkumaribm Dec 3, 2024
50d2f88
new python
IanBoden Dec 4, 2024
da3ba97
Merge branch 'master' into deccatalog
Dec 4, 2024
eb09ac1
[patch] Add 9.1.x-feature channel support for Dec (#1304)
rawa-resul Dec 4, 2024
389602f
[patch] tar file updated
parveenkumaribm Dec 4, 2024
31cacd2
[patch] update digest
parveenkumaribm Dec 4, 2024
5f24f11
new cli-base
IanBoden Dec 4, 2024
258101f
back to cli-base:latest
IanBoden Dec 4, 2024
bf4cdce
new ansible
IanBoden Dec 4, 2024
a50b3f6
[patch] digest & tar file update
parveenkumaribm Dec 4, 2024
1a18059
[patch] v9-241205-s390x.yaml file update
parveenkumaribm Dec 4, 2024
dd2b8e2
[patch] use stable cli-base
IanBoden Dec 4, 2024
26a2dc1
[patch] License terms prompt changes
Dec 5, 2024
ddc3d3f
[patch] Update mas_devops package
Dec 5, 2024
c901fbf
[patch] Test mas-devops == 1.11.2-pre.MASR-2387
Dec 5, 2024
0f2ac1a
[patch] revert changes
Dec 5, 2024
ccfbbcd
[patch] Fix License Terms summary
Dec 5, 2024
b18754c
[patch] install mas_devops.tar.gz during python job
Dec 5, 2024
3593c7e
[patch] Test removing local mas-devops package
Dec 5, 2024
f6817c9
[patch] Add mas_devops.tar.gz again
Dec 5, 2024
d7d2114
[patch] Cleanup
Dec 5, 2024
73ed2b7
[patch] Update license text
Dec 5, 2024
70d3cc9
[patch] Fix selection
Dec 6, 2024
c4e146d
[patch] Fix license spacing
Dec 6, 2024
62fb721
[patch] Add -accept-licene arg in upgrade
Dec 6, 2024
d0e77f6
[patch] Fix typo
Dec 6, 2024
b1269a2
[patch] Refactoring upgrade.py
Dec 6, 2024
2a1e901
[patch] Update mas_devops.tar.gz
Dec 6, 2024
5a865d1
Merge branch 'master' into MASR-2387
Dec 6, 2024
d03fb30
[patch] Use master of ansible-devops
Dec 6, 2024
42aca7f
[patch] use latest ansible-devops
Dec 6, 2024
3059769
[patch] Pull latest ansible-devops
Dec 6, 2024
7d823f5
[patch] Set CLI imagePullPolicy to Always
Dec 6, 2024
3ba021b
[patch] Set image_pull_policy for cli in upgrade
Dec 7, 2024
9fd32f3
[patch] Fixes
Dec 7, 2024
57c419b
[patch] Undo imagepullpolicy
Dec 9, 2024
7cbbbe9
Merge branch 'master' into MASR-2387
Dec 9, 2024
cd969bc
[patch] Fix catalog order
Dec 9, 2024
563efb1
[patch] Use custom ansible-devops
Dec 9, 2024
c516a36
[patch] Update ansible-devops
Dec 9, 2024
5f10d1f
[patch] Update ansible-devops
Dec 9, 2024
e1e264e
[patch] Update ansible-devops
Dec 9, 2024
a0ebcec
Merge branch 'master' into MASR-2387
Dec 9, 2024
153f9f6
[patch] Update ansible-devops
Dec 9, 2024
8127bed
[patch] Update ansible-devops
Dec 9, 2024
87d1ac2
Merge branch 'master' into MASR-2387
rawa-resul Dec 9, 2024
be04308
Merge branch 'master' into MASR-2387
Dec 10, 2024
9702b1c
[patch] Update ansible-devops
Dec 10, 2024
8e05f7b
[patch] Dynamically generate catalogTable
Dec 12, 2024
f7ed0ad
[patch] Further fixes for catalogTable
Dec 12, 2024
1137492
Merge branch 'master' into MASR-2387
Dec 12, 2024
ed11940
[patch] Update ansible-devops
Dec 12, 2024
07bdbac
Merge branch 'master' into MASR-2387
rawa-resul Dec 12, 2024
4f177b8
[patch] Cleanup
Dec 12, 2024
da51a60
[patch] Undo changes
Dec 12, 2024
3de72d3
[patch] Add new line
Dec 12, 2024
de08562
Merge branch 'master' into MASR-2387
rawa-resul Dec 12, 2024
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
5 changes: 5 additions & 0 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ jobs:
python -m pip install --upgrade pip
pip install .[dev]

if [[ -e $GITHUB_WORKSPACE/image/cli/install/mas_devops.tar.gz ]]; then
echo "Found local Python package ($GITHUB_WORKSPACE/image/cli/install/mas_devops.tar.gz) in this PR."
python -m pip install $GITHUB_WORKSPACE/image/cli/install/mas_devops.tar.gz
fi

- name: Lint
id: lint
run: |
Expand Down
15 changes: 15 additions & 0 deletions python/src/mas/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,21 @@ def __init__(self):
},
}

self.licenses = {
"8.9.x": " - <u>https://ibm.biz/MAS89-License</u>",
"8.10.x": " - <u>https://ibm.biz/MAS810-License</u>",
"8.11.x": " - <u>https://ibm.biz/MAS811-License</u>\n - <u>https://ibm.biz/MAXIT81-License</u>",
"9.0.x": " - <u>https://ibm.biz/MAS90-License</u>\n - <u>https://ibm.biz/MaximoIT90-License</u>\n - <u>https://ibm.biz/MAXArcGIS90-License</u>",
"9.1.x-feature": " - <u>https://ibm.biz/MAS90-License</u>\n - <u>https://ibm.biz/MaximoIT90-License</u>\n - <u>https://ibm.biz/MAXArcGIS90-License</u>\n\nBe aware, this channel subscription is supported for non-production use only. \nIt allows early access to new features for evaluation in non-production environments. \nThis subscription is offered alongside and in parallel with our normal maintained streams. \nWhen using this subscription, IBM Support will only accept cases for the latest available bundle deployed in a non-production environment. \nSeverity must be either 3 or 4 and cases cannot be escalated. \nPlease refer to IBM documentation for more details.\n",
}

self.upgrade_path = {
"9.0.x": "9.1.x-feature",
"8.11.x": "9.0.x",
"8.10.x": "8.11.x",
"8.9.x": "8.10.x",
}

self.spinner = {
"interval": 80,
"frames": [" ⠋", " ⠙", " ⠹", " ⠸", " ⠼", " ⠴", " ⠦", " ⠧", " ⠇", " ⠏"]
Expand Down
88 changes: 23 additions & 65 deletions python/src/mas/cli/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,11 @@ def validateInternalRegistryAvailable(self):

@logMethodCall
def licensePrompt(self):
licenses = {
"8.9.x": " - <u>https://ibm.biz/MAS89-License</u>",
"8.10.x": " - <u>https://ibm.biz/MAS810-License</u>",
"8.11.x": " - <u>https://ibm.biz/MAS811-License</u>\n - <u>https://ibm.biz/MAXIT81-License</u>",
"9.0.x": " - <u>https://ibm.biz/MAS90-License</u>\n - <u>https://ibm.biz/MaximoIT90-License</u>\n - <u>https://ibm.biz/MAXArcGIS90-License</u>",
"9.1.x-feature": " - <u>https://ibm.biz/MAS90-License</u>\n - <u>https://ibm.biz/MaximoIT90-License</u>\n - <u>https://ibm.biz/MAXArcGIS90-License</u>\n\n - Be aware, this channel subscription is supported for non-production use only. It allows early access to new features for evaluation is non-production environments. This subscription is offered alongside and in parallel with our normal maintained streams. When using this subscription, IBM Support will only accept cases for the latest available bundle deployed in a non-production environment. Severity must be either 3 or 4 and cases cannot be escalated. Please refer to IBM documentation for more details.\n",
}

if not self.licenseAccepted:
self.printH1("License Terms")
self.printDescription([
"To continue with the installation, you must accept the license terms:",
licenses[self.getParam('mas_channel')]
self.licenses[self.getParam('mas_channel')]
])

if self.noConfirm:
Expand Down Expand Up @@ -175,62 +167,28 @@ def processCatalogChoice(self) -> list:
self.catalogCp4dVersion = self.chosenCatalog["cpd_product_version_default"]
self.catalogMongoDbVersion = self.chosenCatalog["mongo_extras_version_default"]

self.catalogReleases = ["9.0.x", "8.11.x", "8.10.x"]

self.catalogTable = [
{
"": "Core",
"9.1.x-feature": self.chosenCatalog["mas_core_version"]["9.1.x-feature"],
"9.0.x": self.chosenCatalog["mas_core_version"]["9.0.x"],
"8.11.x": self.chosenCatalog["mas_core_version"]["8.11.x"],
"8.10.x": self.chosenCatalog["mas_core_version"]["8.10.x"]
},
{
"": "Manage",
"9.1.x-feature": self.chosenCatalog["mas_manage_version"]["9.1.x-feature"],
"9.0.x": self.chosenCatalog["mas_manage_version"]["9.0.x"],
"8.11.x": self.chosenCatalog["mas_manage_version"]["8.11.x"],
"8.10.x": self.chosenCatalog["mas_manage_version"]["8.10.x"]
},
{
"": "IoT",
"9.0.x": self.chosenCatalog["mas_iot_version"]["9.0.x"],
"8.11.x": self.chosenCatalog["mas_iot_version"]["8.11.x"],
"8.10.x": self.chosenCatalog["mas_iot_version"]["8.10.x"]
},
{
"": "Monitor",
"9.0.x": self.chosenCatalog["mas_monitor_version"]["9.0.x"],
"8.11.x": self.chosenCatalog["mas_monitor_version"]["8.11.x"],
"8.10.x": self.chosenCatalog["mas_monitor_version"]["8.10.x"]
},
{
"": "Assist",
"9.0.x": self.chosenCatalog["mas_assist_version"]["9.0.x"],
"8.11.x": self.chosenCatalog["mas_assist_version"]["8.11.x"],
"8.10.x": self.chosenCatalog["mas_assist_version"]["8.10.x"]
},
{
"": "Optimizer",
"9.1.x-feature": self.chosenCatalog["mas_optimizer_version"]["9.1.x-feature"],
"9.0.x": self.chosenCatalog["mas_optimizer_version"]["9.0.x"],
"8.11.x": self.chosenCatalog["mas_optimizer_version"]["8.11.x"],
"8.10.x": self.chosenCatalog["mas_optimizer_version"]["8.10.x"]
},
{
"": "Predict",
"9.0.x": self.chosenCatalog["mas_predict_version"]["9.0.x"],
"8.11.x": self.chosenCatalog["mas_predict_version"]["8.11.x"],
"8.10.x": self.chosenCatalog["mas_predict_version"]["8.10.x"]
},
{
"": "Inspection",
"9.1.x-feature": self.chosenCatalog["mas_visualinspection_version"]["9.1.x-feature"],
"9.0.x": self.chosenCatalog["mas_visualinspection_version"]["9.0.x"],
"8.11.x": self.chosenCatalog["mas_visualinspection_version"]["8.11.x"],
"8.10.x": self.chosenCatalog["mas_visualinspection_version"]["8.10.x"]
}
]
self.catalogReleases = []
self.catalogTable = []

applications = {
"Core": "mas_core_version",
"Manage": "mas_manage_version",
"IoT": "mas_iot_version",
"Monitor": "mas_monitor_version",
"Assist": "mas_assist_version",
"Optimizer": "mas_optimizer_version",
"Predict": "mas_predict_version",
"Inspection": "mas_visualinspection_version",
}

# Dynamically fetch the channels from the chosen catalog
# based on mas core
for channel in self.chosenCatalog["mas_core_version"]:
self.catalogReleases.append(channel)

# Generate catalogTable
for application, key in applications.items():
self.catalogTable.append({"": application} | self.chosenCatalog[key])

summary = [
"",
Expand Down
6 changes: 3 additions & 3 deletions python/src/mas/cli/install/catalogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
# *****************************************************************************
supportedCatalogs = {
"amd64": [
"v9-241205-amd64",
"v9-241107-amd64",
"v9-241003-amd64",
"v9-240827-amd64",
"v9-241205-amd64"
],
"s390x": [
"v9-241205-s390x",
"v9-241107-s390x",
"v9-241205-s390x"
]
],
}
26 changes: 25 additions & 1 deletion python/src/mas/cli/upgrade/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from .argParser import upgradeArgParser

from mas.devops.ocp import createNamespace
from mas.devops.mas import listMasInstances, verifyMasInstance
from mas.devops.mas import listMasInstances, verifyMasInstance, getMasChannel
from mas.devops.tekton import installOpenShiftPipelines, updateTektonDefinitions, launchUpgradePipeline

logger = logging.getLogger(__name__)
Expand All @@ -37,6 +37,8 @@ def upgrade(self, argv):
instanceId = args.mas_instance_id
self.noConfirm = args.no_confirm
self.skipPreCheck = args.skip_pre_check
self.licenseAccepted = args.accept_license
next_mas_channel = None

if instanceId is None:
self.printH1("Set Target OpenShift Cluster")
Expand Down Expand Up @@ -73,8 +75,30 @@ def upgrade(self, argv):
print_formatted_text(HTML(f"<Red>Error: MAS instance {instanceId} not found on this cluster</Red>"))
sys.exit(1)

current_mas_channel = getMasChannel(self.dynamicClient, instanceId)

if current_mas_channel not in self.upgrade_path:
self.fatalError(f"No upgrade available, {instanceId} is are already on the latest release {current_mas_channel}")

next_mas_channel = self.upgrade_path[current_mas_channel]

if not self.licenseAccepted:
self.printH1("License Terms")
self.printDescription([
"To continue with the upgrade, you must accept the license terms:",
self.licenses[next_mas_channel]
])

if self.noConfirm:
self.fatalError("You must accept the license terms with --accept-license when using the --no-confirm flag")
else:
if not self.yesOrNo("Do you accept the license terms"):
exit(1)

self.printH1("Review Settings")
print_formatted_text(HTML(f"<LightSlateGrey>Instance ID ..................... {instanceId}</LightSlateGrey>"))
print_formatted_text(HTML(f"<LightSlateGrey>Current MAS Channel ............. {current_mas_channel}</LightSlateGrey>"))
print_formatted_text(HTML(f"<LightSlateGrey>Next MAS Channel ................ {next_mas_channel}</LightSlateGrey>"))
print_formatted_text(HTML(f"<LightSlateGrey>Skip Pre-Upgrade Checks ......... {self.skipPreCheck}</LightSlateGrey>"))

if not self.noConfirm:
Expand Down
7 changes: 6 additions & 1 deletion python/src/mas/cli/upgrade/argParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
required=False,
help="The MAS instance ID to be upgraded"
)

otherArgGroup = upgradeArgParser.add_argument_group('More')
otherArgGroup.add_argument(
'--skip-pre-check',
Expand All @@ -48,6 +47,12 @@
default=False,
help="Launch the upgrade without prompting for confirmation",
)
otherArgGroup.add_argument(
"--accept-license",
action="store_true",
default=False,
help="Accept all license terms without prompting"
)
otherArgGroup.add_argument(
'-h', "--help",
action='help',
Expand Down
Loading