Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9401136
wip
Mar 24, 2026
e3b895b
Cluster role migration
joshiricha444 Apr 8, 2026
77171bc
set default for aiservice_instance_ids
joshiricha444 Apr 8, 2026
dcc1b8d
set default value for lookup template
joshiricha444 Apr 8, 2026
c87a9e3
wire AI Service migration into mas-update flow
joshiricha444 Apr 8, 2026
12e8348
[minor fix] Restore safe instance review flow for AI Service update
joshiricha444 Apr 10, 2026
5c2f19c
minor fix
joshiricha444 Apr 10, 2026
b6f8d60
Perform ClusterRole migration during FC update
joshiricha444 Apr 10, 2026
e0cc57d
Migration added to the tekton task
joshiricha444 Apr 10, 2026
f7b2aa9
Migration added to the tekton task
joshiricha444 Apr 10, 2026
13b598c
[patch] Add AI Service migration task and params to mas update
joshiricha444 Apr 10, 2026
94ad377
add debug
Apr 10, 2026
4e1d42f
Testing updation
joshiricha444 Apr 10, 2026
ce2ab09
Merge branch 'masaib-1994' of https://github.com/ibm-mas/cli into mas…
joshiricha444 Apr 10, 2026
4422013
Run custom ansible build
joshiricha444 Apr 13, 2026
0994d66
Debug point
joshiricha444 Apr 13, 2026
39937de
remove unused params
Apr 13, 2026
b988996
Merge branch 'masaib-1994' of github.com:ibm-mas/cli into masaib-1994
Apr 13, 2026
6db5cb4
Removed unused params
joshiricha444 Apr 13, 2026
8dd860a
Merge branch 'masaib-1994' of https://github.com/ibm-mas/cli into mas…
joshiricha444 Apr 13, 2026
25c690c
Removed unsed params
joshiricha444 Apr 13, 2026
c0c1d36
Revert code
joshiricha444 Apr 13, 2026
9e76a76
Removed unused params
joshiricha444 Apr 13, 2026
3f0e0d6
Merge branch 'master' into masaib-1994
boonware Apr 13, 2026
a225d20
Removed unsed arams in argParser
joshiricha444 Apr 13, 2026
fb172fb
Merge branch 'masaib-1994' of https://github.com/ibm-mas/cli into mas…
joshiricha444 Apr 13, 2026
ceee687
Minor fix to rebuild
joshiricha444 Apr 13, 2026
4a6180c
minor fix
joshiricha444 Apr 13, 2026
66d0376
minor fix to test build
joshiricha444 Apr 13, 2026
5e1ba43
minor fix
joshiricha444 Apr 13, 2026
8e56401
Test custom ansible build
joshiricha444 Apr 13, 2026
5e79ff2
Test custom ansible collection
joshiricha444 Apr 14, 2026
b4e4e1b
unused file removal
joshiricha444 Apr 14, 2026
2ba5402
remove param
Apr 14, 2026
dbbb7ed
Merge branch 'masaib-1994' of github.com:ibm-mas/cli into masaib-1994
Apr 14, 2026
4da61a8
remove param
Apr 14, 2026
344c8a5
Merge branch 'master' into masaib-1994
boonware Apr 14, 2026
2063219
style
Apr 14, 2026
4f95051
Merge branch 'masaib-1994' of github.com:ibm-mas/cli into masaib-1994
Apr 14, 2026
d11f052
Merge branch 'master' into masaib-1994
boonware Apr 14, 2026
4b9039b
Merge branch 'master' into masaib-1994
joshiricha444 Apr 14, 2026
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
19 changes: 17 additions & 2 deletions python/src/mas/cli/update/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,32 @@ def reviewMASInstance(self) -> bool:
return self.reviewInstances(listMasInstances, 'MAS', 'Suite.core.mas.ibm.com/v1')

def reviewAiServiceInstance(self) -> bool:
return self.reviewInstances(listAiServiceInstances, 'AI Service', 'AIServiceApp.aiservice.ibm.com/v1')
return self.reviewInstances(listAiServiceInstances, 'AI Service', 'AIServiceApp.aiservice.ibm.com/v1', "aiservice_instance_ids")

def reviewInstances(self, getInstances: Callable, name: str, kind: str) -> bool:
def reviewInstances(self, getInstances: Callable, name: str, kind: str, instanceParamKey: str = "") -> bool:
self.printH1(f"Review {name} Instances")
try:
instances = getInstances(self.dynamicClient)

if len(instances) == 0:
if instanceParamKey != "":
self.setParam(instanceParamKey, "")
self.printDescription([f"No {name} instances were detected on the cluster"])
return False

if instanceParamKey != "":
self.setParam(instanceParamKey, "")
for instance in instances:
param = self.getParam(instanceParamKey)
self.setParam(instanceParamKey, f"{param},{instance['metadata']['name']}".lstrip(","))

self.printDescription([f"The following {name} instances are installed on the target cluster and will be affected by the catalog update:"])
for instance in instances:
self.printDescription([f"- <u>{instance['metadata']['name']}</u> v{instance['status']['versions']['reconciled']}"])
return True
except ResourceNotFoundError:
if instanceParamKey != "":
self.setParam(instanceParamKey, "")
self.printDescription([f"No {name} instances were detected on the cluster ({kind} API is not available)"])
return False

Expand Down
1 change: 1 addition & 0 deletions tekton/generate-tekton-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
- odh
- rhoai
- aiservice-upgrade
- aiservice-migration

# 4. Generate Tasks (FVT)
# -------------------------------------------------------------------------
Expand Down
23 changes: 22 additions & 1 deletion tekton/src/pipelines/mas-update.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@ spec:
type: string
default: ""
description: ReadWriteMany storage class

# AI Service
# -------------------------------------------------------------------------
- name: aiservice_instance_ids
type: string
default: ""
description: Comma-separated list of AI Service instance IDs

tasks:
# 1. Wait for approval & verify health of the cluster before we change anything
Expand Down Expand Up @@ -337,8 +344,22 @@ spec:
runAfter:
- update-cp4d

# 6. Migrate any AI Service instances. Updating to a new feature channel release
# could require migration as release 9.2 introduces a significant architectural change.
# AI Service migration
# -------------------------------------------------------------------------
- name: aiservice-migration
timeout: "0"
taskRef:
kind: Task
name: mas-devops-aiservice-migration
runAfter:
- post-update-verify
params:
- name: aiservice_instance_ids
value: $(params.aiservice_instance_ids)

# 6. Verify health of the cluster after dependencies updates
# 7. Verify health of the cluster after dependencies updates
# -------------------------------------------------------------------------
{{ lookup('template', 'taskdefs/cluster-setup/ocp-verify-all.yml.j2', template_vars={
'name': 'post-deps-update-verify',
Expand Down
45 changes: 45 additions & 0 deletions tekton/src/tasks/aiservice/aiservice-migration.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: mas-devops-aiservice-migration
spec:
params:
{{ lookup('template', task_src_dir ~ '/common/cli-params.yml.j2') | indent(4) }}

- name: aiservice_instance_ids
type: string
default: ""
description: Comma-separated AI Service instance IDs

stepTemplate:
env:
{{ lookup('template', task_src_dir ~ '/common/cli-env.yml.j2') | indent(6) }}

steps:
- name: aiservice-migration
image: quay.io/ibmmas/cli:latest
imagePullPolicy: $(params.image_pull_policy)
script: |
#!/usr/bin/env bash
set -euo pipefail

INSTANCE_IDS='$(params.aiservice_instance_ids)'

if [ -z "${INSTANCE_IDS}" ]; then
echo "No AI Service instances detected, skipping migration"
exit 0
fi

IFS=',' read -ra IDS <<< "${INSTANCE_IDS}"

for id in "${IDS[@]}"; do
id="$(echo "$id" | xargs)"
if [ -z "$id" ]; then
continue
fi

echo "Running AI Service migration for instance: $id"
export AISERVICE_INSTANCE_ID="$id"
/opt/app-root/src/run-role.sh aiservice_migration
done
Loading