Skip to content

Conversation

@Bhautik-Vala
Copy link
Contributor

@Bhautik-Vala Bhautik-Vala commented Nov 24, 2025

Enable mas-install pipeline to install AI Service as well - eventually combining aiservice-install pipeline into mas-install pipeline -> removing aiservice-install pipeline.

Story Link: https://jsw.ibm.com/browse/MASR-6486
Test story: https://jsw.ibm.com/browse/MASR-6487
Related PR:
ibm-mas/python-devops#141

Testing:
Screenshot 2025-11-25 at 2 23 15 PM
Screenshot 2025-11-25 at 3 04 54 PM

@Bhautik-Vala Bhautik-Vala changed the title [patch] Enable mas-install pipeline to Install stand alone AI Service [minor] Enable mas-install pipeline to Install stand alone AI Service / remove aiservice-install pipeline Nov 25, 2025
@Bhautik-Vala Bhautik-Vala marked this pull request as ready for review December 1, 2025 06:06
@Bhautik-Vala Bhautik-Vala requested a review from a team as a code owner December 1, 2025 06:06
Copy link
Contributor

@durera durera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment we've basically attached the aiservice pipeline to the side of the existing MAS one, creating duplication in places ... what I'm looking for here is full integration into the pipeline

Image
  • sls - we are already installing sls in the pipeline, we shouldn't need a seperate stage, if customer is only installing aiservice, installing mas+aiservice, or just installing mas on it's own then the existing sls stage in the pipeline should be only place we "do sls stuff"
  • dro - as above, dro is a cluster scoped install, we don't have a mas dro and an aiservice dro
  • mongodb - same, our strategy is one mongodbcluster per ocp cluster, and everything that uses it uses it

I'd expect something like this to be what we are inserting:

  • minio (e.g. run after ibm-catalogs)
  • db2-aiservice (e.g. run after cert-manager)
  • odh (e.g. run after ibm-catalogs)
  • aiservice (run after existing sls, existing dro, db2-aiservice, odh)

Also, let's squash aiservice-tenant into a second step in aiservice task, see how I have done this for all mas apps, as we are trying to simplify the pipeline/make it easier for customers to read/understand/process.

@Bhautik-Vala
Copy link
Contributor Author

Bhautik-Vala commented Dec 10, 2025

@durera
Regarding separation of two similar tasks (e.g., sls/dro/mongo): when I tried to integrate the AIServices pipeline into MAS, the main issue was that when standalone AIServices is installed, we have to pass aiservice_instance_id as mas_instance_id to the SLS role. I thought a lot about how we could use a single task for both scenarios (i.e., standalone AIServices and with MAS). We want the dynamic nature of mas_instance_id’s value, but this can’t be achieved through Jinja templating because at runtime only we know whether mas_instance_id should be mas_instance_id or aiservice_instance_id for the SLS/DRO/Mongo role.

So I kept two tasks, but only one gets executed depending on the scenario.

When we install MAS + AIServices, this is the list of tasks:

Screenshot 2025-12-10 at 10 56 39 AM

Can you please suggest any tips on how we can dynamically set the value of mas_instance_id within a single task depending on the scenario?

Also, I will squash aiservice-tenant into the aiservice task.

@Bhautik-Vala
Copy link
Contributor Author

@durera I have Integrate aiservice-tenant into the aiservice task.
Screenshot 2025-12-10 at 1 08 40 PM

@durera
Copy link
Contributor

durera commented Dec 10, 2025

Can you please suggest any tips on how we can dynamically set the value of mas_instance_id within a single task depending on the scenario?

Assuming we are using mas_instance_id here to generate a "fake" slsfcfg, mongocfg, etc because that's just what the code in the aiservice provision expects then I suggest something like this (e.g. in the sls task):

  params:
    - name: mas_instance_id
      type: string
      description: Instance ID
      default: "" # By default, no config will be generated
    - name: aiservice_instance_id
      type: string
      description: AIService Instance ID - when installing AI Service in standalone mode we still need to generate the MAS slscfg object, because it is used to populate the AIService configuration
      default: ""

  stepTemplate:
    env:
      - name: MAS_INSTANCE_ID
        value: $(params.mas_instance_id)
      - name: AISERVICE_INSTANCE_ID
        value: $(params.aiservice_instance_id)

  steps:
    - name: sls
      script: |
        #!/bin/bash
        
        # Support AI Service standalone
        if [[ "$MAS_INSTANCE_ID" == "" ]] && [[ "$AISERVICE_INSTANCE_ID" != "" ]]; then
            echo "Setting MAS_INSTANCE_ID based on AISERVICE_INSTANCE_ID for standalone AI Service install"
            MAS_INSTANCE_ID=AISERVICE_INSTANCE_ID
        fi
        /opt/app-root/src/run-role.sh sls

This will make the task use aiservice-instance-id as a "fake" mas-instance-id when the role is ran, so that the MAS config resource file is still generated and can be used later in the pipeline.

@Bhautik-Vala
Copy link
Contributor Author

Hi @durera
have done the changes regarding of sls/dro/mongo and tested for mas install and mas aiservice-install both here are the results:
Screenshot 2025-12-11 at 3 04 18 PM
Screenshot 2025-12-11 at 11 51 00 AM
can you please review again. Thank you.

@Bhautik-Vala Bhautik-Vala requested a review from durera December 11, 2025 09:46
@Bhautik-Vala Bhautik-Vala requested a review from durera December 12, 2025 09:52
Copy link
Contributor

@durera durera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ready to merge ... approval pending the readiness of related PRs in python-devops and ansible-devops

@Bhautik-Vala Bhautik-Vala changed the title [minor] Enable mas-install pipeline to Install stand alone AI Service / remove aiservice-install pipeline [minor] Enable mas-install pipeline to Install standalone AI Service / remove aiservice-install pipeline Dec 12, 2025
@Bhautik-Vala
Copy link
Contributor Author

This is ready to merge ... approval pending the readiness of related PRs in python-devops and ansible-devops

@durera For phase-1 we need only python-devops changes in this cli PR, right now python-devops is ready with required changes and I've tested that - can you please merge python-devops and this cli PR.

@Bhautik-Vala Bhautik-Vala requested a review from durera December 15, 2025 08:07
@durera durera changed the title [minor] Enable mas-install pipeline to Install standalone AI Service / remove aiservice-install pipeline [minor] Integrate aiservice into mas-install pipeline Dec 15, 2025
@durera durera merged commit 8b25b12 into master Dec 15, 2025
14 checks passed
@durera durera deleted the bv75 branch December 15, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants