Skip to content

Commit e0911aa

Browse files
Merge branch 'stable' into masaib1452
2 parents 67724b6 + c9c2dce commit e0911aa

8 files changed

Lines changed: 319 additions & 9 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,4 @@ Example of initial_users secret:
8989
```json
9090
{"john.smith1@example.com":"primary,john1,smith1","john.smith2@example.com":"primary,john2,smith2","john.smith3@example.com":"secondary,john3,smith3"}
9191
```
92+
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
# Case bundle configuration for IBM Maximo Operator Catalog 250925 (AMD64)
3+
# -----------------------------------------------------------------------------
4+
# In the future this won't be necessary as we'll be able to mirror from the
5+
# catalog itself, but not everything in the catalog supports this yet (including MAS)
6+
# so we need to use the CASE bundle mirror process still.
7+
8+
catalog_digest: sha256:7162cdaa46c0f290df79956e03d4ffda869c346a1c9752276898e8bae475128e
9+
10+
ocp_compatibility:
11+
- 4.15
12+
- 4.16
13+
- 4.17
14+
- 4.18
15+
16+
# Dependencies
17+
# -----------------------------------------------------------------------------
18+
ibm_licensing_version: 4.2.17 # Operator version 4.2.14 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-licensing)
19+
common_svcs_version: 4.12.0 # Operator version 4.12.0 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-common-services)
20+
common_svcs_version_1: 4.11.0 # Additional version 4.11.0
21+
22+
cp4d_platform_version: 5.1.1 # Operator version 5.1.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-cp-datacore/)
23+
ibm_zen_version: 6.1.1+20250218.180746.89 # For CPD5 ibm-zen has to be explicitily mirrored
24+
25+
db2u_version: 7.3.1+20250821.161005.16793 # Operator version 110509.0.6 to find the version 7.3.1+20250821.161005.16793, search db2u-operator digest on repo (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator)
26+
events_version: 5.0.1 # Operator version 5.0.1 (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-events-operator)
27+
uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change
28+
sls_version: 3.12.2 # Operator version 3.10.0 (https://github.ibm.com/maximoappsuite/ibm-sls/releases)
29+
tsm_version: 1.7.1 # Operator version 1.5.4 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases)
30+
dd_version: 1.1.19 # Operator version 1.1.14 (https://github.ibm.com/maximoappsuite/ibm-data-dictionary/releases)
31+
appconnect_version: 6.2.0 # Operator version 6.2.0 # sticking to 6.2.0 version # Please do Not Change
32+
wsl_version: 10.2.0 # used for wsl and wsl_runtimes unless wsl_runtimes_version also specified
33+
wsl_runtimes_version: 10.3.0 # cpd 5.1.3 uses version 10.3.0 of wsl runtimes but only 10.2.0 for wsl itself
34+
wml_version: 10.2.0 # Operator version 5.0.0
35+
36+
# Why are these commented out?
37+
# ccs_build: +20240528.144404.460 # ibm-ccs from version 9.0.0 requires the build version
38+
# datarefinery_build: +20240517.202103.146
39+
40+
spark_version: 10.2.0 # Operator version 7.3.0
41+
cognos_version: 27.2.0 # Operator version 25.0.0
42+
couchdb_version: 1.0.13 # Operator version 2.2.1 (1.0.13) sticking with 1.0.13 # (This is required for Assist 9.0, https://github.com/IBM/cloud-pak/blob/master/repo/case/ibm-couchdb/index.yaml)
43+
elasticsearch_version: 1.1.2667 # Operator version 1.1.2667
44+
45+
46+
# Maximo Application Suite
47+
# -----------------------------------------------------------------------------
48+
mas_core_version:
49+
9.2.x-feature: 9.2.0-pre.stable_11883 # Updated
50+
9.1.x: 9.1.4 # Updated
51+
9.0.x: 9.0.15 # Updated
52+
8.10.x: 8.10.29 # Updated
53+
8.11.x: 8.11.26 # Updated
54+
mas_assist_version:
55+
9.1.x: 9.1.3 # Updated
56+
9.0.x: 9.0.9 # Updated
57+
8.10.x: 8.7.8 # No Update
58+
8.11.x: 8.8.7 # No Update
59+
mas_hputilities_version:
60+
9.1.x: "" # Not Supported
61+
9.0.x: "" # Not Supported
62+
8.10.x: 8.6.7 # No Update
63+
8.11.x: "" # Not Supported
64+
mas_iot_version:
65+
9.1.x: 9.1.3 # Updated
66+
9.0.x: 9.0.12 # Updated
67+
8.10.x: 8.7.26 # Updated
68+
8.11.x: 8.8.22 # Updated
69+
mas_manage_version:
70+
9.2.x-feature: 9.2.0-pre.stable_13752 # Updated
71+
9.1.x: 9.1.4 # Updated
72+
9.0.x: 9.0.17 # Updated
73+
8.10.x: 8.6.30 # Updated
74+
8.11.x: 8.7.24 # Updated
75+
mas_monitor_version:
76+
9.1.x: 9.1.3 # Updated
77+
9.0.x: 9.0.13 # Updated
78+
8.10.x: 8.10.23 # Updated
79+
8.11.x: 8.11.21 # Updated
80+
mas_optimizer_version:
81+
9.2.x-feature: 9.2.0-pre.stable_525 # Updated
82+
9.1.x: 9.1.4 # No Update
83+
9.0.x: 9.0.15 # No Update
84+
8.10.x: 8.4.22 # No Update
85+
8.11.x: 8.5.21 # No Update
86+
mas_predict_version:
87+
9.1.x: 9.1.2 # Updated
88+
9.0.x: 9.0.9 # Updated
89+
8.10.x: 8.8.10 # Updated
90+
8.11.x: 8.9.12 # Updated
91+
mas_visualinspection_version:
92+
9.1.x: 9.1.3 # Updated
93+
9.0.x: 9.0.12 # Updated
94+
8.10.x: 8.8.4 # No Update
95+
8.11.x: 8.9.15 # Updated
96+
mas_facilities_version:
97+
9.1.x: 9.1.3 # Updated
98+
9.0.x: "" # Not Supported
99+
8.10.x: "" # Not Supported
100+
8.11.x: "" # Not Supported
101+
102+
103+
# Maximo AI Service
104+
# ------------------------------------------------------------------------------
105+
aiservice_version:
106+
9.1.x: 9.1.7 # Updated
107+
108+
# Extra Images for UDS
109+
# ------------------------------------------------------------------------------
110+
uds_extras_version: 1.5.0
111+
112+
# Extra Images for Mongo
113+
# ------------------------------------------------------------------------------
114+
mongo_extras_version_default: 7.0.23
115+
116+
# Variables used to mirror additional mongo image versions
117+
mongo_extras_version_4: 4.4.21
118+
mongo_extras_version_5: 5.0.23
119+
mongo_extras_version_6: 6.0.12
120+
mongo_extras_version_7: 7.0.23
121+
122+
# Extra Images for Db2u
123+
# ------------------------------------------------------------------------------
124+
db2u_extras_version: 1.0.6 # No Update
125+
db2u_filter: db2
126+
127+
# Extra Images for IBM Watson Discovery
128+
# ------------------------------------------------------------------------------
129+
#wd_extras_version: 1.0.4
130+
131+
# Extra Images for Amlen
132+
# ------------------------------------------------------------------------------
133+
amlen_extras_version: 1.1.3
134+
135+
# Default Cloud Pak for Data version
136+
# ------------------------------------------------------------------------------
137+
cpd_product_version_default: 5.1.3
138+
139+
# Extra Images for kmodels
140+
# ------------------------------------------------------------------------------
141+
kmodels_extras_version_default: 1.0.14
142+
143+
manage_extras_913: 9.1.3
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
# Case bundle configuration for IBM Maximo Operator Catalog 250925 (PPC)
3+
# -----------------------------------------------------------------------------
4+
# In the future this won't be necessary as we'll be able to mirror from the
5+
# catalog itself, but not everything in the catalog supports this yet (including MAS)
6+
# so we need to use the CASE bundle mirror process still.
7+
8+
catalog_digest: sha256:5ae3c0f01d691235c5d42d09d035f5a3d80bcedeb08e28423a8e80c75644547a
9+
10+
uds_version: 2.0.12 # Operator version 2.0.12 # sticking to 2.0.12 version # Please do Not Change
11+
sls_version: 3.12.2 # Operator version 3.10.0 (https://github.ibm.com/maximoappsuite/ibm-sls/releases)
12+
tsm_version: 1.7.1 # Operator version 1.5.4 (https://github.ibm.com/maximoappsuite/ibm-truststore-mgr/releases)
13+
db2u_version: 7.3.1+20250821.161005.16793 # Operator version 110509.0.2 to find the version 7.2.0, search CASE_VERSION in db2u, catalog.yaml into ibm-maximo-operator-catalog (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator)
14+
15+
# Maximo Application Suite
16+
# -----------------------------------------------------------------------------
17+
mas_core_version:
18+
9.2.x-feature: 9.2.0-pre.stable_11883 # Updated
19+
9.1.x: 9.1.4 # Updated
20+
9.0.x: 9.0.15 # Updated
21+
8.10.x: "" # Not Supported
22+
8.11.x: "" # Not Supported
23+
mas_manage_version:
24+
9.2.x-feature: 9.2.0-pre.stable_13752 # Updated
25+
9.1.x: 9.1.4 # No Update
26+
9.0.x: 9.0.17 # Updated
27+
8.10.x: "" # Not Supported
28+
8.11.x: "" # Not Supported
29+
30+
# Extra Images for UDS
31+
# ------------------------------------------------------------------------------
32+
uds_extras_version: 1.5.0
33+
34+
# Extra Images for Mongo
35+
# ------------------------------------------------------------------------------
36+
mongo_extras_version_default: 7.0.12
37+
38+
# Variables used to mirror additional mongo image versions
39+
mongo_extras_version_4: 4.4.21
40+
mongo_extras_version_5: 5.0.23
41+
mongo_extras_version_6: 6.0.12
42+
mongo_extras_version_7: 7.0.12

src/mas/devops/mas.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,26 @@ def verifyMasInstance(dynClient: DynamicClient, instanceId: str) -> bool:
179179
return False
180180

181181

182+
def verifyAiServiceInstance(dynClient: DynamicClient, instanceId: str) -> bool:
183+
"""
184+
Validate that the chosen AI Service instance exists
185+
"""
186+
try:
187+
aiserviceAPI = dynClient.resources.get(api_version="aiservice.ibm.com/v1", kind="AIServiceApp")
188+
aiserviceAPI.get(name=instanceId, namespace=f"aiservice-{instanceId}")
189+
return True
190+
except NotFoundError:
191+
print("NOT FOUND")
192+
return False
193+
except ResourceNotFoundError:
194+
# The AIServiceApp CRD has not even been installed in the cluster
195+
print("RESOURCE NOT FOUND")
196+
return False
197+
except UnauthorizedError as e:
198+
logger.error(f"Error: Unable to verify AI Service instance due to failed authorization: {e}")
199+
return False
200+
201+
182202
def verifyAppInstance(dynClient: DynamicClient, instanceId: str, applicationId: str) -> bool:
183203
"""
184204
Validate that the chosen app instance exists
@@ -260,6 +280,17 @@ def getAppsSubscriptionChannel(dynClient: DynamicClient, instanceId: str) -> lis
260280
return []
261281

262282

283+
def getAiserviceChannel(dynClient: DynamicClient, instanceId: str) -> str:
284+
"""
285+
Get the AI Service channel from the subscription
286+
"""
287+
aiserviceSubscription = getSubscription(dynClient, f"aiservice-{instanceId}", "ibm-aiservice")
288+
if aiserviceSubscription is None:
289+
return None
290+
else:
291+
return aiserviceSubscription.spec.channel
292+
293+
263294
def updateIBMEntitlementKey(dynClient: DynamicClient, namespace: str, icrUsername: str, icrPassword: str, artifactoryUsername: str = None, artifactoryPassword: str = None, secretName: str = "ibm-entitlement") -> ResourceInstance:
264295
if secretName is None:
265296
secretName = "ibm-entitlement"

src/mas/devops/ocp.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,19 @@ def waitForCRD(dynClient: DynamicClient, crdName: str) -> bool:
151151
try:
152152
crd = crdAPI.get(name=crdName)
153153
conditions = crd.status.conditions
154-
for condition in conditions:
155-
if condition.type == "Established":
156-
if condition.status == "True":
157-
foundReadyCRD = True
158-
else:
159-
logger.debug(f"Waiting 5s for {crdName} CRD to be ready before checking again ...")
160-
sleep(5)
161-
continue
154+
if conditions is None:
155+
logger.debug(f"Looking for status.conditions to be available to iterate for {crdName}")
156+
sleep(5)
157+
continue
158+
else:
159+
for condition in conditions:
160+
if condition.type == "Established":
161+
if condition.status == "True":
162+
foundReadyCRD = True
163+
else:
164+
logger.debug(f"Waiting 5s for {crdName} CRD to be ready before checking again ...")
165+
sleep(5)
166+
continue
162167
except NotFoundError:
163168
logger.debug(f"Waiting 5s for {crdName} CRD to be installed before checking again ...")
164169
sleep(5)

src/mas/devops/tekton.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,3 +462,35 @@ def launchAiServiceInstallPipeline(dynClient: DynamicClient, params: dict) -> st
462462

463463
pipelineURL = f"{getConsoleURL(dynClient)}/k8s/ns/aiservice-{instanceId}-pipelines/tekton.dev~v1beta1~PipelineRun/{instanceId}-install-{timestamp}"
464464
return pipelineURL
465+
466+
467+
def launchAiServiceUpgradePipeline(dynClient: DynamicClient,
468+
aiserviceInstanceId: str,
469+
skipPreCheck: bool = False,
470+
aiserviceChannel: str = "",
471+
params: dict = {}) -> str:
472+
"""
473+
Create a PipelineRun to upgrade the chosen AI Service instance
474+
"""
475+
pipelineRunsAPI = dynClient.resources.get(api_version="tekton.dev/v1beta1", kind="PipelineRun")
476+
namespace = f"aiservice-{aiserviceInstanceId}-pipelines"
477+
timestamp = datetime.now().strftime("%y%m%d-%H%M")
478+
# Create the PipelineRun
479+
templateDir = path.join(path.abspath(path.dirname(__file__)), "templates")
480+
env = Environment(
481+
loader=FileSystemLoader(searchpath=templateDir)
482+
)
483+
template = env.get_template("pipelinerun-aiservice-upgrade.yml.j2")
484+
renderedTemplate = template.render(
485+
timestamp=timestamp,
486+
aiservice_instance_id=aiserviceInstanceId,
487+
skip_pre_check=skipPreCheck,
488+
aiservice_channel=aiserviceChannel,
489+
**params
490+
)
491+
logger.debug(renderedTemplate)
492+
pipelineRun = yaml.safe_load(renderedTemplate)
493+
pipelineRunsAPI.apply(body=pipelineRun, namespace=namespace)
494+
495+
pipelineURL = f"{getConsoleURL(dynClient)}/k8s/ns/aiservice-{aiserviceInstanceId}-pipelines/tekton.dev~v1beta1~PipelineRun/{aiserviceInstanceId}-upgrade-{timestamp}"
496+
return pipelineURL
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
apiVersion: tekton.dev/v1beta1
3+
kind: PipelineRun
4+
metadata:
5+
name: "{{ aiservice_instance_id }}-upgrade-{{ timestamp }}"
6+
labels:
7+
tekton.dev/pipeline: aiservice-upgrade
8+
spec:
9+
pipelineRef:
10+
name: aiservice-upgrade
11+
12+
serviceAccountName: "{{ service_account_name | default('pipeline', True) }}"
13+
timeouts:
14+
pipeline: "0"
15+
16+
params:
17+
# Target AI Service Instance
18+
# -------------------------------------------------------------------------
19+
- name: aiservice_instance_id
20+
value: "{{ aiservice_instance_id }}"
21+
- name: aiservice_channel
22+
value: "{{ aiservice_channel }}"
23+
24+
# IBM Entitlement Key
25+
# -------------------------------------------------------------------------
26+
- name: ibm_entitlement_key
27+
value: "{{ ibm_entitlement_key }}"
28+
29+
{%- if skip_pre_check is defined and skip_pre_check != "" %}
30+
# Skip pre-check
31+
# -------------------------------------------------------------------------
32+
- name: skip_pre_check
33+
value: "{{ skip_pre_check }}"
34+
{%- endif %}
35+
{%- if artifactory_username is defined and artifactory_username != "" %}
36+
37+
# Enable development catalogs
38+
# -------------------------------------------------------------------------
39+
- name: artifactory_username
40+
value: "{{ artifactory_username }}"
41+
- name: artifactory_token
42+
value: "{{ artifactory_token }}"
43+
{%- endif %}
44+
45+
workspaces:
46+
# The generated configuration files
47+
# -------------------------------------------------------------------------
48+
- name: shared-configs
49+
persistentVolumeClaim:
50+
claimName: config-pvc
51+
52+
# PodTemplates configurations
53+
# -------------------------------------------------------------------------
54+
- name: shared-pod-templates
55+
secret:
56+
secretName: pipeline-pod-templates

test/src/test_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_list_catalogs():
2626
def test_get_newest_catalog_tag():
2727
catalogTag = getNewestCatalogTag("amd64")
2828
# Reminder: update this test when adding a new catalog each month!
29-
assert catalogTag == "v9-250925-amd64"
29+
assert catalogTag == "v9-251010-amd64"
3030

3131

3232
def test_get_newest_catalog_tag_fail():

0 commit comments

Comments
 (0)