diff --git a/Makefile b/Makefile index fc4809d49ee..ff042cf7d3b 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,15 @@ #!/bin/bash -.PHONY: ansible-build ansible-install ansible python python-devops python-cli tekton docker run clean create delete exec +.PHONY: ansible-devops python python-devops python-cli tekton docker run clean create delete exec .DEFAULT_GOAL := all -ansible-build: +ansible-devops: ansible-galaxy collection build --output-path image/cli/install ../ansible-devops/ibm/mas_devops --force mv image/cli/install/ibm-mas_devops-100.0.0.tar.gz image/cli/install/ibm-mas_devops.tar.gz -ansible-install: - ansible-galaxy collection install image/cli/install/ibm-mas_devops.tar.gz --force --no-deps -ansible: ansible-build ansible-install + +# Tip: You can install this built collection using: +# ansible-galaxy collection install image/cli/install/ibm-mas_devops.tar.gz --force --no-deps python-cli: cd python && python -m build diff --git a/docs/catalogs/v9-240625-amd64.md b/docs/catalogs/v9-240625-amd64.md index 7b6990e0b01..7ab111e7ff7 100644 --- a/docs/catalogs/v9-240625-amd64.md +++ b/docs/catalogs/v9-240625-amd64.md @@ -35,7 +35,6 @@ What's New - IBM Maximo Optimizer v9.0 - IBM Maximo Assist v9.0 - IBM Maximo Predict v9.0 - - IBM Maximo AI Broker v9.0 - Support for Cloud Pak for Data v4.8 - Support for MongoDb v6 - **Security updates and bug fixes** diff --git a/docs/catalogs/v9-240730-amd64.md b/docs/catalogs/v9-240730-amd64.md index f114be90e21..41b741c160a 100644 --- a/docs/catalogs/v9-240730-amd64.md +++ b/docs/catalogs/v9-240730-amd64.md @@ -36,7 +36,6 @@ What's New - IBM Maximo Optimizer v9.0 - IBM Maximo Assist v9.0 - IBM Maximo Predict v9.0 - - IBM Maximo AI Broker v9.0 - Support for Cloud Pak for Data v4.8 - support for OCP 4.15 - Support for MongoDb v6 diff --git a/docs/guides/install-aiservice.md b/docs/guides/install-aiservice.md index bcd7ec14178..6bc8cdcb65f 100644 --- a/docs/guides/install-aiservice.md +++ b/docs/guides/install-aiservice.md @@ -45,7 +45,7 @@ If you have not already determined the catalog version for your installation, re Interactive Install ------------------------------------------------------------------------------- -Regardless of whether you are running a connected or disconnected installation, simply run the `mas aiservice-install` command and follow the prompts, the basic structure of the interactive flow is described below. +Regardless of whether you are running a connected or disconnected installation, simply run the `mas aiservice-install` command and follow the prompts, the basic structure of the interactive flow is described below. We will need the `entitlement.lic` file to perform the installation so we will mount your home directory into the running container. When prompted you will be able to set license file to `/mnt/home/entitlement.lic` - This is a prerequisite step, required only when `sls` has not been installed previously. @@ -90,7 +90,7 @@ The interactive install will guide you through a series of questioned designed t

Before the install actually starts you will be presented with a summary of all your choices and a non-interactive command that will allow you to repeat the same installation without going through all the prompts again.

- + @@ -105,8 +105,8 @@ docker run -e IBM_ENTITLEMENT_KEY -e SUPERUSER_PASSWORD -ti --rm -v ~:/mnt/home oc login --token=sha256~xxxx --server=https://xxx && mas aiservice-install \ --mas-catalog-version @@MAS_LATEST_CATALOG@@ \ - --aibroker-instance-id aib1 \ - --aibroker-channel 9.1.x \ + --aiservice-instance-id aib1 \ + --aiservice-channel 9.1.x \ \ --ibm-entitlement-key '${IBM_ENTITLEMENT_KEY}' \ --license-file /mnt/home/entitlement.lic \ @@ -138,7 +138,6 @@ The engine that performs all tasks is written in Ansible, you can directly use t - IBM Data Reporter Operator - Red Hat Certificate Manager - Minio - - Mariadb - db2 - Aiservice installation diff --git a/image/cli/masfvt/fvt-aiservice.yml b/image/cli/masfvt/fvt-aiservice.yml index 384fce4faee..aa8a73a6db3 100644 --- a/image/cli/masfvt/fvt-aiservice.yml +++ b/image/cli/masfvt/fvt-aiservice.yml @@ -5,10 +5,10 @@ # Image Pull Policy image_pull_policy: "{{ lookup('env', 'IMAGE_PULL_POLICY') }}" # MAS Details - mas_app_channel_aibroker: "{{ lookup('env', 'MAS_APP_CHANNEL_AIBROKER') }}" + aiservice_channel: "{{ lookup('env', 'AISERVICE_CHANNEL') }}" mas_workspace_id: "{{ lookup('env', 'MAS_WORKSPACE_ID') }}" - - aibroker_instance_id: "{{ lookup('env', 'AIBROKER_INSTANCE_ID') }}" + + aiservice_instance_id: "{{ lookup('env', 'AISERVICE_INSTANCE_ID') }}" # FVT Configuration fvt_image_registry: "{{ lookup('env', 'FVT_IMAGE_REGISTRY') }}" fvt_artifactory_username: "{{ lookup('env', 'FVT_ARTIFACTORY_USERNAME') }}" @@ -18,7 +18,7 @@ # Pipeline Run Info devops_build_number: "{{ lookup('env', 'DEVOPS_BUILD_NUMBER') | default('0', True) }}" pipelinerun_name: "{{ lookup('env', 'PIPELINERUN_NAME') | default('mas-fvt-aibroker', True) }}-{{ devops_build_number }}" - pipelinerun_namespace: "{{ lookup('env', 'PIPELINERUN_NAMESPACE') | default('mas-' ~ aibroker_instance_id ~ '-pipelines', True) }}" + pipelinerun_namespace: "{{ lookup('env', 'PIPELINERUN_NAMESPACE') | default('mas-' ~ aiservice_instance_id ~ '-pipelines', True) }}" tasks: - name: "Debug" debug: @@ -26,13 +26,13 @@ - "pipelinerun_name .................. {{ pipelinerun_name }}" - "pipelinerun_namespace ............. {{ pipelinerun_namespace }}" - "" - - "mas_app_channel_aibroker ........... {{ mas_app_channel_aibroker }}" - - "aibroker_instance_id ................... {{ aibroker_instance_id }}" + - "aiservice_channel ................. {{ aiservice_channel }}" + - "aiservice_instance_id ............. {{ aiservice_instance_id }}" - "" - "fvt_image_registry ................ {{ fvt_image_registry }}" - "fvt_artifactory_username .......... {{ fvt_artifactory_username }}" - "fvt_artifactory_token ............. {{ fvt_artifactory_token }}" - - "fvt_digest_aibroker ................ {{ fvt_digest_aibroker }}" + - "fvt_digest_aibroker ............... {{ fvt_digest_aibroker }}" - "ivt_digest_core ................... {{ ivt_digest_core }}" - name: "Start fvt-aiservice pipeline" diff --git a/image/cli/masfvt/templates/mas-fvt-aiservice.yml.j2 b/image/cli/masfvt/templates/mas-fvt-aiservice.yml.j2 index acf09e47abd..b0502969e6d 100644 --- a/image/cli/masfvt/templates/mas-fvt-aiservice.yml.j2 +++ b/image/cli/masfvt/templates/mas-fvt-aiservice.yml.j2 @@ -19,10 +19,10 @@ spec: - name: image_pull_policy value: "{{ image_pull_policy }}" # MAS Info - - name: mas_app_channel_aibroker - value: "{{ mas_app_channel_aibroker }}" + - name: aiservice_channel + value: "{{ aiservice_channel }}" - name: mas_instance_id - value: "{{ aibroker_instance_id }}" + value: "{{ aiservice_instance_id }}" - name: mas_workspace_id value: "{{ mas_workspace_id }}" # Registry diff --git a/python/src/mas/cli/aiservice/install/app.py b/python/src/mas/cli/aiservice/install/app.py index 4fb9b68ac76..12646a2118e 100644 --- a/python/src/mas/cli/aiservice/install/app.py +++ b/python/src/mas/cli/aiservice/install/app.py @@ -32,9 +32,9 @@ from ...install.catalogs import supportedCatalogs -# AiService relies on SLS, which in turn depends on MongoDB. +# AI Service relies on SLS, which in turn depends on MongoDB. # SLS will utilize the shared MongoDB resource that would be used by MAS if it were deployed within the same OpenShift cluster. -# AiService utilizes two distinct databases: DB2 is employed by the AiBroker component, while MariaDB supports OpenDataHub (ODH). +# AI Service utilizes two distinct databases: DB2 is employed by the AiBroker component. # By default, AiService will deploy DB2 within the same namespace as MAS (db2u), but it will be configured as a separate DB2 instance. from ...install.settings.mongodbSettings import MongoDbSettingsMixin @@ -56,10 +56,10 @@ from mas.devops.tekton import ( installOpenShiftPipelines, updateTektonDefinitions, - preparePipelinesNamespace, + prepareAiServicePipelinesNamespace, prepareInstallSecrets, testCLI, - launchInstallPipelineForAiservice + launchAiServiceInstallPipeline ) logger = logging.getLogger(__name__) @@ -80,7 +80,7 @@ def processCatalogChoice(self) -> list: self.catalogDigest = self.chosenCatalog["catalog_digest"] self.catalogMongoDbVersion = self.chosenCatalog["mongo_extras_version_default"] applications = { - "Aibroker": "mas_aibroker_version", + "Aibroker": "aiservice_version", } self.catalogReleases = {} @@ -96,9 +96,6 @@ def processCatalogChoice(self) -> list: for application, key in applications.items(): # Add 9.1-feature channel based off 9.0 to those apps that have not onboarded yet tempChosenCatalog = self.chosenCatalog[key].copy() - if '9.1.x-feature' not in tempChosenCatalog: - tempChosenCatalog.update({"9.1.x-feature": tempChosenCatalog["9.0.x"]}) - self.catalogTable.append({"": application} | {key.replace(".x", ""): value for key, value in sorted(tempChosenCatalog.items(), reverse=True)}) if self.architecture == "s390x": @@ -132,10 +129,10 @@ def configAibroker(self): " - Must start with a lowercase letter", " - Must end with a lowercase letter or a number" ]) - self.promptForString("Instance ID", "aibroker_instance_id", validator=InstanceIDFormatValidator()) + self.promptForString("Instance ID", "aiservice_instance_id", validator=InstanceIDFormatValidator()) if self.slsMode == 2 and not self.getParam("sls_namespace"): - self.setParam("sls_namespace", f"mas-{self.getParam('aibroker_instance_id')}-sls") + self.setParam("sls_namespace", f"mas-{self.getParam('aiservice_instance_id')}-sls") self.configOperationMode() @@ -145,18 +142,6 @@ def interactiveMode(self, simplified: bool, advanced: bool) -> None: self.interactiveMode = True self.storageClassProvider = "custom" - self.installAssist = False - self.installIoT = False - self.installMonitor = False - self.installManage = False - self.installPredict = False - self.installInspection = False - self.installOptimizer = False - self.installFacilities = False - self.installAiBroker = True - self.deployCP4D = False - self.db2SetAffinity = False - self.db2SetTolerations = False self.slsLicenseFileLocal = None if simplified: @@ -185,7 +170,9 @@ def interactiveMode(self, simplified: bool, advanced: bool) -> None: if self.devMode: self.configAppChannel("aibroker") - self.aibrokerSettings() + self.aiServiceSettings() + self.aiServiceTenantSettings() + self.aiServiceIntegrations() # Dependencies self.configMongoDb() @@ -201,18 +188,6 @@ def nonInteractiveMode(self) -> None: self.setParam("mongodb_action", "install") self.storageClassProvider = "custom" - self.installAssist = False - self.installIoT = False - self.installMonitor = False - self.installManage = False - self.installPredict = False - self.installInspection = False - self.installFacilities = False - self.installOptimizer = False - self.installAiBroker = True - self.deployCP4D = False - self.db2SetAffinity = False - self.db2SetTolerations = False self.slsLicenseFileLocal = None self.approvals = { @@ -233,6 +208,54 @@ def nonInteractiveMode(self) -> None: if value is not None: self.setParam(key, value) + elif key == "install_minio_aiservice": + incompatibleWithMinioInstall = [ + "aiservice_storage_provider", + "aiservice_storage_accesskey", + "aiservice_storage_secretkey", + "aiservice_storage_host", + "aiservice_storage_port", + "aiservice_storage_ssl", + "aiservice_s3_endpoint_url", + "aiservice_storage_region", + "aiservice_tenant_s3_access_key", + "aiservice_tenant_s3_secret_key", + "aiservice_tenant_s3_endpoint_url", + "aiservice_tenant_s3_region" + ] + if value is None: + for uKey in incompatibleWithMinioInstall: + if vars(self.args)[uKey] is None: + self.fatalError(f"Parameter is required when --install-minio is not set: {uKey}") + elif value is not None and value == "true": + # If user is installing Minio in-cluster then we know how to connect to it already + for uKey in incompatibleWithMinioInstall: + if vars(self.args)[uKey] is not None: + self.fatalError(f"Unsupported parameter for --install-minio: {uKey}") + for rKey in ["minio_root_user", "minio_root_password"]: + if vars(self.args)[rKey] is None: + self.fatalError(f"Missing required parameter for --install-minio: {rKey}") + + self.setParam("aiservice_storage_provider", "minio") + + self.setParam("aiservice_storage_accesskey", self.args.minio_root_user) + self.setParam("aiservice_storage_secretkey", self.args.minio_root_password) + + # TODO: Duplication -- we already have the URL, why do we need all the individual parts, + # especially when we don't need them for the tenant? + self.setParam("aiservice_storage_host", "minio-service.minio.svc.cluster.local") + self.setParam("aiservice_storage_port", "9000") + self.setParam("aiservice_storage_ssl", "false") + self.setParam("aiservice_s3_endpoint_url", "http://minio-service.minio.svc.cluster.local:9000") + self.setParam("aiservice_storage_region", "none") + + self.setParam("aiservice_tenant_s3_access_key", self.args.minio_root_user) + self.setParam("aiservice_tenant_s3_secret_key", self.args.minio_root_password) + self.setParam("aiservice_tenant_s3_endpoint_url", "http://minio-service.minio.svc.cluster.local:9000") + self.setParam("aiservice_tenant_s3_region", "none") + else: + self.fatalError(f"Unsupported value for --install-minio: {value}") + elif key == "non_prod": if not value: self.operationalMode = 1 @@ -258,18 +281,10 @@ def nonInteractiveMode(self) -> None: # We check for both None and "" values for the application channel parameters # value = None means the parameter wasn't set at all - # value = "" means the paramerter was explicitly set to "don't install this application" - elif key == "aibroker_channel": + # value = "" means the parameter was explicitly set to "don't install this application" + elif key == "aiservice_channel": if value is not None and value != "": - self.setParam("mas_app_channel_aibroker", value) - self.installAiBroker = True - - # Manage advanced settings that need extra processing - elif key == "mas_app_settings_server_bundle_size": - if value is not None: - self.setParam(key, value) - if value in ["jms", "snojms"]: - self.setParam("mas_app_settings_persistent_volumes_flag", "true") + self.setParam("aiservice_channel", value) # MongoDB elif key == "mongodb_namespace": @@ -284,7 +299,7 @@ def nonInteractiveMode(self) -> None: self.setParam("sls_action", "install") elif key == "dedicated_sls": if value: - self.setParam("sls_namespace", f"mas-{self.args.aibroker_instance_id}-sls") + self.setParam("sls_namespace", f"mas-{self.args.aiservice_instance_id}-sls") # These settings are used by the CLI rather than passed to the PipelineRun elif key == "storage_accessmode": @@ -337,8 +352,7 @@ def nonInteractiveMode(self) -> None: # License file is only optional for existing SLS instance if self.slsLicenseFileLocal is None: - if self.getParam("install_sls_aiservice") != "false": - self.fatalError("--license-file must be set for new SLS install") + self.fatalError("--license-file must be set for new SLS install") # Once we've processed the inputs, we should validate the catalog source & prompt to accept the license terms if not self.devMode: @@ -354,7 +368,7 @@ def install(self, argv): # We use the presence of --mas-instance-id to determine whether # the CLI is being started in interactive mode or not - instanceId = args.aibroker_instance_id + instanceId = args.aiservice_instance_id # Properties for arguments that control the behavior of the CLI self.noConfirm = args.no_confirm @@ -401,6 +415,9 @@ def install(self, argv): # UDS install has not been supported since the January 2024 catalog update self.setParam("uds_action", "install-dro") + # Install Db2 for AI Service + self.setParam("db2_action_aiservice", "install") + # User must either provide the configuration via numerous command line arguments, or the interactive prompts if instanceId is None: self.interactiveMode(simplified=args.simplified, advanced=args.advanced) @@ -432,7 +449,7 @@ def install(self, argv): self.createTektonFileWithDigest() self.printH1("Launch Install") - pipelinesNamespace = f"mas-{self.getParam('aibroker_instance_id')}-pipelines" + pipelinesNamespace = f"aiservice-{self.getParam('aiservice_instance_id')}-pipelines" if not self.noConfirm: self.printDescription(["If you are using storage classes that utilize 'WaitForFirstConsumer' binding mode choose 'No' at the prompt below"]) @@ -446,9 +463,9 @@ def install(self, argv): with Halo(text=f'Preparing namespace ({pipelinesNamespace})', spinner=self.spinner) as h: createNamespace(self.dynamicClient, pipelinesNamespace) - preparePipelinesNamespace( + prepareAiServicePipelinesNamespace( dynClient=self.dynamicClient, - instanceId=self.getParam("aibroker_instance_id"), + instanceId=self.getParam("aiservice_instance_id"), storageClass=self.pipelineStorageClass, accessMode=self.pipelineStorageAccessMode, waitForBind=wait, @@ -456,7 +473,7 @@ def install(self, argv): ) prepareInstallSecrets( dynClient=self.dynamicClient, - instanceId=self.getParam("aibroker_instance_id"), + namespace=pipelinesNamespace, slsLicenseFile=self.slsLicenseFileSecret, additionalConfigs=self.additionalConfigsSecret, podTemplates=self.podTemplatesSecret, @@ -475,13 +492,13 @@ def install(self, argv): updateTektonDefinitions(pipelinesNamespace, self.tektonDefsPath) h.stop_and_persist(symbol=self.successIcon, text=f"Latest Tekton definitions are installed (v{self.version})") - with Halo(text=f"Submitting PipelineRun for {self.getParam('aibroker_instance_id')} install", spinner=self.spinner) as h: - pipelineURL = launchInstallPipelineForAiservice(dynClient=self.dynamicClient, params=self.params) + with Halo(text=f"Submitting PipelineRun for {self.getParam('aiservice_instance_id')} install", spinner=self.spinner) as h: + pipelineURL = launchAiServiceInstallPipeline(dynClient=self.dynamicClient, params=self.params) if pipelineURL is not None: - h.stop_and_persist(symbol=self.successIcon, text=f"PipelineRun for {self.getParam('aibroker_instance_id')} install submitted") + h.stop_and_persist(symbol=self.successIcon, text=f"PipelineRun for {self.getParam('aiservice_instance_id')} install submitted") print_formatted_text(HTML(f"\nView progress:\n {pipelineURL}\n")) else: - h.stop_and_persist(symbol=self.failureIcon, text=f"Failed to submit PipelineRun for {self.getParam('aibroker_instance_id')} install, see log file for details") + h.stop_and_persist(symbol=self.failureIcon, text=f"Failed to submit PipelineRun for {self.getParam('aiservice_instance_id')} install, see log file for details") print() @logMethodCall @@ -499,81 +516,140 @@ def setupApprovals(self, namespace: str) -> None: @logMethodCall def chooseInstallFlavour(self) -> None: - # We don't have any configuration as Advanced options right now in Aibroker settings - # we can remove this chooseInstallFlavour - if we want... - self.printH1("Choose Install Mode") + self.showAdvancedOptions = False + + def aiServiceSettings(self) -> None: + self.printH1("AI Service Settings") + + # Ask about MinIO installation FIRST (moved from aiServiceDependencies) + self.printH2("Storage Configuration") + self.printDescription(["AI Service requires object storage for pipelines, tenants, and templates. You can either install MinIO in-cluster or connect to external storage."]) + + if self.yesOrNo("Install Minio"): + # Only ask for MinIO credentials + self.promptForString("minio root username", "minio_root_user") + self.promptForString("minio root password", "minio_root_password", isPassword=True) + + # Auto-set MinIO storage defaults (same as non-interactive mode) + self._setMinioStorageDefaults() + else: + # Ask for external storage configuration + self.printDescription(["Configure your external object storage (S3-compatible) connection details:"]) + self.promptForString("Storage provider", "aiservice_storage_provider") + self.promptForString("Storage access key", "aiservice_storage_accesskey") + self.promptForString("Storage secret key", "aiservice_storage_secretkey", isPassword=True) + self.promptForString("Storage host", "aiservice_storage_host") + self.promptForString("Storage port", "aiservice_storage_port") + self.promptForString("Storage ssl", "aiservice_storage_ssl") + self.promptForString("Storage region", "aiservice_storage_region") + self.promptForString("Storage pipelines bucket", "aiservice_storage_pipelines_bucket") + self.promptForString("Storage tenants bucket", "aiservice_storage_tenants_bucket") + self.promptForString("Storage templates bucket", "aiservice_storage_templates_bucket") + + # S3 parameters are now auto-derived from storage configuration + self._deriveS3ParametersFromStorage() + + def aiServiceTenantSettings(self) -> None: + self.printH1("AI Service Tenant Settings") + self.promptForString("Tenant entitlement type", "tenant_entitlement_type") + self.promptForString("Tenant start date", "tenant_entitlement_start_date") + self.promptForString("Tenant end date", "tenant_entitlement_end_date") + + def _deriveS3ParametersFromStorage(self) -> None: + """ + Auto-derive S3 and tenant S3 parameters from the aiservice_storage_* parameters. + This reuses the values provided for kmodel object storage to avoid redundant prompts. + """ + storage_provider = self.getParam("aiservice_storage_provider") + storage_host = self.getParam("aiservice_storage_host") + storage_port = self.getParam("aiservice_storage_port") + storage_ssl = self.getParam("aiservice_storage_ssl") + storage_region = self.getParam("aiservice_storage_region") + storage_accesskey = self.getParam("aiservice_storage_accesskey") + storage_secretkey = self.getParam("aiservice_storage_secretkey") + + # Build endpoint URL from storage configuration + protocol = "https" if storage_ssl == "true" else "http" + + if storage_provider == "minio": + endpoint_url = f"{protocol}://{storage_host}:{storage_port}" + elif storage_provider == "s3": + # For AWS S3, construct proper endpoint + if storage_region and storage_region != "none": + endpoint_url = f"{protocol}://s3.{storage_region}.amazonaws.com" + else: + endpoint_url = f"{protocol}://s3.amazonaws.com" + else: + # For other providers, construct basic endpoint + endpoint_url = f"{protocol}://{storage_host}:{storage_port}" if storage_port else f"{protocol}://{storage_host}" + + # Set S3 parameters (reusing storage configuration) + self.setParam("aiservice_s3_bucket_prefix", "aiservice") # Default prefix + if endpoint_url: + self.setParam("aiservice_s3_endpoint_url", endpoint_url) + self.setParam("aiservice_s3_region", storage_region if storage_region else "none") + + # Set tenant S3 parameters (reusing same storage configuration) + self.setParam("aiservice_tenant_s3_bucket_prefix", "tenant") # Default tenant prefix + self.setParam("aiservice_tenant_s3_access_key", storage_accesskey) + self.setParam("aiservice_tenant_s3_secret_key", storage_secretkey) + if endpoint_url: + self.setParam("aiservice_tenant_s3_endpoint_url", endpoint_url) + self.setParam("aiservice_tenant_s3_region", storage_region if storage_region else "none") + + def _setMinioStorageDefaults(self) -> None: + """ + Set MinIO storage defaults when MinIO is being installed in-cluster. + This mirrors the logic from non-interactive mode. + """ + self.setParam("aiservice_storage_provider", "minio") + self.setParam("aiservice_storage_accesskey", self.getParam("minio_root_user")) + self.setParam("aiservice_storage_secretkey", self.getParam("minio_root_password")) + self.setParam("aiservice_storage_host", "minio-service.minio.svc.cluster.local") + self.setParam("aiservice_storage_port", "9000") + self.setParam("aiservice_storage_ssl", "false") + self.setParam("aiservice_storage_region", "none") + + # Set default bucket names + self.setParam("aiservice_storage_pipelines_bucket", "km-pipelines") + self.setParam("aiservice_storage_tenants_bucket", "km-tenants") + self.setParam("aiservice_storage_templates_bucket", "km-templates") + + def aiServiceIntegrations(self) -> None: + self.printH1("WatsonX Integration") + self.printDescription([ + "This CLI section configures the integration between the AI Service and IBM watsonx.ai. AI Service", + "uses watsonx for model deployment and inferencing.", + "", + "The WatsonX API key must be a **platform API key** associated with a user that has at least:", + "- **Editor permission** for the project", + "- **Viewer permission** for the space", + "You can generate this key by following IBM's documentation: https://www.ibm.com/docs/en/watsonx/w-and-w/2.2.0?topic=tutorials-generating-api-keys#api-keys__platform__title__1", + "", + "The endpoint URL is your WatsonX Machine Learning service URL. It can be found in the watsonx.ai", + "documentation: https://cloud.ibm.com/apidocs/watsonx-ai-cp/watsonx-ai-cp-2.2.0#endpoint-url", + "", + "The project ID refers to your specific watsonx.ai project where your ML models and assets are stored.", + "", + ]) + self.promptForString("Watsonxai api key", "aiservice_watsonxai_apikey", isPassword=True) + self.promptForString("Watsonxai machine learning url", "aiservice_watsonxai_url") + self.promptForString("Watsonxai project id", "aiservice_watsonxai_project_id") + + self.printH1("RSL Integration") self.printDescription([ - "There are two flavours of the interactive install to choose from: Simplified and Advanced. The simplified option will present fewer dialogs, but you lose the ability to configure the following aspects of the installation:", - " - Configure dedicated License (AppPoints)" + "RSL (Reliable Strategy Library) connects to strategic asset management via STRATEGIZEAPI.", + "", + "RSL URL: https://api.rsl-service.suite.maximo.com (standard for all customers)", + "Org ID: Get from MAS Manage > System Properties > 'mxe.rs.rslorgid'", + "Token: Use your IBM entitlement key (same as MAS installation)", + "", + "Note: Future versions will auto-configure these from MAS Manage.", + "" ]) - self.showAdvancedOptions = self.yesOrNo("Show advanced installation options") - - def aibrokerSettings(self) -> None: - if self.installAiBroker: - self.printH2("AI Service Settings - Storage, WatsonX, MariaDB details") - self.printDescription(["Customise AI Broker details"]) - self.promptForString("Storage provider", "mas_aibroker_storage_provider") - self.promptForString("Storage access key", "mas_aibroker_storage_accesskey") - self.promptForString("Storage secret key", "mas_aibroker_storage_secretkey", isPassword=True) - self.promptForString("Storage host", "mas_aibroker_storage_host") - self.promptForString("Storage port", "mas_aibroker_storage_port") - self.promptForString("Storage ssl", "mas_aibroker_storage_ssl") - self.promptForString("Storage region", "mas_aibroker_storage_region") - self.promptForString("Storage pipelines bucket", "mas_aibroker_storage_pipelines_bucket") - self.promptForString("Storage tenants bucket", "mas_aibroker_storage_tenants_bucket") - self.promptForString("Storage templates bucket", "mas_aibroker_storage_templates_bucket") - - self.promptForString("Watsonxai api key", "mas_aibroker_watsonxai_apikey", isPassword=True) - self.promptForString("Watsonxai machine learning url", "mas_aibroker_watsonxai_url") - self.promptForString("Watsonxai project id", "mas_aibroker_watsonxai_project_id") - - self.promptForString("Database host", "mas_aibroker_db_host") - self.promptForString("Database port", "mas_aibroker_db_port") - self.promptForString("Database user", "mas_aibroker_db_user") - self.promptForString("Database name", "mas_aibroker_db_database") - self.promptForString("Database Secretname", "mas_aibroker_db_secret_name", isPassword=True) - self.promptForString("Database password", "mas_aibroker_db_secret_value", isPassword=True) - - if self.getParam("mas_app_channel_aibroker") != "9.0.x": - self.promptForString("Mariadb username", "mariadb_user") - self.promptForString("Mariadb password", "mariadb_password", isPassword=True) - self.promptForString("Tenant entitlement type", "tenant_entitlement_type") - self.promptForString("Tenant start date", "tenant_entitlement_start_date") - self.promptForString("Tenant end date", "tenant_entitlement_end_date") - self.promptForString("S3 bucket prefix", "mas_aibroker_s3_bucket_prefix") - self.promptForString("S3 endpoint url", "mas_aibroker_s3_endpoint_url") - self.promptForString("S3 bucket prefix (tenant level)", "mas_aibroker_tenant_s3_bucket_prefix") - self.promptForString("S3 region (tenant level)", "mas_aibroker_tenant_s3_region") - self.promptForString("S3 endpoint url (tenant level)", "mas_aibroker_tenant_s3_endpoint_url") - self.promptForString("S3 access key (tenant level)", "mas_aibroker_tenant_s3_access_key", isPassword=True) - self.promptForString("S3 secret key (tenant level)", "mas_aibroker_tenant_s3_secret_key", isPassword=True) - self.promptForString("RSL url", "rsl_url") - self.promptForString("ORG Id of RSL", "rsl_org_id") - self.promptForString("Token for RSL", "rsl_token", isPassword=True) - self.yesOrNo("Install minio", "install_minio_aiservice") - if self.getParam("install_minio_aiservice") == "true": - self.promptForString("minio root username", "minio_root_user") - self.promptForString("minio root password", "minio_root_password", isPassword=True) - self.yesOrNo("Install SLS", "install_sls_aiservice") - if self.getParam("install_sls_aiservice") != "true": - self.promptForString("SLS secret name", "mas_aibroker_sls_secret_name") - self.promptForString("SLS registration key", "mas_aibroker_sls_registration_key") - self.promptForString("SLS URL", "mas_aibroker_sls_url") - self.promptForString("SLS CA certificate", "mas_aibroker_sls_ca_cert") - self.yesOrNo("Install DRO", "install_dro_aiservice") - if self.getParam("install_dro_aiservice") != "true": - self.promptForString("DRO secret name", "mas_aibroker_dro_secret_name") - self.promptForString("DRO API key", "mas_aibroker_dro_api_key") - self.promptForString("DRO URL", "mas_aibroker_dro_url") - self.promptForString("DRO CA certificate", "mas_aibroker_dro_ca_cert") - self.yesOrNo("Install DB2", "install_db2_aiservice") - if self.getParam("install_db2_aiservice") != "true": - self.promptForString("DB2 username", "mas_aibroker_db2_username") - self.promptForString("DB2 password", "mas_aibroker_db2_password") - self.promptForString("DB2 JDBC URL", "mas_aibroker_db2_jdbc_url") - self.promptForString("DB2 SSL enabled (yes/no)", "mas_aibroker_db2_ssl_enabled") - self.promptForString("DB2 CA certificate", "mas_aibroker_db2_ca_cert") - # self.promptForString("Environment type", "environment_type") + self.promptForString("RSL url", "rsl_url") + self.promptForString("ORG Id of RSL", "rsl_org_id") + self.promptForString("Token for RSL", "rsl_token", isPassword=True) # These are all candidates to centralise in a new mixin used by both install and aiservice-install @@ -656,7 +732,7 @@ def configCatalog(self): releaseCompleter = WordCompleter(sorted(self.catalogReleases, reverse=True)) releaseSelection = self.promptForString("Select release", completer=releaseCompleter) - self.setParam("mas_app_channel_aibroker", self.catalogReleases[releaseSelection]) + self.setParam("aiservice_channel", self.catalogReleases[releaseSelection]) @logMethodCall def validateCatalogSource(self): @@ -688,7 +764,7 @@ def licensePrompt(self): self.printH1("License Terms") self.printDescription([ "To continue with the installation, you must accept the license terms:", - self.licenses[f"aibroker-{self.getParam('mas_app_channel_aibroker')}"] + self.licenses[f"aibroker-{self.getParam('aiservice_channel')}"] ]) if self.noConfirm: diff --git a/python/src/mas/cli/aiservice/install/argBuilder.py b/python/src/mas/cli/aiservice/install/argBuilder.py index 58be166cf5f..7ebdf2b411d 100644 --- a/python/src/mas/cli/aiservice/install/argBuilder.py +++ b/python/src/mas/cli/aiservice/install/argBuilder.py @@ -36,7 +36,7 @@ def buildCommand(self) -> str: command += f" --ibm-entitlement-key $IBM_ENTITLEMENT_KEY{newline}" # Aibroker Instance Id - command += f" --aibroker-instance-id \"{self.getParam('aibroker_instance_id')}\"{newline}" + command += f" --aiservice-instance-id \"{self.getParam('aiservice_instance_id')}\"{newline}" # MAS Advanced Configuration # ----------------------------------------------------------------------------- @@ -54,7 +54,7 @@ def buildCommand(self) -> str: # IBM Suite License Service # ----------------------------------------------------------------------------- if self.getParam("sls_namespace") and self.getParam("sls_namespace") != "ibm-sls": - if self.getParam("aibroker_instance_id") and self.getParam("sls_namespace") == f"mas-{self.getParam('mas_instance_id')}-sls": + if self.getParam("aiservice_instance_id") and self.getParam("sls_namespace") == f"mas-{self.getParam('mas_instance_id')}-sls": command += " --dedicated-sls" else: command += f" --sls-namespace \"{self.getParam('sls_namespace')}\"" @@ -78,61 +78,11 @@ def buildCommand(self) -> str: # Aibroker Channel # ----------------------------------------------------------------------------- - if self.installAiBroker: - command += f" --aibroker-channel \"{self.getParam('mas_app_channel_aibroker')}\"{newline}" + command += f" --aiservice-channel \"{self.getParam('aiservice_channel')}\"{newline}" # IBM Db2 Universal Operator # ----------------------------------------------------------------------------- - if self.getParam('db2_action_system') == "install" or self.getParam('db2_action_manage') == "install" or self.getParam('db2_action_facilities') == "install": - if self.getParam('db2_action_system') == "install": - command += f" --db2-system{newline}" - if self.getParam('db2_action_manage') == "install": - command += f" --db2-manage{newline}" - if self.getParam('db2_action_facilities') == "install": - command += f" --db2-facilities{newline}" - - if self.getParam('db2_channel') != "": - command += f" --db2-channel \"{self.getParam('db2_channel')}\"{newline}" - if self.getParam('db2_namespace') != "": - command += f" --db2-namespace \"{self.getParam('db2_namespace')}\"{newline}" - - if self.getParam('db2_type') != "": - command += f" --db2-type \"{self.getParam('db2_type')}\"{newline}" - if self.getParam('db2_timezone') != "": - command += f" --db2-timezone \"{self.getParam('db2_timezone')}\"{newline}" - - if self.getParam('db2_affinity_key') != "": - command += f" --db2-affinity-key \"{self.getParam('db2_affinity_key')}\"{newline}" - if self.getParam('db2_affinity_value') != "": - command += f" --db2-affinity_value \"{self.getParam('db2_affinity_value')}\"{newline}" - - if self.getParam('db2_tolerate_key') != "": - command += f" --db2-tolerate-key \"{self.getParam('db2_tolerate_key')}\"{newline}" - if self.getParam('db2_tolerate_value') != "": - command += f" --db2-tolerate-value \"{self.getParam('db2_tolerate_value')}\"{newline}" - if self.getParam('db2_tolerate_effect') != "": - command += f" --db2-tolerate-effect \"{self.getParam('db2_tolerate_effect')}\"{newline}" - - if self.getParam('db2_cpu_requests') != "": - command += f" --db2-cpu-requests \"{self.getParam('db2_cpu_requests')}\"{newline}" - if self.getParam('db2_cpu_limits') != "": - command += f" --db2-cpu-limits \"{self.getParam('db2_cpu_limits')}\"{newline}" - - if self.getParam('db2_memory_requests') != "": - command += f" --db2-memory-requests \"{self.getParam('db2_memory_requests')}\"{newline}" - if self.getParam('db2_memory_limits') != "": - command += f" --db2-memory-limits \"{self.getParam('db2_memory_limits')}\"{newline}" - - if self.getParam('db2_backup_storage_size') != "": - command += f" --db2-backup-storage \"{self.getParam('db2_backup_storage_size')}\"{newline}" - if self.getParam('db2_data_storage_size') != "": - command += f" --db2-data-storage \"{self.getParam('db2_data_storage_size')}\"{newline}" - if self.getParam('db2_logs_storage_size') != "": - command += f" --db2-logs-storage \"{self.getParam('db2_logs_storage_size')}\"{newline}" - if self.getParam('db2_meta_storage_size') != "": - command += f" --db2-meta-storage \"{self.getParam('db2_meta_storage_size')}\"{newline}" - if self.getParam('db2_temp_storage_size') != "": - command += f" --db2-temp-storage \"{self.getParam('db2_temp_storage_size')}\"{newline}" + command += f" --db2-aiservice{newline}" # Development Mode # ----------------------------------------------------------------------------- @@ -152,8 +102,6 @@ def buildCommand(self) -> str: command += f" --no-wait-for-pvc{newline}" if self.getParam('skip_pre_check') is True: command += f" --skip-pre-check{newline}" - if self.getParam('skip_grafana_install') is True: - command += f" --skip-grafana-install{newline}" if self.getParam('image_pull_policy') != "": command += f" --image-pull-policy {self.getParam('image_pull_policy')}{newline}" if self.getParam('service_account_name') != "": @@ -161,80 +109,66 @@ def buildCommand(self) -> str: # Aibroker Advanced Settings # ----------------------------------------------------------------------------- - if self.getParam('mas_aibroker_storage_provider') != "": - command += f" --mas-aibroker-storage-provider \"{self.getParam('mas_aibroker_storage_provider')}\"{newline}" - if self.getParam('mas_aibroker_storage_accesskey') != "": - command += f" --mas-aibroker-storage-accesskey \"{self.getParam('mas_aibroker_storage_accesskey')}\"{newline}" - if self.getParam('mas_aibroker_storage_secretkey') != "": - command += f" --mas-aibroker-storage-secretkey \"{self.getParam('mas_aibroker_storage_secretkey')}\"{newline}" - if self.getParam('mas_aibroker_storage_host') != "": - command += f" --mas-aibroker-storage-host \"{self.getParam('mas_aibroker_storage_host')}\"{newline}" - if self.getParam('mas_aibroker_storage_port') != "": - command += f" --mas-aibroker-storage-port \"{self.getParam('mas_aibroker_storage_port')}\"{newline}" - if self.getParam('mas_aibroker_storage_ssl') != "": - command += f" --mas-aibroker-storage-ssl \"{self.getParam('mas_aibroker_storage_ssl')}\"{newline}" - if self.getParam('mas_aibroker_storage_region') != "": - command += f" --mas-aibroker-storage-region \"{self.getParam('mas_aibroker_storage_region')}\"{newline}" - if self.getParam('mas_aibroker_storage_pipelines_bucket') != "": - command += f" --mas-aibroker-storage-pipelines-bucket \"{self.getParam('mas_aibroker_storage_pipelines_bucket')}\"{newline}" - if self.getParam('mas_aibroker_storage_tenants_bucket') != "": - command += f" --mas-aibroker-storage-tenants-bucket \"{self.getParam('mas_aibroker_storage_tenants_bucket')}\"{newline}" - if self.getParam('mas_aibroker_storage_templates_bucket') != "": - command += f" --mas-aibroker-storage-templates-bucket \"{self.getParam('mas_aibroker_storage_templates_bucket')}\"{newline}" - if self.getParam('mas_aibroker_tenant_name') != "": - command += f" --mas-aibroker-tenant-name \"{self.getParam('mas_aibroker_tenant_name')}\"{newline}" - if self.getParam('mas_aibroker_watsonxai_apikey') != "": - command += f" --mas-aibroker-watsonxai-apikey \"{self.getParam('mas_aibroker_watsonxai_apikey')}\"{newline}" - if self.getParam('mas_aibroker_watsonxai_url') != "": - command += f" --mas-aibroker-watsonxai-url \"{self.getParam('mas_aibroker_watsonxai_url')}\"{newline}" - if self.getParam('mas_aibroker_watsonxai_project_id') != "": - command += f" --mas-aibroker-watsonxai-project-id \"{self.getParam('mas_aibroker_watsonxai_project_id')}\"{newline}" - if self.getParam('mas_aibroker_watsonx_action') != "": - command += f" --mas-aibroker-watsonx-action \"{self.getParam('mas_aibroker_watsonx_action')}\"{newline}" - if self.getParam('mas_aibroker_db_host') != "": - command += f" --mas-aibroker-db-host \"{self.getParam('mas_aibroker_db_host')}\"{newline}" - if self.getParam('mas_aibroker_db_port') != "": - command += f" --mas-aibroker-db-port \"{self.getParam('mas_aibroker_db_port')}\"{newline}" - if self.getParam('mas_aibroker_db_user') != "": - command += f" --mas-aibroker-db-user \"{self.getParam('mas_aibroker_db_user')}\"{newline}" - if self.getParam('mas_aibroker_db_database') != "": - command += f" --mas-aibroker-db-database \"{self.getParam('mas_aibroker_db_database')}\"{newline}" - if self.getParam('mas_aibroker_db_secret_name') != "": - command += f" --mas-aibroker-db-secret-name \"{self.getParam('mas_aibroker_db_secret_name')}\"{newline}" - if self.getParam('mas_aibroker_db_secret_key') != "": - command += f" --mas-aibroker-db-secret-key \"{self.getParam('mas_aibroker_db_secret_key')}\"{newline}" - if self.getParam('mas_aibroker_db_secret_value') != "": - command += f" --mas-aibroker-db-secret-value \"{self.getParam('mas_aibroker_db_secret_value')}\"{newline}" - if self.getParam('mariadb_user') != "": - command += f" --mariadb-user \"{self.getParam('mariadb_user')}\"{newline}" - if self.getParam('mariadb_password') != "": - command += f" --mariadb-password \"{self.getParam('mariadb_password')}\"{newline}" + if self.getParam('aiservice_storage_provider') != "": + command += f" --aiservice-storage-provider \"{self.getParam('aiservice_storage_provider')}\"{newline}" + if self.getParam('aiservice_storage_accesskey') != "": + command += f" --aiservice-storage-accesskey \"{self.getParam('aiservice_storage_accesskey')}\"{newline}" + if self.getParam('aiservice_storage_secretkey') != "": + command += f" --aiservice-storage-secretkey \"{self.getParam('aiservice_storage_secretkey')}\"{newline}" + if self.getParam('aiservice_storage_host') != "": + command += f" --aiservice-storage-host \"{self.getParam('aiservice_storage_host')}\"{newline}" + if self.getParam('aiservice_storage_port') != "": + command += f" --aiservice-storage-port \"{self.getParam('aiservice_storage_port')}\"{newline}" + if self.getParam('aiservice_storage_ssl') != "": + command += f" --aiservice-storage-ssl \"{self.getParam('aiservice_storage_ssl')}\"{newline}" + if self.getParam('aiservice_storage_region') != "": + command += f" --aiservice-storage-region \"{self.getParam('aiservice_storage_region')}\"{newline}" + if self.getParam('aiservice_storage_pipelines_bucket') != "": + command += f" --aiservice-storage-pipelines-bucket \"{self.getParam('aiservice_storage_pipelines_bucket')}\"{newline}" + if self.getParam('aiservice_storage_tenants_bucket') != "": + command += f" --aiservice-storage-tenants-bucket \"{self.getParam('aiservice_storage_tenants_bucket')}\"{newline}" + if self.getParam('aiservice_storage_templates_bucket') != "": + command += f" --aiservice-storage-templates-bucket \"{self.getParam('aiservice_storage_templates_bucket')}\"{newline}" + + if self.getParam('aiservice_watsonxai_apikey') != "": + command += f" --aiservice-watsonxai-apikey \"{self.getParam('aiservice_watsonxai_apikey')}\"{newline}" + if self.getParam('aiservice_watsonxai_url') != "": + command += f" --aiservice-watsonxai-url \"{self.getParam('aiservice_watsonxai_url')}\"{newline}" + if self.getParam('aiservice_watsonxai_project_id') != "": + command += f" --aiservice-watsonxai-project-id \"{self.getParam('aiservice_watsonxai_project_id')}\"{newline}" + if self.getParam('aiservice_watsonx_action') != "": + command += f" --aiservice-watsonx-action \"{self.getParam('aiservice_watsonx_action')}\"{newline}" + if self.getParam('minio_root_user') != "": command += f" --minio-root-user \"{self.getParam('minio_root_user')}\"{newline}" if self.getParam('minio_root_password') != "": command += f" --minio-root-password \"{self.getParam('minio_root_password')}\"{newline}" + if self.getParam('tenant_entitlement_type') != "": command += f" --tenant-entitlement-type \"{self.getParam('tenant_entitlement_type')}\"{newline}" if self.getParam('tenant_entitlement_start_date') != "": command += f" --tenant-entitlement-start-date \"{self.getParam('tenant_entitlement_start_date')}\"{newline}" if self.getParam('tenant_entitlement_end_date') != "": command += f" --tenant-entitlement-end-date \"{self.getParam('tenant_entitlement_end_date')}\"{newline}" - if self.getParam('mas_aibroker_s3_bucket_prefix') != "": - command += f" --mas-aibroker-s3-bucket-prefix \"{self.getParam('mas_aibroker_s3_bucket_prefix')}\"{newline}" - if self.getParam('mas_aibroker_s3_endpoint_url') != "": - command += f" --mas-aibroker-s3-endpoint-url \"{self.getParam('mas_aibroker_s3_endpoint_url')}\"{newline}" - if self.getParam('mas_aibroker_s3_region') != "": - command += f" --mas-aibroker-s3-region \"{self.getParam('mas_aibroker_s3_region')}\"{newline}" - if self.getParam('mas_aibroker_tenant_s3_bucket_prefix') != "": - command += f" --mas-aibroker-tenant-s3-bucket-prefix \"{self.getParam('mas_aibroker_tenant_s3_bucket_prefix')}\"{newline}" - if self.getParam('mas_aibroker_tenant_s3_region') != "": - command += f" --mas-aibroker-tenant-s3-region \"{self.getParam('mas_aibroker_tenant_s3_region')}\"{newline}" - if self.getParam('mas_aibroker_tenant_s3_endpoint_url') != "": - command += f" --mas-aibroker-tenant-s3-endpoint-url \"{self.getParam('mas_aibroker_tenant_s3_endpoint_url')}\"{newline}" - if self.getParam('mas_aibroker_tenant_s3_access_key') != "": - command += f" --mas-aibroker-tenant-s3-access-key \"{self.getParam('mas_aibroker_tenant_s3_access_key')}\"{newline}" - if self.getParam('mas_aibroker_tenant_s3_secret_key') != "": - command += f" --mas-aibroker-tenant-s3-secret-key \"{self.getParam('mas_aibroker_tenant_s3_secret_key')}\"{newline}" + + if self.getParam('aiservice_s3_bucket_prefix') != "": + command += f" --aiservice-s3-bucket-prefix \"{self.getParam('aiservice_s3_bucket_prefix')}\"{newline}" + if self.getParam('aiservice_s3_endpoint_url') != "": + command += f" --aiservice-s3-endpoint-url \"{self.getParam('aiservice_s3_endpoint_url')}\"{newline}" + if self.getParam('aiservice_s3_region') != "": + command += f" --aiservice-s3-region \"{self.getParam('aiservice_s3_region')}\"{newline}" + + if self.getParam('aiservice_tenant_s3_bucket_prefix') != "": + command += f" --aiservice-tenant-s3-bucket-prefix \"{self.getParam('aiservice_tenant_s3_bucket_prefix')}\"{newline}" + if self.getParam('aiservice_tenant_s3_region') != "": + command += f" --aiservice-tenant-s3-region \"{self.getParam('aiservice_tenant_s3_region')}\"{newline}" + if self.getParam('aiservice_tenant_s3_endpoint_url') != "": + command += f" --aiservice-tenant-s3-endpoint-url \"{self.getParam('aiservice_tenant_s3_endpoint_url')}\"{newline}" + if self.getParam('aiservice_tenant_s3_access_key') != "": + command += f" --aiservice-tenant-s3-access-key \"{self.getParam('aiservice_tenant_s3_access_key')}\"{newline}" + if self.getParam('aiservice_tenant_s3_secret_key') != "": + command += f" --aiservice-tenant-s3-secret-key \"{self.getParam('aiservice_tenant_s3_secret_key')}\"{newline}" + if self.getParam('rsl_url') != "": command += f" --rsl-url \"{self.getParam('rsl_url')}\"{newline}" if self.getParam('rsl_org_id') != "": diff --git a/python/src/mas/cli/aiservice/install/argParser.py b/python/src/mas/cli/aiservice/install/argParser.py index f01f9a76bbf..273fe8c509b 100644 --- a/python/src/mas/cli/aiservice/install/argParser.py +++ b/python/src/mas/cli/aiservice/install/argParser.py @@ -58,7 +58,7 @@ def isValidFile(parser, arg) -> str: # ----------------------------------------------------------------------------- masArgGroup = aiServiceinstallArgParser.add_argument_group("Aibroker Basic Configuration") masArgGroup.add_argument( - "-i", "--aibroker-instance-id", + "-i", "--aiservice-instance-id", required=False, help="Aibroker Instance ID" ) @@ -166,7 +166,7 @@ def isValidFile(parser, arg) -> str: masAppsArgGroup = aiServiceinstallArgParser.add_argument_group("MAS Applications") masAppsArgGroup.add_argument( - "--aibroker-channel", + "--aiservice-channel", required=False, help="Subscription channel for Maximo Ai Broker" ) @@ -174,162 +174,187 @@ def isValidFile(parser, arg) -> str: # AI Broker # ----------------------------------------------------------------------------- aibrokerArgGroup = aiServiceinstallArgParser.add_argument_group("Maximo AI Broker") -aibrokerArgGroup.add_argument( - "--mas-aibroker-storage-provider", - dest="mas_aibroker_storage_provider", - required=False, - help="Customize Manage database encryption keys" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-storage-accesskey", - dest="mas_aibroker_storage_accesskey", - required=False, - help="Customize Manage database encryption keys" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-storage-secretkey", - dest="mas_aibroker_storage_secretkey", + + +# S3 - Minio +# ----------------------------------------------------------------------------- +s3ArgGroup = aiServiceinstallArgParser.add_argument_group("S3 Storage") +s3ArgGroup.add_argument( + "--install-minio", + dest="install_minio_aiservice", required=False, - help="Customize Manage database encryption keys" + help="Install Minio and configure it as the S3 provider for AI Service", + action="store_const", + const="true" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-storage-host", - dest="mas_aibroker_storage_host", + +s3ArgGroup.add_argument( + "--minio-root-user", + dest="minio_root_user", required=False, - help="Customize Manage database encryption keys" + help="Root user for minio" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-storage-port", - dest="mas_aibroker_storage_port", +s3ArgGroup.add_argument( + "--minio-root-password", + dest="minio_root_password", required=False, - help="Customize Manage database encryption keys" + help="Password for minio root user" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-storage-ssl", - dest="mas_aibroker_storage_ssl", + +# S3 - General +# ----------------------------------------------------------------------------- +s3ArgGroup.add_argument( + "--s3-provider", + dest="aiservice_storage_provider", required=False, - help="Customize Manage database encryption keys" + help="TODO: Write me" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-storage-region", - dest="mas_aibroker_storage_region", + +# S3 - Bucket Naming +# ----------------------------------------------------------------------------- +s3ArgGroup.add_argument( + "--s3-pipelines-bucket", + dest="aiservice_storage_pipelines_bucket", required=False, - help="Customize Manage database encryption keys" + default="km-pipelines", + help="TODO: Write me" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-storage-pipelines-bucket", - dest="mas_aibroker_storage_pipelines_bucket", +s3ArgGroup.add_argument( + "--s3-tenants-bucket", + dest="aiservice_storage_tenants_bucket", required=False, - help="Customize Manage database encryption keys" + default="km-tenants", + help="TODO: Write me" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-storage-tenants-bucket", - dest="mas_aibroker_storage_tenants_bucket", +s3ArgGroup.add_argument( + "--s3-templates-bucket", + dest="aiservice_storage_templates_bucket", required=False, - help="Customize Manage database encryption keys" + default="km-templates", + help="TODO: Write me" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-storage-templates-bucket", - dest="mas_aibroker_storage_templates_bucket", + +# S3 - Bucket Prefixes +# ----------------------------------------------------------------------------- +s3ArgGroup.add_argument( + "--s3-bucket-prefix", + dest="aiservice_s3_bucket_prefix", required=False, - help="Customize Manage database encryption keys" + default="s3", + help="s3 bucket prefix" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-tenant-name", - dest="mas_aibroker_tenant_name", +s3ArgGroup.add_argument( + "--s3-bucket-prefix-tenant", + dest="aiservice_tenant_s3_bucket_prefix", required=False, - help="Customize Manage database encryption keys" + default="s3", + help="s3 bucket prefix ( tenant level )" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-watsonxai-apikey", - dest="mas_aibroker_watsonxai_apikey", + +# S3 - External Connection +# ----------------------------------------------------------------------------- +s3ArgGroup.add_argument( + "--s3-host", + dest="aiservice_storage_host", required=False, - help="Customize Manage database encryption keys" + help="TODO: Write me" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-watsonxai-url", - dest="mas_aibroker_watsonxai_url", +s3ArgGroup.add_argument( + "--s3-port", + dest="aiservice_storage_port", required=False, - help="Customize Manage database encryption keys" + help="TODO: Write me" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-watsonxai-project-id", - dest="mas_aibroker_watsonxai_project_id", +s3ArgGroup.add_argument( + "--s3-ssl", + dest="aiservice_storage_ssl", required=False, - help="Customize Manage database encryption keys" + help="TODO: Write me" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-watsonx-action", - dest="mas_aibroker_watsonx_action", +s3ArgGroup.add_argument( + "--s3-accesskey", + dest="aiservice_storage_accesskey", required=False, - help="Customize Manage database encryption keys" + help="TODO: Write me" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-db-host", - dest="mas_aibroker_db_host", +s3ArgGroup.add_argument( + "--s3-secretkey", + dest="aiservice_storage_secretkey", required=False, - help="Customize Manage database encryption keys" + help="TODO: Write me" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-db-port", - dest="mas_aibroker_db_port", +s3ArgGroup.add_argument( + "--s3-region", + dest="aiservice_storage_region", required=False, - help="Customize Manage database encryption keys" + help="TODO: Write me" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-db-user", - dest="mas_aibroker_db_user", +s3ArgGroup.add_argument( + "--s3-endpoint-url", + dest="aiservice_s3_endpoint_url", required=False, - help="Customize Manage database encryption keys" + help="endpoint url for s3" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-db-database", - dest="mas_aibroker_db_database", + +# S3 - External Access Credentials (Tenant) +# ----------------------------------------------------------------------------- +s3ArgGroup.add_argument( + "--s3-tenant-access-key", + dest="aiservice_tenant_s3_access_key", required=False, - help="Customize Manage database encryption keys" + help="access key for s3 ( tenant level )" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-db-secret-name", - dest="mas_aibroker_db_secret_name", +s3ArgGroup.add_argument( + "--s3-tenant-secret-key", + dest="aiservice_tenant_s3_secret_key", required=False, - help="Customize Manage database encryption keys" + help="secret key for s3 ( tenant level )" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-db-secret-key", - dest="mas_aibroker_db_secret_key", +s3ArgGroup.add_argument( + "--s3-tenant-region", + dest="aiservice_tenant_s3_region", required=False, - help="Customize Manage database encryption keys" + help="s3 region ( tenant level )" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-db-secret-value", - dest="mas_aibroker_db_secret_value", +s3ArgGroup.add_argument( + "--s3-tenant-endpoint-url", + dest="aiservice_tenant_s3_endpoint_url", required=False, - help="Customize Manage database encryption keys" + help="endpoint url for s3 ( tenant level )" ) -aibrokerArgGroup.add_argument( - "--minio-root-user", - dest="minio_root_user", + +# Watsonx +# ----------------------------------------------------------------------------- +watsonxArgGroup = aiServiceinstallArgParser.add_argument_group("Watsonx") + +watsonxArgGroup.add_argument( + "--watsonxai-apikey", + dest="aiservice_watsonxai_apikey", required=False, - help="Root user for minio" + help="TODO: Write me" ) -aibrokerArgGroup.add_argument( - "--minio-root-password", - dest="minio_root_password", +watsonxArgGroup.add_argument( + "--watsonxai-url", + dest="aiservice_watsonxai_url", required=False, - help="Password for minio rootuser" + help="TODO: Write me" ) -aibrokerArgGroup.add_argument( - "--mariadb-user", - dest="mariadb_user", +watsonxArgGroup.add_argument( + "--watsonxai-project-id", + dest="aiservice_watsonxai_project_id", required=False, - help="Mariadb user name" + help="TODO: Write me" ) -aibrokerArgGroup.add_argument( - "--mariadb-password", - dest="mariadb_password", +watsonxArgGroup.add_argument( + "--watsonx-action", + dest="aiservice_watsonx_action", required=False, - help="Password for mariadb user" + help="TODO: Write me" ) + + +# AI Service +# ----------------------------------------------------------------------------- aibrokerArgGroup.add_argument( "--tenant-entitlement-type", dest="tenant_entitlement_type", @@ -348,54 +373,6 @@ def isValidFile(parser, arg) -> str: required=False, help="End date for Aibroker tenant" ) -aibrokerArgGroup.add_argument( - "--mas-aibroker-s3-bucket-prefix", - dest="mas_aibroker_s3_bucket_prefix", - required=False, - help="s3 bucker prefix" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-s3-endpoint-url", - dest="mas_aibroker_s3_endpoint_url", - required=False, - help="endpoint url for s3" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-s3-region", - dest="mas_aibroker_s3_region", - required=False, - help="region for s3" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-tenant-s3-bucket-prefix", - dest="mas_aibroker_tenant_s3_bucket_prefix", - required=False, - help="s3 bucker prefix ( tenant level )" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-tenant-s3-region", - dest="mas_aibroker_tenant_s3_region", - required=False, - help="s3 region ( tenant level )" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-tenant-s3-endpoint-url", - dest="mas_aibroker_tenant_s3_endpoint_url", - required=False, - help="endpoint url for s3 ( tenant level )" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-tenant-s3-access-key", - dest="mas_aibroker_tenant_s3_access_key", - required=False, - help="access key for s3 ( tenant level )" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-tenant-s3-secret-key", - dest="mas_aibroker_tenant_s3_secret_key", - required=False, - help="secret key for s3 ( tenant level )" -) aibrokerArgGroup.add_argument( "--rsl-url", dest="rsl_url", @@ -414,112 +391,6 @@ def isValidFile(parser, arg) -> str: required=False, help="token for rsl" ) -aibrokerArgGroup.add_argument( - "--install-minio-aiservice", - dest="install_minio_aiservice", - required=False, - help="flag for install minio" -) -aibrokerArgGroup.add_argument( - "--install-sls-aiservice", - dest="install_sls_aiservice", - required=False, - help="flag for install sls" -) -aibrokerArgGroup.add_argument( - "--install-dro-aiservice", - dest="install_dro_aiservice", - required=False, - help="flag for install dro" -) -aibrokerArgGroup.add_argument( - "--install-db2-aiservice", - dest="install_db2_aiservice", - required=False, - help="flag for install db2" -) - -aibrokerArgGroup.add_argument( - "--mas-aibroker-dro-secret-name", - dest="mas_aibroker_dro_secret_name", - required=False, - help="DRO secret name" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-dro-api-key", - dest="mas_aibroker_dro_api_key", - required=False, - help="DRO API key" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-dro-url", - dest="mas_aibroker_dro_url", - required=False, - help="DRO URL" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-dro-ca-cert", - dest="mas_aibroker_dro_ca_cert", - required=False, - help="DRO CA certificate" -) - -aibrokerArgGroup.add_argument( - "--mas-aibroker-db2-username", - dest="mas_aibroker_db2_username", - required=False, - help="DB2 username" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-db2-password", - dest="mas_aibroker_db2_password", - required=False, - help="DB2 password" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-db2-jdbc-url", - dest="mas_aibroker_db2_jdbc_url", - required=False, - help="DB2 JDBC URL" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-db2-ssl-enabled", - dest="mas_aibroker_db2_ssl_enabled", - required=False, - help="DB2 SSL enabled" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-db2-ca-cert", - dest="mas_aibroker_db2_ca_cert", - required=False, - help="DB2 CA certificate" -) - -aibrokerArgGroup.add_argument( - "--mas-aibroker-sls-secret-name", - dest="mas_aibroker_sls_secret_name", - required=False, - help="SLS secret name" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-sls-registration-key", - dest="mas_aibroker_sls_registration_key", - required=False, - help="SLS registration key" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-sls-url", - dest="mas_aibroker_sls_url", - required=False, - help="SLS URL" -) -aibrokerArgGroup.add_argument( - "--mas-aibroker-sls-ca-cert", - dest="mas_aibroker_sls_ca_cert", - required=False, - help="SLS CA certificate" -) - aibrokerArgGroup.add_argument( "--environment-type", dest="environment_type", @@ -527,9 +398,12 @@ def isValidFile(parser, arg) -> str: default="non-production", help="Environment type (default: non-production)" ) + + # IBM Db2 Universal Operator # ----------------------------------------------------------------------------- db2ArgGroup = aiServiceinstallArgParser.add_argument_group("IBM Db2 Universal Operator") + db2ArgGroup.add_argument( "--db2-namespace", required=False, @@ -540,115 +414,6 @@ def isValidFile(parser, arg) -> str: required=False, help="Subscription channel for Db2u" ) -db2ArgGroup.add_argument( - "--db2-system", - dest="db2_action_system", - required=False, - help="Install a shared Db2u instance for MAS (required by IoT & Monitor, supported by Manage)", - action="store_const", - const="install" -) -db2ArgGroup.add_argument( - "--db2-manage", - dest="db2_action_manage", - required=False, - help="Install a dedicated Db2u instance for Maximo Manage (supported by Manage)", - action="store_const", - const="install" -) -db2ArgGroup.add_argument( - "--db2-facilities", - dest="db2_action_facilities", - required=False, - help="Install a dedicated Db2u instance for Maximo Real Estate and Facilities (supported by Facilities)", - action="store_const", - const="install" -) -db2ArgGroup.add_argument( - "--db2-type", - required=False, - help="Choose the type of the Manage dedicated Db2u instance. Available options are `db2wh` (default) or `db2oltp`" -) -db2ArgGroup.add_argument( - "--db2-timezone", - required=False, - help="" -) -db2ArgGroup.add_argument( - "--db2-affinity-key", - required=False, - help="Set a node label to declare affinity to" -) -db2ArgGroup.add_argument( - "--db2-affinity-value", - required=False, - help="Set the value of the node label to affine with" -) -db2ArgGroup.add_argument( - "--db2-tolerate-key", - required=False, - help="Set a node taint to tolerate" -) -db2ArgGroup.add_argument( - "--db2-tolerate-value", - required=False, - help="Set the value of the taint to tolerate" -) -db2ArgGroup.add_argument( - "--db2-tolerate-effect", - required=False, - help="Set the effect that will be tolerated (NoSchedule, PreferNoSchedule, or NoExecute)" -) -db2ArgGroup.add_argument( - "--db2-cpu-requests", - required=False, - help="Customize Db2 CPU request" -) -db2ArgGroup.add_argument( - "--db2-cpu-limits", - required=False, - help="Customize Db2 CPU limit" -) -db2ArgGroup.add_argument( - "--db2-memory-requests", - required=False, - help="Customize Db2 memory request" -) -db2ArgGroup.add_argument( - "--db2-memory-limits", - required=False, - help="Customize Db2 memory limit" -) -db2ArgGroup.add_argument( - "--db2-backup-storage", - dest="db2_backup_storage_size", - required=False, - help="Customize Db2 storage capacity" -) -db2ArgGroup.add_argument( - "--db2-data-storage", - dest="db2_data_storage_size", - required=False, - help="Customize Db2 storage capacity" -) -db2ArgGroup.add_argument( - "--db2-logs-storage", - dest="db2_logs_storage_size", - required=False, - help="Customize Db2 storage capacity" -) -db2ArgGroup.add_argument( - "--db2-meta-storage", - dest="db2_meta_storage_size", - required=False, - help="Customize Db2 storage capacity" -) -db2ArgGroup.add_argument( - "--db2-temp-storage", - dest="db2_temp_storage_size", - required=False, - help="Customize Db2 storage capacity" -) # Development Mode diff --git a/python/src/mas/cli/aiservice/install/params.py b/python/src/mas/cli/aiservice/install/params.py index 93b463d141b..79c1fad2986 100644 --- a/python/src/mas/cli/aiservice/install/params.py +++ b/python/src/mas/cli/aiservice/install/params.py @@ -58,63 +58,43 @@ "artifactory_username", "artifactory_token", # Aibroker - "mas_aibroker_storage_provider", - "mas_aibroker_storage_accesskey", - "mas_aibroker_storage_secretkey", - "mas_aibroker_storage_host", - "mas_aibroker_storage_port", - "mas_aibroker_storage_ssl", - "mas_aibroker_storage_region", - "mas_aibroker_storage_pipelines_bucket", - "mas_aibroker_storage_tenants_bucket", - "mas_aibroker_storage_templates_bucket", - "mas_aibroker_tenant_name", - "mas_aibroker_watsonxai_apikey", - "mas_aibroker_watsonxai_url", - "mas_aibroker_watsonxai_project_id", - "mas_aibroker_watsonx_action", - "mas_aibroker_db_host", - "mas_aibroker_db_port", - "mas_aibroker_db_user", - "mas_aibroker_db_database", - "mas_aibroker_db_secret_name", - "mas_aibroker_db_secret_key", - "mas_aibroker_db_secret_value", - "aibroker_instance_id", - "mariadb_user", - "mariadb_password", + "aiservice_storage_provider", + "aiservice_storage_accesskey", + "aiservice_storage_secretkey", + "aiservice_storage_host", + "aiservice_storage_port", + "aiservice_storage_ssl", + "aiservice_storage_region", + "aiservice_storage_pipelines_bucket", + "aiservice_storage_tenants_bucket", + "aiservice_storage_templates_bucket", + + "aiservice_watsonxai_apikey", + "aiservice_watsonxai_url", + "aiservice_watsonxai_project_id", + "aiservice_watsonx_action", + + "aiservice_instance_id", + "minio_root_user", "minio_root_password", + "tenant_entitlement_type", "tenant_entitlement_start_date", "tenant_entitlement_end_date", - "mas_aibroker_s3_bucket_prefix", - "mas_aibroker_s3_region", - "mas_aibroker_s3_endpoint_url", - "mas_aibroker_tenant_s3_bucket_prefix", - "mas_aibroker_tenant_s3_region", - "mas_aibroker_tenant_s3_endpoint_url", - "mas_aibroker_tenant_s3_access_key", - "mas_aibroker_tenant_s3_secret_key", + + "aiservice_s3_bucket_prefix", + "aiservice_s3_region", + "aiservice_s3_endpoint_url", + "aiservice_tenant_s3_bucket_prefix", + "aiservice_tenant_s3_region", + "aiservice_tenant_s3_endpoint_url", + "aiservice_tenant_s3_access_key", + "aiservice_tenant_s3_secret_key", + "rsl_url", "rsl_org_id", "rsl_token", - "install_minio_aiservice", - "install_sls_aiservice", - "install_dro_aiservice", - "install_db2_aiservice", - "mas_aibroker_dro_secret_name", - "mas_aibroker_dro_api_key", - "mas_aibroker_dro_url", - "mas_aibroker_dro_ca_cert", - "mas_aibroker_db2_username", - "mas_aibroker_db2_password", - "mas_aibroker_db2_jdbc_url", - "mas_aibroker_db2_ssl_enabled", - "mas_aibroker_db2_ca_cert", - "mas_aibroker_sls_secret_name", - "mas_aibroker_sls_registration_key", - "mas_aibroker_sls_url", - "mas_aibroker_sls_ca_cert", + "environment_type", ] diff --git a/python/src/mas/cli/aiservice/install/summarizer.py b/python/src/mas/cli/aiservice/install/summarizer.py index da55b0b4664..b0850cc3fcd 100644 --- a/python/src/mas/cli/aiservice/install/summarizer.py +++ b/python/src/mas/cli/aiservice/install/summarizer.py @@ -10,7 +10,6 @@ import logging import yaml -from prompt_toolkit import print_formatted_text, HTML from mas.devops.ocp import getConsoleURL logger = logging.getLogger(__name__) @@ -32,116 +31,61 @@ def ocpSummary(self) -> None: self.printParamSummary("Certificate Manager", "cert_manager_provider") self.printParamSummary("Cluster Ingress Certificate Secret", "ocp_ingress_tls_secret_name") - def masSummary(self) -> None: - - self.printH2("IBM Maximo Application Suite") - - print() + def aiServiceSummary(self) -> None: + self.printH2("Maximo Operator Catalog") self.printParamSummary("Catalog Version", "mas_catalog_version") # We only list the digest if it's specified (primary use case is when running development builds in airgap environments) if self.getParam("mas_catalog_digest" != ""): self.printParamSummary("Catalog Digest", "mas_catalog_digest") - self.printParamSummary("Subscription Channel", "mas_channel") - print() + self.printH2("IBM Container Registry") self.printParamSummary("IBM Entitled Registry", "mas_icr_cp") self.printParamSummary("IBM Open Registry", "mas_icr_cpopen") - print() - if self.localConfigDir is not None: - self.printSummary("Additional Config", self.localConfigDir) - else: - self.printSummary("Additional Config", "Not Configured") - - def aibrokerSummary(self) -> None: - if self.installAiBroker: - self.printSummary("AI Broker", self.params["mas_app_channel_aibroker"]) - print_formatted_text(HTML(" + Maximo AI Broker Settings")) - self.printParamSummary(" + Aibroker Instance Id", "aibroker_instance_id") - self.printParamSummary(" + Storage provider", "mas_aibroker_storage_provider") - if self.getParam("mas_aibroker_storage_provider") == "minio": - self.printParamSummary(" + minio root username", "minio_root_user") - if self.getParam("mas_app_channel_aibroker") != "9.0.x": - self.printParamSummary(" + Mariadb username", "mariadb_user") - self.printParamSummary(" + Mariadb password", "mariadb_password") - self.printParamSummary(" + Storage access key", "mas_aibroker_storage_accesskey") - self.printParamSummary(" + Storage host", "mas_aibroker_storage_host") - self.printParamSummary(" + Storage port", "mas_aibroker_storage_port") - self.printParamSummary(" + Storage ssl", "mas_aibroker_storage_ssl") - self.printParamSummary(" + Storage region", "mas_aibroker_storage_region") - self.printParamSummary(" + Storage pipelines bucket", "mas_aibroker_storage_pipelines_bucket") - self.printParamSummary(" + Storage tenants bucket", "mas_aibroker_storage_tenants_bucket") - self.printParamSummary(" + Storage templates bucket", "mas_aibroker_storage_templates_bucket") - self.printParamSummary(" + Watsonxai machine learning url", "mas_aibroker_watsonxai_url") - self.printParamSummary(" + Watsonxai project id", "mas_aibroker_watsonxai_project_id") - self.printParamSummary(" + Database host", "mas_aibroker_db_host") - self.printParamSummary(" + Database port", "mas_aibroker_db_port") - self.printParamSummary(" + Database user", "mas_aibroker_db_user") - self.printParamSummary(" + Database name", "mas_aibroker_db_database") - if self.getParam("mas_app_channel_aibroker") != "9.0.x": - self.printParamSummary(" + Tenant entitlement type", "tenant_entitlement_type") - self.printParamSummary(" + Tenant start date", "tenant_entitlement_start_date") - self.printParamSummary(" + Tenant end date", "tenant_entitlement_end_date") - self.printParamSummary(" + S3 bucket prefix", "mas_aibroker_s3_bucket_prefix") - self.printParamSummary(" + S3 endpoint url", "mas_aibroker_s3_endpoint_url") - self.printParamSummary(" + S3 bucket prefix (tenant level)", "mas_aibroker_tenant_s3_bucket_prefix") - self.printParamSummary(" + S3 region (tenant level)", "mas_aibroker_tenant_s3_region") - self.printParamSummary(" + S3 endpoint url (tenant level)", "mas_aibroker_tenant_s3_endpoint_url") - self.printParamSummary(" + RSL url", "rsl_url") - self.printParamSummary(" + ORG Id of RSL", "rsl_org_id") - self.printParamSummary(" + Token for RSL", "rsl_token") - self.printParamSummary(" + Install minio", "install_minio_aiservice") - self.printParamSummary(" + Install SLS", "install_sls_aiservice") - if self.getParam("install_sls_aiservice") != "true": - self.printParamSummary(" + SLS secret name", "mas_aibroker_sls_secret_name") - self.printParamSummary(" + SLS registration key", "mas_aibroker_sls_registration_key") - self.printParamSummary(" + SLS URL", "mas_aibroker_sls_url") - self.printParamSummary(" + Install DRO", "install_dro_aiservice") - if self.getParam("install_dro_aiservice") != "true": - self.printParamSummary(" + DRO secret name", "mas_aibroker_dro_secret_name") - self.printParamSummary(" + DRO API key", "mas_aibroker_dro_api_key") - self.printParamSummary(" + DRO URL", "mas_aibroker_dro_url") - self.printParamSummary(" + Install DB2", "install_db2_aiservice") - if self.getParam("install_db2_aiservice") != "true": - self.printParamSummary(" + DB2 username", "mas_aibroker_db2_username") - self.printParamSummary(" + DB2 JDBC URL", "mas_aibroker_db2_jdbc_url") - self.printParamSummary(" + DB2 SSL enabled", "mas_aibroker_db2_ssl_enabled") - self.printParamSummary(" + Environment type", "environment_type") + self.printH2("AI Service") + self.printParamSummary("Release", "aiservice_channel") + self.printParamSummary("Instance ID", "aiservice_instance_id") + self.printParamSummary("Environment type", "environment_type") - else: - self.printSummary("AI Broker", "Do Not Install") + self.printH2("S3 Configuration") + self.printParamSummary("Storage provider", "aiservice_storage_provider") + if self.getParam("aiservice_storage_provider") == "minio": + self.printParamSummary("minio root username", "minio_root_user") + print() + self.printParamSummary("Storage access key", "aiservice_storage_accesskey") + self.printParamSummary("Storage host", "aiservice_storage_host") + self.printParamSummary("Storage port", "aiservice_storage_port") + self.printParamSummary("Storage ssl", "aiservice_storage_ssl") + self.printParamSummary("Storage region", "aiservice_storage_region") + self.printParamSummary("Storage pipelines bucket", "aiservice_storage_pipelines_bucket") + self.printParamSummary("Storage tenants bucket", "aiservice_storage_tenants_bucket") + self.printParamSummary("Storage templates bucket", "aiservice_storage_templates_bucket") + print() + self.printParamSummary("S3 bucket prefix", "aiservice_s3_bucket_prefix") + self.printParamSummary("S3 endpoint url", "aiservice_s3_endpoint_url") + self.printParamSummary("S3 bucket prefix (tenant level)", "aiservice_tenant_s3_bucket_prefix") + self.printParamSummary("S3 region (tenant level)", "aiservice_tenant_s3_region") + self.printParamSummary("S3 endpoint url (tenant level)", "aiservice_tenant_s3_endpoint_url") + + self.printH2("IBM WatsonX") + self.printParamSummary("Watsonxai machine learning url", "aiservice_watsonxai_url") + self.printParamSummary("Watsonxai project id", "aiservice_watsonxai_project_id") + + self.printH2("AI Service Tenant") + self.printParamSummary("Tenant entitlement type", "tenant_entitlement_type") + self.printParamSummary("Tenant start date", "tenant_entitlement_start_date") + self.printParamSummary("Tenant end date", "tenant_entitlement_end_date") + + self.printH2("RSL") + self.printParamSummary("RSL url", "rsl_url") + self.printParamSummary("ORG Id of RSL", "rsl_org_id") + self.printParamSummary("Token for RSL", "rsl_token") def db2Summary(self) -> None: - if self.getParam("db2_action_system") == "install" or self.getParam("db2_action_manage") == "install": - self.printH2("IBM Db2 Univeral Operator Configuration") - self.printSummary("System Instance", "Install" if self.getParam("db2_action_system") == "install" else "Do Not Install") - self.printSummary("Dedicated Manage Instance", "Install" if self.getParam("db2_action_manage") == "install" else "Do Not Install") - self.printParamSummary(" - Type", "db2_type") - self.printParamSummary(" - Timezone", "db2_timezone") - print() - self.printParamSummary("Install Namespace", "db2_namespace") - self.printParamSummary("Subscription Channel", "db2_channel") - print() - self.printParamSummary("CPU Request", "db2_cpu_requests") - self.printParamSummary("CPU Limit", "db2_cpu_limits") - self.printParamSummary("Memory Request", "db2_memory_requests") - self.printParamSummary("Memory Limit ", "db2_memory_limits") - print() - self.printParamSummary("Meta Storage", "db2_meta_storage_size") - self.printParamSummary("Data Storage", "db2_data_storage_size") - self.printParamSummary("Backup Storage", "db2_backup_storage_size") - self.printParamSummary("Temp Storage", "db2_temp_storage_size") - self.printParamSummary("Transaction Logs Storage", "db2_logs_storage_size") - print() - if self.getParam('db2_affinity_key') != "": - self.printSummary("Node Affinity", f"{self.getParam('db2_affinity_key')}={self.getParam('db2_affinity_value')}") - else: - self.printSummary("Node Affinity", "None") - - if self.getParam('db2_tolerate_key') != "": - self.printSummary("Node Tolerations", f"{self.getParam('db2_tolerate_key')}={self.getParam('db2_tolerate_value')} @ {self.getParam('db2_tolerate_effect')}") - else: - self.printSummary("Node Tolerations", "None") + self.printH2("IBM Db2 Univeral Operator Configuration") + self.printParamSummary("Action", "db2_action_aiservice") + self.printParamSummary("Install Namespace", "db2_namespace") + self.printParamSummary("Subscription Channel", "db2_channel") def droSummary(self) -> None: self.printH2("IBM Data Reporter Operator (DRO) Configuration") @@ -179,14 +123,12 @@ def displayInstallSummary(self) -> None: logger.debug("PipelineRun parameters:") logger.debug(yaml.dump(self.params, default_flow_style=False)) - # Cluster Config & Dependencies + # Cluster Config & AI Service self.ocpSummary() + self.aiServiceSummary() + + # Dependencies self.droSummary() self.slsSummary() - self.masSummary() - self.printH2("IBM Maximo Application Suite Application - Aiservice") - self.aibrokerSummary() - - # Application Dependencies self.mongoSummary() self.db2Summary() diff --git a/python/src/mas/cli/install/app.py b/python/src/mas/cli/install/app.py index 9be126a18f0..a811d37df76 100644 --- a/python/src/mas/cli/install/app.py +++ b/python/src/mas/cli/install/app.py @@ -1270,7 +1270,7 @@ def install(self, argv): ) prepareInstallSecrets( dynClient=self.dynamicClient, - instanceId=self.getParam("mas_instance_id"), + namespace=pipelinesNamespace, slsLicenseFile=self.slsLicenseFileSecret, additionalConfigs=self.additionalConfigsSecret, podTemplates=self.podTemplatesSecret, diff --git a/python/src/mas/cli/install/params.py b/python/src/mas/cli/install/params.py index 525d139cce9..a3d45eeba40 100644 --- a/python/src/mas/cli/install/params.py +++ b/python/src/mas/cli/install/params.py @@ -153,29 +153,6 @@ "mas_arcgis_channel", # Guided Tour "mas_enable_walkme", - # Aibroker - "mas_aibroker_storage_provider", - "mas_aibroker_storage_accesskey", - "mas_aibroker_storage_secretkey", - "mas_aibroker_storage_host", - "mas_aibroker_storage_port", - "mas_aibroker_storage_ssl", - "mas_aibroker_storage_region", - "mas_aibroker_storage_pipelines_bucket", - "mas_aibroker_storage_tenants_bucket", - "mas_aibroker_storage_templates_bucket", - "mas_aibroker_tenant_name", - "mas_aibroker_watsonxai_apikey", - "mas_aibroker_watsonxai_url", - "mas_aibroker_watsonxai_project_id", - "mas_aibroker_watsonx_action", - "mas_aibroker_db_host", - "mas_aibroker_db_port", - "mas_aibroker_db_user", - "mas_aibroker_db_database", - "mas_aibroker_db_secret_name", - "mas_aibroker_db_secret_key", - "mas_aibroker_db_secret_value", # Facilities "mas_ws_facilities_size", "mas_ws_facilities_routes_timeout", diff --git a/tekton/generate-tekton-pipelines.yml b/tekton/generate-tekton-pipelines.yml index 7b2d54eac8c..a2bc40a4aab 100644 --- a/tekton/generate-tekton-pipelines.yml +++ b/tekton/generate-tekton-pipelines.yml @@ -29,11 +29,12 @@ with_items: # Main Pipelines - install - - install-aiservice - update - upgrade - rollback - uninstall + # AI Service Pipelines + - aiservice-install # FVT Pipelines - fvt-assist - fvt-core diff --git a/tekton/generate-tekton-tasks.yml b/tekton/generate-tekton-tasks.yml index 9a334991438..3777d4f5112 100644 --- a/tekton/generate-tekton-tasks.yml +++ b/tekton/generate-tekton-tasks.yml @@ -51,13 +51,12 @@ dest: "{{ task_target_dir }}/{{ item }}.yaml" with_items: - minio - - mariadb - aiservice - kmodels - odh - aiservice-tenant - aiservice-post-verify - + # 4. Generate Tasks (FVT) # ------------------------------------------------------------------------- - name: Generate Tasks (FVT) diff --git a/tekton/src/params/common.yml.j2 b/tekton/src/params/common.yml.j2 index 829e5071d3c..fe3e70199a6 100644 --- a/tekton/src/params/common.yml.j2 +++ b/tekton/src/params/common.yml.j2 @@ -6,7 +6,7 @@ default: IfNotPresent description: Pull policy for pipeline container images -# Development Build Support +# Development Build Support - name: artifactory_username default: "" type: string @@ -22,10 +22,13 @@ default: "" description: Optional custom labels, comma separated list of key=value pairs +{% if application is not defined %} + # MAS Configuration - name: mas_channel type: string default: "" - name: mas_instance_id type: string - default: "" \ No newline at end of file + default: "" +{% endif %} diff --git a/tekton/src/params/install-aiservice.yml.j2 b/tekton/src/params/install-aiservice.yml.j2 index b8fd7d42c3c..4561f3fd031 100644 --- a/tekton/src/params/install-aiservice.yml.j2 +++ b/tekton/src/params/install-aiservice.yml.j2 @@ -1,275 +1,299 @@ -# MAS Application Configuration - IBM Maximo AI Broker +# Cluster config # ----------------------------------------------------------------------------- -# - name: mas_aibroker_channel -- name: aibroker_instance_id +- name: ocp_ingress_tls_secret_name type: string - description: Aibroker instance id default: "" -- name: mas_app_channel_aibroker + +# IBM Cloud +# ----------------------------------------------------------------------------- +- name: ibmcloud_apikey type: string - description: Default channel for IBM Maximo AI Broker default: "" -- name: mas_aibroker_storage_accesskey +- name: ibmcloud_resourcegroup type: string - description: S3/Minio storage access ket for IBM Maximo AI Broker default: "" -- name: mas_aibroker_storage_secretkey + +# MAS (shouldn't really need these in AI service install pipeline) +# ----------------------------------------------------------------------------- +- name: mas_icr_cp type: string - description: S3/Minio storage secret key for IBM Maximo AI Broker default: "" -- name: mas_aibroker_storage_host +- name: mas_icr_cpopen type: string - description: S3/Minio storage host for IBM Maximo AI Broker default: "" -- name: mas_aibroker_storage_region +- name: mas_workspace_id type: string - description: S3/Minio storage region for IBM Maximo AI Broker + description: Workspace ID used to configure all applications default: "" -- name: mas_aibroker_storage_port + +# Certificate Manager +# ----------------------------------------------------------------------------- +- name: cert_manager_provider type: string - description: S3/Minio storage port for IBM Maximo AI Broker default: "" -- name: mas_aibroker_storage_ssl +- name: cert_manager_action type: string - description: S3/Minio storage ssl for IBM Maximo AI Broker default: "" -- name: mas_aibroker_storage_provider + +# Dependencies - DB2 +# ----------------------------------------------------------------------------- +{{ lookup('template', params_src_dir ~ '/install-db2.yml.j2') }} +- name: db2_action_aiservice type: string - description: S3/Minio storage provider IBM Maximo AI Broker - default: "" -- name: mas_aibroker_storage_pipelines_bucket + description: Set to 'install' to set up a Db2 instance for AI Service + default: "none" + +# Dependencies - UDS +# ----------------------------------------------------------------------------- +- name: uds_contact_email type: string - description: S3/Minio storage pipeline bucket for IBM Maximo AI Broker default: "" -- name: mas_aibroker_storage_tenants_bucket +- name: uds_contact_firstname type: string - description: S3/Minio storage tenants bucket for IBM Maximo AI Broker default: "" -- name: mas_aibroker_storage_templates_bucket +- name: uds_contact_lastname type: string - description: S3/Minio storage template bucket for IBM Maximo AI Broker default: "" -- name: mas_aibroker_tenant_name +- name: uds_event_scheduler_frequency type: string - description: Tenant name for IBM Maximo AI Broker default: "" -- name: mas_aibroker_watsonxai_apikey +- name: uds_action type: string - description: WatsonX api key for IBM Maximo AI Broker default: "" -- name: mas_aibroker_watsonxai_url +- name: dro_namespace type: string - description: WatsonX url for IBM Maximo AI Broker default: "" -- name: mas_aibroker_watsonxai_project_id +- name: mas_segment_key type: string - description: WatsonX project ID for IBM Maximo AI Broker default: "" -- name: mas_aibroker_watsonx_action + +# Dependencies - SLS +# ----------------------------------------------------------------------------- +- name: sls_namespace type: string - description: watsonx action for IBM Maximo AI Broker default: "" -- name: mas_aibroker_apikey_action +- name: sls_entitlement_file type: string - description: AI Broker api key action for IBM Maximo AI Broker default: "" -- name: mas_aibroker_s3_action +- name: sls_mongodb_cfg_file + type: string + # The default value works for the default in-cluster install, it will need + # to be modified if the mongodb namespace is changed, or if using BYO MongoDb + default: "/workspace/configs/mongo-mongoce.yml" +- name: sls_catalog_source type: string - description: s3 action for IBM Maximo AI Broker default: "" -- name: mas_aibroker_connector_tag +- name: sls_channel type: string - description: connector image tag for IBM Maximo AI Broker default: "" -- name: mas_aibroker_controller_tag +- name: sls_icr_cpopen type: string - description: controller image tag for IBM Maximo AI Broker default: "" -- name: mas_aibroker_pipeline_steps_tag +- name: sls_action type: string - description: pipeline steps image tag for IBM Maximo AI Broker default: "" -- name: mas_aibroker_store_tag + +# Dependencies - MongoDb +# ----------------------------------------------------------------------------- +- name: mongodb_namespace type: string - description: store image tag for IBM Maximo AI Broker default: "" -- name: mas_aibroker_watcher_tag +- name: mongodb_storage_class type: string - description: watcher image tag for IBM Maximo AI Broker default: "" -- name: mas_aibroker_db_host +- name: mongodb_replicas type: string - description: database host for IBM Maximo AI Broker + description: Optional configuration for mongodb replicas default: "" -- name: mas_aibroker_db_port +- name: mongodb_cpu_requests type: string - description: database port for IBM Maximo AI Broker + description: Optional configuration for mongodb cpu requests default: "" -- name: mas_aibroker_db_user +- name: mongodb_provider type: string - description: database user for IBM Maximo AI Broker + description: MongoDb provider default: "" -- name: mas_aibroker_db_database +- name: mongodb_version type: string - description: database name for IBM Maximo AI Broker + description: MongoDb version default: "" -- name: mas_aibroker_db_secret_name +- name: mongodb_action type: string - description: database secret name for IBM Maximo AI Broker + description: MongoDb action default: "" -- name: mas_aibroker_db_secret_key + +# Dependencies - IBM Cloud MongoDb +# ------------------------------------------------------------------------- +- name: ibm_mongo_name type: string - description: database secret key for IBM Maximo AI Broker + description: IBM Cloud MongoDb instance name default: "" -- name: mas_aibroker_db_secret_value +- name: ibm_mongo_resourcegroup type: string - description: database secret value for IBM Maximo AI Broker + description: IBM Cloud MongoDb resource group default: "" -- name: minio_root_user +- name: ibm_mongo_region type: string - description: root user for minio + description: IBM Cloud MongoDb instance region default: "" -- name: minio_root_password +- name: ibm_mongo_admin_password type: string - description: password for minio root user + description: IBM Cloud MongoDb admin password default: "" -- name: mariadb_user + +# MAS Application Configuration - IBM Maximo AI Service +# ----------------------------------------------------------------------------- +- name: aiservice_instance_id type: string - description: user for mariadb + description: Aibroker instance id default: "" -- name: mariadb_password +- name: aiservice_channel type: string - description: password for mariadb user + description: Default channel for IBM Maximo AI Service default: "" -- name: tenant_entitlement_type +- name: environment_type type: string - description: type of tenant + description: Environment type default: "" -- name: tenant_entitlement_start_date + +# MAS Application Configuration - IBM Maximo AI Service - S3 +# ----------------------------------------------------------------------------- +- name: aiservice_storage_accesskey type: string - description: define start date for tenant + description: S3/Minio storage access ket for IBM Maximo AI Service default: "" -- name: tenant_entitlement_end_date +- name: aiservice_storage_secretkey type: string - description: define end date for tenant + description: S3/Minio storage secret key for IBM Maximo AI Service default: "" -- name: install_db2_aiservice +- name: aiservice_storage_host type: string - description: flag for install db2 - default: "true" -- name: db2_action_aibroker + description: S3/Minio storage host for IBM Maximo AI Service + default: "" +- name: aiservice_storage_region type: string - description: install dedicated db2 for aibroker - default: "install" -- name: mas_aibroker_s3_bucket_prefix + description: S3/Minio storage region for IBM Maximo AI Service + default: "" +- name: aiservice_storage_port type: string - description: s3 bucker prefix + description: S3/Minio storage port for IBM Maximo AI Service default: "" -- name: mas_aibroker_s3_region +- name: aiservice_storage_ssl type: string - description: s3 region + description: S3/Minio storage ssl for IBM Maximo AI Service default: "" -- name: mas_aibroker_s3_endpoint_url +- name: aiservice_storage_provider type: string - description: endpoint url for s3 + description: S3/Minio storage provider IBM Maximo AI Service default: "" -- name: mas_aibroker_tenant_s3_bucket_prefix +- name: aiservice_storage_pipelines_bucket type: string - description: s3 bucker prefix ( tenant level ) + description: S3/Minio storage pipeline bucket for IBM Maximo AI Service default: "" -- name: mas_aibroker_tenant_s3_region +- name: aiservice_storage_tenants_bucket type: string - description: s3 region ( tenant level ) + description: S3/Minio storage tenants bucket for IBM Maximo AI Service default: "" -- name: mas_aibroker_tenant_s3_endpoint_url +- name: aiservice_storage_templates_bucket type: string - description: endpoint url for s3 ( tenant level ) + description: S3/Minio storage template bucket for IBM Maximo AI Service default: "" -- name: mas_aibroker_tenant_s3_access_key + +- name: aiservice_s3_action type: string - description: access key for s3 ( tenant level ) + description: s3 action for IBM Maximo AI Service default: "" -- name: mas_aibroker_tenant_s3_secret_key +- name: minio_root_user type: string - description: secret key for s3 ( tenant level ) + description: root user for minio default: "" -- name: rsl_url +- name: minio_root_password type: string - description: url of RSL + description: password for minio root user default: "" -- name: rsl_org_id + +- name: aiservice_s3_bucket_prefix type: string - description: org id for RSL + description: s3 bucker prefix default: "" -- name: rsl_token +- name: aiservice_s3_region type: string - description: token for RSL + description: s3 region default: "" -- name: install_minio_aiservice +- name: aiservice_s3_endpoint_url type: string - description: flag for install minio - default: "true" -- name: install_sls_aiservice + description: endpoint url for s3 + default: "" +- name: aiservice_tenant_s3_bucket_prefix type: string - description: flag for install sls - default: "true" -- name: install_dro_aiservice + description: s3 bucker prefix ( tenant level ) + default: "" +- name: aiservice_tenant_s3_region type: string - description: flag for install dro - default: "true" -- name: mas_aibroker_dro_secret_name + description: s3 region ( tenant level ) + default: "" +- name: aiservice_tenant_s3_endpoint_url type: string - description: DRO secret name + description: endpoint url for s3 ( tenant level ) default: "" -- name: mas_aibroker_dro_api_key +- name: aiservice_tenant_s3_access_key type: string - description: DRO API key + description: access key for s3 ( tenant level ) default: "" -- name: mas_aibroker_dro_url +- name: aiservice_tenant_s3_secret_key type: string - description: DRO URL + description: secret key for s3 ( tenant level ) default: "" -- name: mas_aibroker_dro_ca_cert + +# MAS Application Configuration - IBM Maximo AI Service - Tenant +# ----------------------------------------------------------------------------- +- name: tenant_entitlement_type type: string - description: DRO CA certificate + description: type of tenant default: "" -- name: mas_aibroker_db2_username +- name: tenant_entitlement_start_date type: string - description: DB2 username + description: define start date for tenant default: "" -- name: mas_aibroker_db2_password +- name: tenant_entitlement_end_date type: string - description: DB2 password + description: define end date for tenant default: "" -- name: mas_aibroker_db2_jdbc_url + +# MAS Application Configuration - IBM Maximo AI Service - Watstonx +# ----------------------------------------------------------------------------- +- name: aiservice_watsonxai_apikey type: string - description: DB2 JDBC URL + description: WatsonX api key for IBM Maximo AI Service default: "" -- name: mas_aibroker_db2_ssl_enabled +- name: aiservice_watsonxai_url type: string - description: DB2 SSL enabled - default: "false" -- name: mas_aibroker_db2_ca_cert + description: WatsonX url for IBM Maximo AI Service + default: "" +- name: aiservice_watsonxai_project_id type: string - description: DB2 CA certificate + description: WatsonX project ID for IBM Maximo AI Service default: "" -- name: mas_aibroker_sls_secret_name +- name: aiservice_watsonx_action type: string - description: SLS secret name + description: watsonx action for IBM Maximo AI Service default: "" -- name: mas_aibroker_sls_registration_key +- name: aiservice_apikey_action type: string - description: SLS registration key + description: AI Broker api key action for IBM Maximo AI Service default: "" -- name: mas_aibroker_sls_url + +# MAS Application Configuration - IBM Maximo AI Service - RSL +# ----------------------------------------------------------------------------- +- name: rsl_url type: string - description: SLS URL + description: url of RSL default: "" -- name: mas_aibroker_sls_ca_cert +- name: rsl_org_id type: string - description: SLS CA certificate + description: org id for RSL default: "" -- name: environment_type +- name: rsl_token type: string - description: Environment type + description: token for RSL default: "" diff --git a/tekton/src/params/install-appchannels.yml.j2 b/tekton/src/params/install-appchannels.yml.j2 index 5553d3bce56..470d404bc4f 100644 --- a/tekton/src/params/install-appchannels.yml.j2 +++ b/tekton/src/params/install-appchannels.yml.j2 @@ -32,7 +32,3 @@ type: string description: Subscription channel for Facilities application operator default: "" -# - name: mas_app_channel_aibroker -# type: string -# description: Subscription channel for AI Broker application operator -# default: "" diff --git a/tekton/src/params/install.yml.j2 b/tekton/src/params/install.yml.j2 index ced579f8b91..f4d50f4e315 100644 --- a/tekton/src/params/install.yml.j2 +++ b/tekton/src/params/install.yml.j2 @@ -1,4 +1,5 @@ # Cluster config +# ----------------------------------------------------------------------------- - name: ocp_ingress_tls_secret_name type: string default: "" @@ -668,6 +669,7 @@ default: "" # default is handled by ansible-devops # MAS Application Configuration - Health Application +# ----------------------------------------------------------------------------- - name: mas_appws_bindings_health_wsl_flag type: string description: Boolean value indicating if Watson Studio must installed and bound to Manage/Health. @@ -687,11 +689,8 @@ description: controls the workload size of predict containers default: "small" -# Dependencies - IBM Maximo AI Service -# ----------------------------------------------------------------------------- -{{ lookup('template', params_src_dir ~ '/install-aiservice.yml.j2') }} - # MAS Application Configuration - Facilities +# ----------------------------------------------------------------------------- # TODO: Fix type for storage sizes and max conn pool size - name: mas_ws_facilities_size type: string diff --git a/tekton/src/pipelines/install-aiservice.yml.j2 b/tekton/src/pipelines/aiservice-install.yml.j2 similarity index 67% rename from tekton/src/pipelines/install-aiservice.yml.j2 rename to tekton/src/pipelines/aiservice-install.yml.j2 index 13e13f19d1d..66133337100 100644 --- a/tekton/src/pipelines/install-aiservice.yml.j2 +++ b/tekton/src/pipelines/aiservice-install.yml.j2 @@ -19,19 +19,20 @@ spec: params: # 1. Common Parameters # ------------------------------------------------------------------------- - {{ lookup('template', params_src_dir ~ '/common.yml.j2') | indent(4) }} + {{ lookup('template', params_src_dir ~ '/common.yml.j2', template_vars={'application': 'aiservice'}) | indent(4) }} # 2. Installation # ------------------------------------------------------------------------- + {{ lookup('template', params_src_dir ~ '/install-ibmcatalogs.yml.j2') | indent(4) }} {{ lookup('template', params_src_dir ~ '/install-common.yml.j2') | indent(4) }} - {{ lookup('template', params_src_dir ~ '/install.yml.j2') | indent(4) }} + {{ lookup('template', params_src_dir ~ '/install-aiservice.yml.j2') | indent(4) }} tasks: # Content # ------- - # 1. Setup Cluster-wide Dependencies inc. Grafana, ECK, and Turbonomic + # 1. Setup Operator Catalog and Certificate Manager # 2. Install Universal Dependencies - # 3. Install & Configure Aibroker + # 3. Install & Configure AI Service {{ lookup('template', pipeline_src_dir ~ '/taskdefs/cluster-setup/ocp-verify.yml.j2', template_vars={'name': 'pre-install-check', 'devops_suite_name': 'pre-install-check'}) | indent(4) }} @@ -47,41 +48,26 @@ spec: runAfter: - ibm-catalogs - # 1.3 Configure Turbonomic - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/cluster-setup/turbonomic.yml.j2') | indent(4) }} - runAfter: - - pre-install-check # 2. Install Universal Dependencies # ------------------------------------------------------------------------- # 2.1 MongoDb - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/mongo.yml.j2', template_vars={'application': 'aibroker'}) | indent(4) }} + {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/mongo.yml.j2', template_vars={'application': 'aiservice'}) | indent(4) }} runAfter: - cert-manager - when: - - input: "$(params.install_sls_aiservice)" - operator: notin - values: ["false", "False"] # 2.2 IBM SLS - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/sls.yml.j2', template_vars={'application': 'aibroker'}) | indent(4) }} + {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/sls.yml.j2', template_vars={'application': 'aiservice'}) | indent(4) }} runAfter: - mongodb - when: - - input: "$(params.install_sls_aiservice)" - operator: notin - values: ["false", "False"] # 2.3 DRO - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/uds.yml.j2', template_vars={'application': 'aibroker'}) | indent(4) }} + {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/uds.yml.j2', template_vars={'application': 'aiservice'}) | indent(4) }} runAfter: - ibm-catalogs - when: - - input: "$(params.install_dro_aiservice)" - operator: notin - values: ["false", "False"] - # 3 Install and configure AI Broker + + # 3 Install and Configure AI Broker # ------------------------------------------------------------------------- # 3.1 Install minio storage class {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/minio.yml.j2') | indent(4) }} @@ -89,43 +75,36 @@ spec: - uds - sls - # 3.2 Install mariabd - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/mariadb.yml.j2') | indent(4) }} - runAfter: - - sls - - uds - - # 3.3 Install db2 - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/db2.yml.j2', template_vars={'suffix': 'aibroker'}) | indent(4) }} + # 3.2 Install db2 + {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/db2.yml.j2', template_vars={'suffix': 'aiservice'}) | indent(4) }} runAfter: - - mariadb + - ibm-catalogs - # 3.4 Install Opendatahub - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/odh.yml.j2', template_vars={'application': 'aibroker'}) | indent(4) }} + # 3.3 Install Opendatahub + {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/odh.yml.j2', template_vars={'application': 'aiservice'}) | indent(4) }} runAfter: - minio - - mariadb - # 3.5 Install Kmodels - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/kmodels.yml.j2', template_vars={'application': 'aibroker'}) | indent(4) }} + # 3.4 Install Kmodels + {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/kmodels.yml.j2', template_vars={'application': 'aiservice'}) | indent(4) }} runAfter: - - odh + - aiservice-odh - # 3.6 Install and Configure Aibroker - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/aiservice.yml.j2', template_vars={'application': 'aibroker'}) | indent(4) }} + # 3.5 Install and Configure AI Service + {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/aiservice.yml.j2', template_vars={'application': 'aiservice'}) | indent(4) }} runAfter: - - kmodels - - db2-aibroker + - aiservice-kmodels + - db2-aiservice - # 3.7 Aibroker tenant creation + # 3.6 AI Service tenant creation {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/aiservice-tenant.yml.j2') | indent(4) }} runAfter: - - aibroker + - aiservice - # 3.7 Aibroker Post Verification + # 3.7 AI Service Post Verification {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/aiservice-post-verify.yml.j2') | indent(4) }} runAfter: - - aibroker-tenant + - aiservice-tenant finally: # Update synchronization configmap diff --git a/tekton/src/pipelines/fvt-aiservice.yml.j2 b/tekton/src/pipelines/fvt-aiservice.yml.j2 index fa646da4dbc..c6853def722 100644 --- a/tekton/src/pipelines/fvt-aiservice.yml.j2 +++ b/tekton/src/pipelines/fvt-aiservice.yml.j2 @@ -16,7 +16,7 @@ spec: description: Pull policy for pipeline container images # MAS Configuration - - name: mas_app_channel_aibroker + - name: aiservice_channel type: string default: "" - name: mas_instance_id @@ -56,7 +56,7 @@ spec: - name: product_id value: ibm-mas-aibroker - name: product_channel - value: $(params.mas_app_channel_aibroker) + value: $(params.aiservice_channel) - name: fvt_test_suite value: imagescan when: @@ -71,7 +71,7 @@ spec: params: {{ lookup('template', 'taskdefs/fvt-aiservice/common/params.yml.j2') | indent(8) }} - name: fvt_test_suite - value: tenant_entitlement + value: tenant_entitlement # 3. Aibroker mcc test suite # ----------------------------------------------------------------------------- @@ -80,10 +80,10 @@ spec: params: {{ lookup('template', 'taskdefs/fvt-aiservice/common/params.yml.j2') | indent(8) }} - name: fvt_test_suite - value: mcc + value: mcc runAfter: - fvt-aiservice-tenant-entitlement - + # 5. Aibroker fmea test suite # ----------------------------------------------------------------------------- - name: fvt-aiservice-fmea @@ -91,7 +91,7 @@ spec: params: {{ lookup('template', 'taskdefs/fvt-aiservice/common/params.yml.j2') | indent(8) }} - name: fvt_test_suite - value: fmea + value: fmea runAfter: - fvt-aiservice-tenant-entitlement @@ -102,11 +102,11 @@ spec: params: {{ lookup('template', 'taskdefs/fvt-aiservice/common/params.yml.j2') | indent(8) }} - name: fvt_test_suite - value: pcc + value: pcc runAfter: - fvt-aiservice-mcc - fvt-aiservice-fmea - + # 6. Aibroker similarity test suite # ----------------------------------------------------------------------------- - name: fvt-aiservice-similarity @@ -114,7 +114,7 @@ spec: params: {{ lookup('template', 'taskdefs/fvt-aiservice/common/params.yml.j2') | indent(8) }} - name: fvt_test_suite - value: similarity + value: similarity runAfter: - fvt-aiservice-mcc - fvt-aiservice-fmea @@ -126,7 +126,7 @@ spec: params: {{ lookup('template', 'taskdefs/fvt-aiservice/common/params.yml.j2') | indent(8) }} - name: fvt_test_suite - value: nl2oslc + value: nl2oslc runAfter: - fvt-aiservice-pcc - fvt-aiservice-similarity diff --git a/tekton/src/pipelines/install.yml.j2 b/tekton/src/pipelines/install.yml.j2 index 8405067b630..cf3001aa56d 100644 --- a/tekton/src/pipelines/install.yml.j2 +++ b/tekton/src/pipelines/install.yml.j2 @@ -41,8 +41,7 @@ spec: # 10. Install & Configure Optimizer # 12. Install & Configure Assist # 13. Install & Configure Visual Inspection - # 14. Install & Configure AI Broker - # 15. Install & Configure Facilities + # 14. Install & Configure Facilities {{ lookup('template', pipeline_src_dir ~ '/taskdefs/cluster-setup/ocp-verify.yml.j2', template_vars={'name': 'pre-install-check', 'devops_suite_name': 'pre-install-check'}) | indent(4) }} @@ -338,65 +337,45 @@ spec: - app-install-visualinspection - # 13. Verify health of the cluster before we consider the install complete + # 13. Install and configure Facilities # ------------------------------------------------------------------------- - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/cluster-setup/ocp-verify.yml.j2', template_vars={'name': 'post-install-verify', 'devops_suite_name': 'post-install-verify'}) | indent(4) }} - runAfter: - - app-cfg-assist - - app-cfg-optimizer - - app-cfg-predict # infers Manage completed - - app-cfg-monitor # infers IoT completed - - app-cfg-visualinspection - - arcgis - - eck - - turbonomic - - cognos - - # 14 Install and configure AI Broker - # ------------------------------------------------------------------------- - # 14.1 Install Opendatahub - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/odh.yml.j2') | indent(4) }} - runAfter: - - suite-verify - - # 14.2 Install Kmodels - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/kmodels.yml.j2') | indent(4) }} - runAfter: - - odh - - # 14.3 Install Aibroker app - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/aiservice-app.yml.j2') | indent(4) }} - runAfter: - - kmodels - - # 14.4 Configure Aibroker - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/aiservice/aiservice.yml.j2') | indent(4) }} - runAfter: - - app-install-aibroker - - # 15 Install and configure Facilities - # ------------------------------------------------------------------------- - # 15.1 Dedicated Facilities Db2 + # 13.1 Dedicated Facilities Db2 {{ lookup('template', pipeline_src_dir ~ '/taskdefs/apps/db2-setup-facilities.yml.j2') | indent(4)}} runAfter: - db2-manage - # 15.2 Install Facilities + # 13.2 Install Facilities {{ lookup('template', pipeline_src_dir ~ '/taskdefs/apps/facilities-app.yml.j2') | indent(4) }} runAfter: - suite-config-db2 - # 15.3 Configure Facilities workspace + # 13.3 Configure Facilities workspace {{ lookup('template', pipeline_src_dir ~ '/taskdefs/apps/facilities-workspace.yml.j2') | indent(4) }} runAfter: - app-install-facilities - - # 15.4 Verify Facilities Installation + + # 13.4 Verify Facilities Installation {{ lookup('template', pipeline_src_dir ~ '/taskdefs/apps/facilities-verify.yml.j2') | indent(4) }} runAfter: - app-cfg-facilities + + # 14. Verify health of the cluster before we consider the install complete + # ------------------------------------------------------------------------- + {{ lookup('template', pipeline_src_dir ~ '/taskdefs/cluster-setup/ocp-verify.yml.j2', template_vars={'name': 'post-install-verify', 'devops_suite_name': 'post-install-verify'}) | indent(4) }} + runAfter: + - app-cfg-assist + - app-cfg-optimizer + - app-cfg-predict # infers Manage completed + - app-cfg-monitor # infers IoT completed + - app-cfg-visualinspection + - app-verify-facilities + - arcgis + - eck + - turbonomic + - cognos + finally: # Update synchronization configmap # ------------------------------------------------------------------------- diff --git a/tekton/src/pipelines/taskdefs/aiservice/aiservice-app.yml.j2 b/tekton/src/pipelines/taskdefs/aiservice/aiservice-app.yml.j2 deleted file mode 100644 index 4facc5cd148..00000000000 --- a/tekton/src/pipelines/taskdefs/aiservice/aiservice-app.yml.j2 +++ /dev/null @@ -1,29 +0,0 @@ -- name: app-install-aibroker - timeout: "0" - params: - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/common/cli-params.yml.j2') | indent(4) }} - - name: devops_suite_name - value: app-aibroker-install - - - name: mas_instance_id - value: $(params.mas_instance_id) - - name: mas_app_id - value: aibroker - - name: artifactory_username - value: $(params.artifactory_username) - - name: artifactory_token - value: $(params.artifactory_token) - - name: mas_app_channel - value: "$(params.mas_app_channel_aibroker)" - - name: ibm_entitlement_key - value: $(params.ibm_entitlement_key) - - name: custom_labels - value: $(params.custom_labels) - taskRef: - name: mas-devops-suite-app-install - kind: Task - # Only install aibroker if a channel has been chosen - when: - - input: "$(params.mas_app_channel_aibroker)" - operator: notin - values: [""] \ No newline at end of file diff --git a/tekton/src/pipelines/taskdefs/aiservice/aiservice-post-verify.yml.j2 b/tekton/src/pipelines/taskdefs/aiservice/aiservice-post-verify.yml.j2 index a72f06307d3..9e484b832ad 100644 --- a/tekton/src/pipelines/taskdefs/aiservice/aiservice-post-verify.yml.j2 +++ b/tekton/src/pipelines/taskdefs/aiservice/aiservice-post-verify.yml.j2 @@ -1,25 +1,25 @@ -- name: aibroker-post-verify +- name: aiservice-post-verify timeout: "0" params: {{ lookup('template', pipeline_src_dir ~ '/taskdefs/common/cli-params.yml.j2') | indent(4) }} - name: devops_suite_name - value: app-aibroker-cfg + value: app-aiservice-cfg - name: mas_instance_id - value: $(params.aibroker_instance_id) + value: $(params.aiservice_instance_id) - name: mas_app_id value: aibroker - name: mas_workspace_id value: "$(params.mas_workspace_id)" taskRef: - name: aibroker-post-verify + name: aiservice-post-verify kind: Task # Only install aibroker if a channel has been chosen when: - - input: "$(params.mas_app_channel_aibroker)" + - input: "$(params.aiservice_channel)" operator: notin values: [""] workspaces: - name: configs - workspace: shared-configs \ No newline at end of file + workspace: shared-configs diff --git a/tekton/src/pipelines/taskdefs/aiservice/aiservice-tenant.yml.j2 b/tekton/src/pipelines/taskdefs/aiservice/aiservice-tenant.yml.j2 index 2f7af682d60..b185415739e 100644 --- a/tekton/src/pipelines/taskdefs/aiservice/aiservice-tenant.yml.j2 +++ b/tekton/src/pipelines/taskdefs/aiservice/aiservice-tenant.yml.j2 @@ -1,122 +1,101 @@ -- name: aibroker-tenant +- name: aiservice-tenant timeout: "0" params: {{ lookup('template', 'taskdefs/common/cli-params.yml.j2') | indent(4) }} - name: devops_suite_name - value: aibroker - - name: mas_instance_id - value: $(params.aibroker_instance_id) - - name: mas_app_id - value: aibroker + value: aiservice-tenant + - name: artifactory_username value: $(params.artifactory_username) - name: artifactory_token value: $(params.artifactory_token) - - name: mas_app_channel - value: "$(params.mas_app_channel_aibroker)" + + - name: aiservice_instance_id + value: $(params.aiservice_instance_id) + - name: aiservice_channel + value: "$(params.aiservice_channel)" + - name: ibm_entitlement_key value: $(params.ibm_entitlement_key) + - name: custom_labels value: $(params.custom_labels) - - name: mas_aibroker_storage_provider - value: $(params.mas_aibroker_storage_provider) - - name: mas_aibroker_storage_accesskey - value: $(params.mas_aibroker_storage_accesskey) - - name: mas_aibroker_storage_secretkey - value: $(params.mas_aibroker_storage_secretkey) - - name: mas_aibroker_storage_host - value: $(params.mas_aibroker_storage_host) - - name: mas_aibroker_storage_port - value: $(params.mas_aibroker_storage_port) - - name: mas_aibroker_storage_ssl - value: $(params.mas_aibroker_storage_ssl) - - name: mas_aibroker_storage_region - value: $(params.mas_aibroker_storage_region) - - name: mas_aibroker_storage_pipelines_bucket - value: $(params.mas_aibroker_storage_pipelines_bucket) - - name: mas_aibroker_storage_tenants_bucket - value: $(params.mas_aibroker_storage_tenants_bucket) - - name: mas_aibroker_storage_templates_bucket - value: $(params.mas_aibroker_storage_templates_bucket) - - name: mas_aibroker_watsonxai_apikey - value: $(params.mas_aibroker_watsonxai_apikey) - - name: mas_aibroker_watsonxai_url - value: $(params.mas_aibroker_watsonxai_url) - - name: mas_aibroker_watsonxai_project_id - value: $(params.mas_aibroker_watsonxai_project_id) - - name: mas_aibroker_watsonx_action - value: $(params.mas_aibroker_watsonx_action) - - name: mas_aibroker_s3_action - value: $(params.mas_aibroker_s3_action) - - name: mas_aibroker_apikey_action - value: $(params.mas_aibroker_apikey_action) - - name: mas_aibroker_tenant_name - value: $(params.mas_aibroker_tenant_name) + + - name: aiservice_storage_provider + value: $(params.aiservice_storage_provider) + - name: aiservice_storage_accesskey + value: $(params.aiservice_storage_accesskey) + - name: aiservice_storage_secretkey + value: $(params.aiservice_storage_secretkey) + - name: aiservice_storage_host + value: $(params.aiservice_storage_host) + - name: aiservice_storage_port + value: $(params.aiservice_storage_port) + - name: aiservice_storage_ssl + value: $(params.aiservice_storage_ssl) + - name: aiservice_storage_region + value: $(params.aiservice_storage_region) + - name: aiservice_storage_pipelines_bucket + value: $(params.aiservice_storage_pipelines_bucket) + - name: aiservice_storage_tenants_bucket + value: $(params.aiservice_storage_tenants_bucket) + - name: aiservice_storage_templates_bucket + value: $(params.aiservice_storage_templates_bucket) + + - name: aiservice_watsonxai_apikey + value: $(params.aiservice_watsonxai_apikey) + - name: aiservice_watsonxai_url + value: $(params.aiservice_watsonxai_url) + - name: aiservice_watsonxai_project_id + value: $(params.aiservice_watsonxai_project_id) + - name: aiservice_watsonx_action + value: $(params.aiservice_watsonx_action) + + - name: aiservice_s3_action + value: $(params.aiservice_s3_action) + - name: aiservice_apikey_action + value: $(params.aiservice_apikey_action) + - name: tenant_entitlement_type value: $(params.tenant_entitlement_type) - name: tenant_entitlement_start_date value: $(params.tenant_entitlement_start_date) - name: tenant_entitlement_end_date value: $(params.tenant_entitlement_end_date) + - name: mas_icr_cp value: $(params.mas_icr_cp) - name: mas_icr_cpopen - value: $(params.mas_icr_cpopen) - - name: mas_aibroker_tenant_s3_bucket_prefix - value: $(params.mas_aibroker_tenant_s3_bucket_prefix) - - name: mas_aibroker_tenant_s3_region - value: $(params.mas_aibroker_tenant_s3_region) - - name: mas_aibroker_tenant_s3_endpoint_url - value: $(params.mas_aibroker_tenant_s3_endpoint_url) - - name: mas_aibroker_tenant_s3_access_key - value: $(params.mas_aibroker_tenant_s3_access_key) - - name: mas_aibroker_tenant_s3_secret_key - value: $(params.mas_aibroker_tenant_s3_secret_key) + value: $(params.mas_icr_cpopen) + + - name: aiservice_tenant_s3_bucket_prefix + value: $(params.aiservice_tenant_s3_bucket_prefix) + - name: aiservice_tenant_s3_region + value: $(params.aiservice_tenant_s3_region) + - name: aiservice_tenant_s3_endpoint_url + value: $(params.aiservice_tenant_s3_endpoint_url) + - name: aiservice_tenant_s3_access_key + value: $(params.aiservice_tenant_s3_access_key) + - name: aiservice_tenant_s3_secret_key + value: $(params.aiservice_tenant_s3_secret_key) + - name: rsl_url - value: $(params.rsl_url) + value: $(params.rsl_url) - name: rsl_org_id - value: $(params.rsl_org_id) + value: $(params.rsl_org_id) - name: rsl_token - value: $(params.rsl_token) - - name: mas_aibroker_dro_secret_name - value: $(params.mas_aibroker_dro_secret_name) - - name: mas_aibroker_dro_api_key - value: $(params.mas_aibroker_dro_api_key) - - name: mas_aibroker_dro_url - value: $(params.mas_aibroker_dro_url) - - name: mas_aibroker_dro_ca_cert - value: $(params.mas_aibroker_dro_ca_cert) - - name: mas_aibroker_db2_username - value: $(params.mas_aibroker_db2_username) - - name: mas_aibroker_db2_password - value: $(params.mas_aibroker_db2_password) - - name: mas_aibroker_db2_jdbc_url - value: $(params.mas_aibroker_db2_jdbc_url) - - name: mas_aibroker_db2_ssl_enabled - value: $(params.mas_aibroker_db2_ssl_enabled) - - name: mas_aibroker_db2_ca_cert - value: $(params.mas_aibroker_db2_ca_cert) - - name: mas_aibroker_sls_secret_name - value: $(params.mas_aibroker_sls_secret_name) - - name: mas_aibroker_sls_registration_key - value: $(params.mas_aibroker_sls_registration_key) - - name: mas_aibroker_sls_url - value: $(params.mas_aibroker_sls_url) - - name: mas_aibroker_sls_ca_cert - value: $(params.mas_aibroker_sls_ca_cert) + value: $(params.rsl_token) + - name: environment_type value: $(params.environment_type) taskRef: - name: mas-devops-aibroker-tenant + name: mas-devops-aiservice-tenant kind: Task when: - - input: "$(params.mas_app_channel_aibroker)" + - input: "$(params.aiservice_channel)" operator: notin values: [""] - - input: "$(params.mas_app_channel_aibroker)" - operator: notin - values: ["9.0.x"] workspaces: - name: configs workspace: shared-configs \ No newline at end of file diff --git a/tekton/src/pipelines/taskdefs/aiservice/aiservice.yml.j2 b/tekton/src/pipelines/taskdefs/aiservice/aiservice.yml.j2 index 04de2fa076f..747cdad536d 100644 --- a/tekton/src/pipelines/taskdefs/aiservice/aiservice.yml.j2 +++ b/tekton/src/pipelines/taskdefs/aiservice/aiservice.yml.j2 @@ -1,117 +1,79 @@ -- name: aibroker +- name: aiservice timeout: "0" params: {{ lookup('template', 'taskdefs/common/cli-params.yml.j2') | indent(4) }} - name: devops_suite_name - value: aibroker + value: aiservice - - name: mas_instance_id -{% if application is defined and application == "aibroker" %} - value: $(params.aibroker_instance_id) -{% else %} - value: $(params.mas_instance_id) -{% endif %} - - - name: mas_app_id - value: aibroker - name: artifactory_username value: $(params.artifactory_username) - name: artifactory_token value: $(params.artifactory_token) - - name: mas_app_channel - value: "$(params.mas_app_channel_aibroker)" + - name: ibm_entitlement_key value: $(params.ibm_entitlement_key) + - name: custom_labels value: $(params.custom_labels) - - name: mas_aibroker_storage_provider - value: $(params.mas_aibroker_storage_provider) - - name: mas_aibroker_storage_accesskey - value: $(params.mas_aibroker_storage_accesskey) - - name: mas_aibroker_storage_secretkey - value: $(params.mas_aibroker_storage_secretkey) - - name: mas_aibroker_storage_host - value: $(params.mas_aibroker_storage_host) - - name: mas_aibroker_storage_port - value: $(params.mas_aibroker_storage_port) - - name: mas_aibroker_storage_ssl - value: $(params.mas_aibroker_storage_ssl) - - name: mas_aibroker_storage_region - value: $(params.mas_aibroker_storage_region) - - name: mas_aibroker_storage_pipelines_bucket - value: $(params.mas_aibroker_storage_pipelines_bucket) - - name: mas_aibroker_storage_tenants_bucket - value: $(params.mas_aibroker_storage_tenants_bucket) - - name: mas_aibroker_storage_templates_bucket - value: $(params.mas_aibroker_storage_templates_bucket) - - name: mas_aibroker_watsonxai_apikey - value: $(params.mas_aibroker_watsonxai_apikey) - - name: mas_aibroker_watsonxai_url - value: $(params.mas_aibroker_watsonxai_url) - - name: mas_aibroker_watsonxai_project_id - value: $(params.mas_aibroker_watsonxai_project_id) - - name: mas_aibroker_watsonx_action - value: $(params.mas_aibroker_watsonx_action) - - name: mas_aibroker_s3_action - value: $(params.mas_aibroker_s3_action) - - name: mas_aibroker_apikey_action - value: $(params.mas_aibroker_apikey_action) - - name: mas_aibroker_tenant_name - value: $(params.mas_aibroker_tenant_name) + + - name: aiservice_instance_id + value: $(params.aiservice_instance_id) + - name: aiservice_channel + value: "$(params.aiservice_channel)" + + - name: aiservice_storage_provider + value: $(params.aiservice_storage_provider) + - name: aiservice_storage_accesskey + value: $(params.aiservice_storage_accesskey) + - name: aiservice_storage_secretkey + value: $(params.aiservice_storage_secretkey) + - name: aiservice_storage_host + value: $(params.aiservice_storage_host) + - name: aiservice_storage_port + value: $(params.aiservice_storage_port) + - name: aiservice_storage_ssl + value: $(params.aiservice_storage_ssl) + - name: aiservice_storage_region + value: $(params.aiservice_storage_region) + - name: aiservice_storage_pipelines_bucket + value: $(params.aiservice_storage_pipelines_bucket) + - name: aiservice_storage_tenants_bucket + value: $(params.aiservice_storage_tenants_bucket) + - name: aiservice_storage_templates_bucket + value: $(params.aiservice_storage_templates_bucket) + + - name: aiservice_watsonxai_apikey + value: $(params.aiservice_watsonxai_apikey) + - name: aiservice_watsonxai_url + value: $(params.aiservice_watsonxai_url) + - name: aiservice_watsonxai_project_id + value: $(params.aiservice_watsonxai_project_id) + - name: aiservice_watsonx_action + value: $(params.aiservice_watsonx_action) + + - name: aiservice_s3_action + value: $(params.aiservice_s3_action) + - name: aiservice_s3_bucket_prefix + value: $(params.aiservice_s3_bucket_prefix) + - name: aiservice_s3_endpoint_url + value: $(params.aiservice_s3_endpoint_url) + + - name: aiservice_apikey_action + value: $(params.aiservice_apikey_action) + - name: mas_icr_cp value: $(params.mas_icr_cp) - name: mas_icr_cpopen value: $(params.mas_icr_cpopen) - - name: mas_aibroker_s3_bucket_prefix - value: $(params.mas_aibroker_s3_bucket_prefix) - - name: mas_aibroker_s3_endpoint_url - value: $(params.mas_aibroker_s3_endpoint_url) - - name: mas_aibroker_db_host - value: $(params.mas_aibroker_db_host) - - name: mas_aibroker_db_port - value: $(params.mas_aibroker_db_port) - - name: mas_aibroker_db_user - value: $(params.mas_aibroker_db_user) - - name: mas_aibroker_db_database - value: $(params.mas_aibroker_db_database) - - name: mas_aibroker_db_secret_name - value: $(params.mas_aibroker_db_secret_name) - - name: mas_aibroker_db_secret_value - value: $(params.mas_aibroker_db_secret_value) - - name: mas_aibroker_dro_secret_name - value: $(params.mas_aibroker_dro_secret_name) - - name: mas_aibroker_dro_api_key - value: $(params.mas_aibroker_dro_api_key) - - name: mas_aibroker_dro_url - value: $(params.mas_aibroker_dro_url) - - name: mas_aibroker_dro_ca_cert - value: $(params.mas_aibroker_dro_ca_cert) - - name: mas_aibroker_db2_username - value: $(params.mas_aibroker_db2_username) - - name: mas_aibroker_db2_password - value: $(params.mas_aibroker_db2_password) - - name: mas_aibroker_db2_jdbc_url - value: $(params.mas_aibroker_db2_jdbc_url) - - name: mas_aibroker_db2_ssl_enabled - value: $(params.mas_aibroker_db2_ssl_enabled) - - name: mas_aibroker_db2_ca_cert - value: $(params.mas_aibroker_db2_ca_cert) - - name: mas_aibroker_sls_secret_name - value: $(params.mas_aibroker_sls_secret_name) - - name: mas_aibroker_sls_registration_key - value: $(params.mas_aibroker_sls_registration_key) - - name: mas_aibroker_sls_url - value: $(params.mas_aibroker_sls_url) - - name: mas_aibroker_sls_ca_cert - value: $(params.mas_aibroker_sls_ca_cert) + - name: environment_type value: $(params.environment_type) taskRef: - name: mas-devops-aibroker + name: mas-devops-aiservice kind: Task when: - - input: "$(params.mas_app_channel_aibroker)" + - input: "$(params.aiservice_channel)" operator: notin values: [""] workspaces: diff --git a/tekton/src/pipelines/taskdefs/aiservice/kmodels.yml.j2 b/tekton/src/pipelines/taskdefs/aiservice/kmodels.yml.j2 index 977a8347a1c..227da008237 100644 --- a/tekton/src/pipelines/taskdefs/aiservice/kmodels.yml.j2 +++ b/tekton/src/pipelines/taskdefs/aiservice/kmodels.yml.j2 @@ -1,67 +1,52 @@ -- name: kmodels +- name: aiservice-kmodels params: {{ lookup('template', 'taskdefs/common/cli-params.yml.j2') | indent(4) }} - name: devops_suite_name - value: kmodels - - name: mas_instance_id -{% if application is defined and application == "aibroker" %} - value: $(params.aibroker_instance_id) -{% else %} - value: $(params.mas_instance_id) -{% endif %} - - name: mas_app_id - value: aibroker + value: aiservice-kmodels + - name: artifactory_username value: $(params.artifactory_username) - name: artifactory_token value: $(params.artifactory_token) - - name: mas_app_channel - value: "$(params.mas_app_channel_aibroker)" + - name: ibm_entitlement_key value: $(params.ibm_entitlement_key) - name: custom_labels value: $(params.custom_labels) - - name: mas_aibroker_storage_provider - value: $(params.mas_aibroker_storage_provider) - - name: mas_aibroker_storage_accesskey - value: $(params.mas_aibroker_storage_accesskey) - - name: mas_aibroker_storage_secretkey - value: $(params.mas_aibroker_storage_secretkey) - - name: mas_aibroker_storage_host - value: $(params.mas_aibroker_storage_host) - - name: mas_aibroker_storage_port - value: $(params.mas_aibroker_storage_port) - - name: mas_aibroker_storage_ssl - value: $(params.mas_aibroker_storage_ssl) - - name: mas_aibroker_storage_region - value: $(params.mas_aibroker_storage_region) - - name: mas_aibroker_storage_pipelines_bucket - value: $(params.mas_aibroker_storage_pipelines_bucket) - - name: mas_aibroker_storage_tenants_bucket - value: $(params.mas_aibroker_storage_tenants_bucket) - - name: mas_aibroker_storage_templates_bucket - value: $(params.mas_aibroker_storage_templates_bucket) - - name: mas_aibroker_controller_tag - value: $(params.mas_aibroker_controller_tag) - - name: mas_aibroker_store_tag - value: $(params.mas_aibroker_store_tag) - - name: mas_aibroker_watcher_tag - value: $(params.mas_aibroker_watcher_tag) - - name: mas_aibroker_connector_tag - value: $(params.mas_aibroker_connector_tag) - - name: mas_aibroker_pipeline_steps_tag - value: $(params.mas_aibroker_pipeline_steps_tag) - - name: mas_aibroker_tenant_name - value: $(params.mas_aibroker_tenant_name) + + - name: aiservice_instance_id + value: $(params.aiservice_instance_id) + + - name: aiservice_storage_provider + value: $(params.aiservice_storage_provider) + - name: aiservice_storage_accesskey + value: $(params.aiservice_storage_accesskey) + - name: aiservice_storage_secretkey + value: $(params.aiservice_storage_secretkey) + - name: aiservice_storage_host + value: $(params.aiservice_storage_host) + - name: aiservice_storage_port + value: $(params.aiservice_storage_port) + - name: aiservice_storage_ssl + value: $(params.aiservice_storage_ssl) + - name: aiservice_storage_region + value: $(params.aiservice_storage_region) + - name: aiservice_storage_pipelines_bucket + value: $(params.aiservice_storage_pipelines_bucket) + - name: aiservice_storage_tenants_bucket + value: $(params.aiservice_storage_tenants_bucket) + - name: aiservice_storage_templates_bucket + value: $(params.aiservice_storage_templates_bucket) + - name: mas_icr_cp value: $(params.mas_icr_cp) - name: mas_icr_cpopen - value: $(params.mas_icr_cpopen) - + value: $(params.mas_icr_cpopen) + taskRef: - name: mas-devops-kmodels + name: mas-devops-aiservice-kmodels kind: Task when: - - input: "$(params.mas_app_channel_aibroker)" + - input: "$(params.aiservice_channel)" operator: notin values: [""] \ No newline at end of file diff --git a/tekton/src/pipelines/taskdefs/aiservice/mariadb.yml.j2 b/tekton/src/pipelines/taskdefs/aiservice/mariadb.yml.j2 deleted file mode 100644 index 790f7eb994e..00000000000 --- a/tekton/src/pipelines/taskdefs/aiservice/mariadb.yml.j2 +++ /dev/null @@ -1,36 +0,0 @@ -- name: mariadb - timeout: "0" - params: - {{ lookup('template', 'taskdefs/common/cli-params.yml.j2') | indent(4) }} - - name: devops_suite_name - value: aibroker - - name: mas_instance_id - value: $(params.aibroker_instance_id) - - name: mas_app_id - value: aibroker - - name: artifactory_username - value: $(params.artifactory_username) - - name: artifactory_token - value: $(params.artifactory_token) - - name: mas_app_channel - value: "$(params.mas_app_channel_aibroker)" - - name: ibm_entitlement_key - value: $(params.ibm_entitlement_key) - - name: mas_aibroker_db_user - value: $(params.mas_aibroker_db_user) - - name: mas_aibroker_db_secret_value - value: $(params.mas_aibroker_db_secret_value) - - name: mas_aibroker_db_database - value: $(params.mas_aibroker_db_database) - - name: mariadb_user - value: $(params.mariadb_user) - - name: mariadb_password - value: $(params.mariadb_password) - - taskRef: - name: mas-devops-mariadb - kind: Task - when: - - input: "$(params.mas_app_channel_aibroker)" - operator: notin - values: [""] diff --git a/tekton/src/pipelines/taskdefs/aiservice/minio.yml.j2 b/tekton/src/pipelines/taskdefs/aiservice/minio.yml.j2 index d9375de7d4c..ce1bf640788 100644 --- a/tekton/src/pipelines/taskdefs/aiservice/minio.yml.j2 +++ b/tekton/src/pipelines/taskdefs/aiservice/minio.yml.j2 @@ -5,7 +5,7 @@ - name: devops_suite_name value: aibroker - name: mas_instance_id - value: $(params.aibroker_instance_id) + value: $(params.aiservice_instance_id) - name: mas_app_id value: aibroker - name: artifactory_username @@ -13,15 +13,15 @@ - name: artifactory_token value: $(params.artifactory_token) - name: mas_app_channel - value: "$(params.mas_app_channel_aibroker)" + value: "$(params.aiservice_channel)" - name: ibm_entitlement_key value: $(params.ibm_entitlement_key) - - name: mas_aibroker_storage_provider - value: $(params.mas_aibroker_storage_provider) - - name: mas_aibroker_storage_accesskey - value: $(params.mas_aibroker_storage_accesskey) - - name: mas_aibroker_storage_secretkey - value: $(params.mas_aibroker_storage_secretkey) + - name: aiservice_storage_provider + value: $(params.aiservice_storage_provider) + - name: aiservice_storage_accesskey + value: $(params.aiservice_storage_accesskey) + - name: aiservice_storage_secretkey + value: $(params.aiservice_storage_secretkey) - name: minio_root_user value: $(params.minio_root_user) - name: minio_root_password @@ -31,12 +31,6 @@ name: mas-devops-minio kind: Task when: - - input: "$(params.mas_app_channel_aibroker)" - operator: notin - values: [""] - - input: "$(params.mas_aibroker_storage_provider)" + - input: "$(params.aiservice_storage_provider)" operator: in values: ["minio"] - - input: "$(params.install_minio_aiservice)" - operator: notin - values: ["false", "False"] \ No newline at end of file diff --git a/tekton/src/pipelines/taskdefs/aiservice/odh.yml.j2 b/tekton/src/pipelines/taskdefs/aiservice/odh.yml.j2 index 1b220f29e01..745db52985d 100644 --- a/tekton/src/pipelines/taskdefs/aiservice/odh.yml.j2 +++ b/tekton/src/pipelines/taskdefs/aiservice/odh.yml.j2 @@ -1,68 +1,50 @@ -- name: odh +- name: aiservice-odh params: {{ lookup('template', 'taskdefs/common/cli-params.yml.j2') | indent(4) }} - name: devops_suite_name - value: odh + value: aiservice-odh - name: mas_instance_id -{% if application is defined and application == "aibroker" %} - value: $(params.aibroker_instance_id) +{% if application is defined and application == "aiservice" %} + value: $(params.aiservice_instance_id) {% else %} value: $(params.mas_instance_id) {% endif %} - - name: mas_app_id - value: aibroker - name: artifactory_username value: $(params.artifactory_username) - name: artifactory_token value: $(params.artifactory_token) - - name: mas_app_channel - value: "$(params.mas_app_channel_aibroker)" + - name: aiservice_channel + value: "$(params.aiservice_channel)" - name: ibm_entitlement_key value: $(params.ibm_entitlement_key) - name: custom_labels value: $(params.custom_labels) - - name: mas_aibroker_storage_provider - value: $(params.mas_aibroker_storage_provider) - - name: mas_aibroker_storage_accesskey - value: $(params.mas_aibroker_storage_accesskey) - - name: mas_aibroker_storage_secretkey - value: $(params.mas_aibroker_storage_secretkey) - - name: mas_aibroker_storage_host - value: $(params.mas_aibroker_storage_host) - - name: mas_aibroker_storage_port - value: $(params.mas_aibroker_storage_port) - - name: mas_aibroker_storage_ssl - value: $(params.mas_aibroker_storage_ssl) - - name: mas_aibroker_storage_region - value: $(params.mas_aibroker_storage_region) - - name: mas_aibroker_storage_pipelines_bucket - value: $(params.mas_aibroker_storage_pipelines_bucket) - - name: mas_aibroker_storage_tenants_bucket - value: $(params.mas_aibroker_storage_tenants_bucket) - - name: mas_aibroker_storage_templates_bucket - value: $(params.mas_aibroker_storage_templates_bucket) - - name: mas_aibroker_tenant_name - value: $(params.mas_aibroker_tenant_name) - - name: mas_aibroker_db_host - value: $(params.mas_aibroker_db_host) - - name: mas_aibroker_db_port - value: $(params.mas_aibroker_db_port) - - name: mas_aibroker_db_user - value: $(params.mas_aibroker_db_user) - - name: mas_aibroker_db_database - value: $(params.mas_aibroker_db_database) - - name: mas_aibroker_db_secret_name - value: $(params.mas_aibroker_db_secret_name) - - name: mas_aibroker_db_secret_key - value: $(params.mas_aibroker_db_secret_key) - - name: mas_aibroker_db_secret_value - value: $(params.mas_aibroker_db_secret_value) + - name: aiservice_storage_provider + value: $(params.aiservice_storage_provider) + - name: aiservice_storage_accesskey + value: $(params.aiservice_storage_accesskey) + - name: aiservice_storage_secretkey + value: $(params.aiservice_storage_secretkey) + - name: aiservice_storage_host + value: $(params.aiservice_storage_host) + - name: aiservice_storage_port + value: $(params.aiservice_storage_port) + - name: aiservice_storage_ssl + value: $(params.aiservice_storage_ssl) + - name: aiservice_storage_region + value: $(params.aiservice_storage_region) + - name: aiservice_storage_pipelines_bucket + value: $(params.aiservice_storage_pipelines_bucket) + - name: aiservice_storage_tenants_bucket + value: $(params.aiservice_storage_tenants_bucket) + - name: aiservice_storage_templates_bucket + value: $(params.aiservice_storage_templates_bucket) taskRef: - name: mas-devops-odh + name: mas-devops-aiservice-odh kind: Task when: - - input: "$(params.mas_app_channel_aibroker)" + - input: "$(params.aiservice_channel)" operator: notin values: [""] \ No newline at end of file diff --git a/tekton/src/pipelines/taskdefs/dependencies/db2.yml.j2 b/tekton/src/pipelines/taskdefs/dependencies/db2.yml.j2 index f3f9bbac5f9..8bf6050cca8 100644 --- a/tekton/src/pipelines/taskdefs/dependencies/db2.yml.j2 +++ b/tekton/src/pipelines/taskdefs/dependencies/db2.yml.j2 @@ -6,8 +6,8 @@ value: dependencies-db2-{{ suffix }} - name: mas_instance_id -{% if suffix == "aibroker" %} - value: $(params.aibroker_instance_id) +{% if suffix == "aiservice" %} + value: $(params.aiservice_instance_id) {% else %} value: $(params.mas_instance_id) {% endif %} @@ -36,8 +36,8 @@ - name: db2_timezone value: $(params.db2_timezone) {% endif %} -{% if suffix == "aibroker" %} - value: aibroker +{% if suffix == "aiservice" %} + value: aiservice-$(params.aiservice_instance_id) {% endif %} - name: db2_namespace value: $(params.db2_namespace) diff --git a/tekton/src/pipelines/taskdefs/dependencies/mongo.yml.j2 b/tekton/src/pipelines/taskdefs/dependencies/mongo.yml.j2 index 375ea99d804..7b50ff6fda1 100644 --- a/tekton/src/pipelines/taskdefs/dependencies/mongo.yml.j2 +++ b/tekton/src/pipelines/taskdefs/dependencies/mongo.yml.j2 @@ -6,8 +6,8 @@ value: dependencies-mongodb - name: mas_instance_id -{% if application is defined and application == "aibroker" %} - value: $(params.aibroker_instance_id) +{% if application is defined and application == "aiservice" %} + value: $(params.aiservice_instance_id) {% else %} value: $(params.mas_instance_id) {% endif %} diff --git a/tekton/src/pipelines/taskdefs/dependencies/sls.yml.j2 b/tekton/src/pipelines/taskdefs/dependencies/sls.yml.j2 index c3467779ddd..fa07d074c3e 100644 --- a/tekton/src/pipelines/taskdefs/dependencies/sls.yml.j2 +++ b/tekton/src/pipelines/taskdefs/dependencies/sls.yml.j2 @@ -6,8 +6,8 @@ value: dependencies-sls - name: mas_instance_id -{% if application is defined and application == "aibroker" %} - value: $(params.aibroker_instance_id) +{% if application is defined and application == "aiservice" %} + value: $(params.aiservice_instance_id) {% else %} value: $(params.mas_instance_id) {% endif %} diff --git a/tekton/src/pipelines/taskdefs/dependencies/uds.yml.j2 b/tekton/src/pipelines/taskdefs/dependencies/uds.yml.j2 index 105f028711a..6c2e70c57f9 100644 --- a/tekton/src/pipelines/taskdefs/dependencies/uds.yml.j2 +++ b/tekton/src/pipelines/taskdefs/dependencies/uds.yml.j2 @@ -6,8 +6,8 @@ value: "$(params.uds_action)" - name: mas_instance_id -{% if application is defined and application == "aibroker" %} - value: $(params.aibroker_instance_id) +{% if application is defined and application == "aiservice" %} + value: $(params.aiservice_instance_id) {% else %} value: $(params.mas_instance_id) {% endif %} diff --git a/tekton/src/pipelines/taskdefs/fvt-aiservice/common/params.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-aiservice/common/params.yml.j2 index 91a8db02c90..615234d54c6 100644 --- a/tekton/src/pipelines/taskdefs/fvt-aiservice/common/params.yml.j2 +++ b/tekton/src/pipelines/taskdefs/fvt-aiservice/common/params.yml.j2 @@ -11,6 +11,6 @@ - name: fvt_image_digest value: $(params.fvt_digest_aibroker) - name: product_channel - value: $(params.mas_app_channel_aibroker) + value: $(params.aiservice_channel) - name: product_id value: ibm-mas-aibroker \ No newline at end of file diff --git a/tekton/src/pipelines/taskdefs/fvt-aiservice/common/taskref.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-aiservice/common/taskref.yml.j2 index 902da8f3e02..e44c4fa46ed 100644 --- a/tekton/src/pipelines/taskdefs/fvt-aiservice/common/taskref.yml.j2 +++ b/tekton/src/pipelines/taskdefs/fvt-aiservice/common/taskref.yml.j2 @@ -6,7 +6,7 @@ when: - input: "$(params.fvt_digest_aibroker)" operator: notin values: [""] - - input: "$(params.mas_app_channel_aibroker)" + - input: "$(params.aiservice_channel)" operator: notin values: [""] workspaces: diff --git a/tekton/src/tasks/aiservice/aiservice-post-verify.yml.j2 b/tekton/src/tasks/aiservice/aiservice-post-verify.yml.j2 index 682343690f3..052e52953f9 100644 --- a/tekton/src/tasks/aiservice/aiservice-post-verify.yml.j2 +++ b/tekton/src/tasks/aiservice/aiservice-post-verify.yml.j2 @@ -2,7 +2,7 @@ apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: aibroker-post-verify + name: aiservice-post-verify spec: params: {{ lookup('template', task_src_dir ~ '/common/cli-params.yml.j2') | indent(4) }} @@ -37,7 +37,7 @@ spec: value: $(params.mas_workspace_id) steps: - + # If configmap/approval-app-cfg-$(params.mas_app_id) exists then set STATUS=pending and wait for it to be changed to "approved" - name: app-cfg-post-verify image: quay.io/ibmmas/cli:latest diff --git a/tekton/src/tasks/aiservice/aiservice-tenant.yml.j2 b/tekton/src/tasks/aiservice/aiservice-tenant.yml.j2 index 510a828d432..126ad5e9ffa 100644 --- a/tekton/src/tasks/aiservice/aiservice-tenant.yml.j2 +++ b/tekton/src/tasks/aiservice/aiservice-tenant.yml.j2 @@ -2,7 +2,7 @@ apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: mas-devops-aibroker-tenant + name: mas-devops-aiservice-tenant spec: params: {{ lookup('template', task_src_dir ~ '/common/cli-params.yml.j2') | indent(4) }} @@ -21,11 +21,6 @@ spec: - name: ibm_entitlement_key type: string - # MAS Details - - name: mas_instance_id - type: string - description: Instance ID - # Artifactory details - name: mas_icr_cp type: string @@ -34,115 +29,115 @@ spec: type: string default: "" - # Application - Operator - # - name: mas_aibroker_channel - - name: mas_app_channel + # Custom Label Support + - name: custom_labels type: string - description: Catalog channel for the application operator subscription - - # Application - Operand - - name: mas_app_bindings_jdbc + description: Optional MAS custom labels, comma separated list of key=value pairs default: "" - type: string - - name: mas_app_plan + # AI Service Details + - name: aiservice_instance_id type: string - description: Application installation plan - default: "" + description: AI Service Instance ID + - name: aiservice_channel + type: string + description: Catalog channel for the AI Service operator subscription - # Custom Label Support - - name: custom_labels + - name: environment_type type: string - description: Optional MAS custom labels, comma separated list of key=value pairs + description: Environment type default: "" - # AI Broker actions - - name: mas_aibroker_s3_action + - name: aiservice_s3_action type: string - description: + description: default: "This option is optional" - - name: mas_aibroker_apikey_action + - name: aiservice_apikey_action type: string - description: + description: default: "This option is optional" # WatsonX params - - name: mas_aibroker_watsonxai_apikey + - name: aiservice_watsonxai_apikey type: string - description: + description: default: "This option is mandatory" - - name: mas_aibroker_watsonxai_url + - name: aiservice_watsonxai_url type: string - description: - default: "This option is mandatory" - - name: mas_aibroker_watsonxai_project_id + description: + default: "This option is mandatory" + - name: aiservice_watsonxai_project_id type: string - description: + description: default: "This option is mandatory" - - name: mas_aibroker_watsonx_action + - name: aiservice_watsonx_action type: string - description: + description: default: "This option is mandatory" - # AI Broker storage - - name: mas_aibroker_storage_provider + # S3 storage + - name: aiservice_storage_provider type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_accesskey + - name: aiservice_storage_accesskey type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_secretkey + - name: aiservice_storage_secretkey type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_host + - name: aiservice_storage_host type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_port + - name: aiservice_storage_port type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_ssl + - name: aiservice_storage_ssl type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_region + - name: aiservice_storage_region type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_pipelines_bucket + - name: aiservice_storage_pipelines_bucket type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_tenants_bucket + - name: aiservice_storage_tenants_bucket type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_templates_bucket + - name: aiservice_storage_templates_bucket type: string default: "This option is mandatory" default: "" - # Ai Broker Tenant + # Tenant Entitlement - name: tenant_entitlement_type type: string - name: tenant_entitlement_start_date type: string - name: tenant_entitlement_end_date type: string - - name: mas_aibroker_tenant_s3_bucket_prefix + + # Tenant S3 + - name: aiservice_tenant_s3_bucket_prefix type: string - - name: mas_aibroker_tenant_s3_region + - name: aiservice_tenant_s3_region type: string - - name: mas_aibroker_tenant_s3_endpoint_url + - name: aiservice_tenant_s3_endpoint_url type: string - - name: mas_aibroker_tenant_s3_access_key + - name: aiservice_tenant_s3_access_key type: string - - name: mas_aibroker_tenant_s3_secret_key + - name: aiservice_tenant_s3_secret_key type: string + + # RSL - name: rsl_url type: string - name: rsl_org_id @@ -150,63 +145,6 @@ spec: - name: rsl_token type: string - - name: mas_aibroker_dro_secret_name - type: string - description: DRO secret name - default: "" - - name: mas_aibroker_dro_api_key - type: string - description: DRO API key - default: "" - - name: mas_aibroker_dro_url - type: string - description: DRO URL - default: "" - - name: mas_aibroker_dro_ca_cert - type: string - description: DRO CA certificate - default: "" - - name: mas_aibroker_db2_username - type: string - description: DB2 username - default: "" - - name: mas_aibroker_db2_password - type: string - description: DB2 password - default: "" - - name: mas_aibroker_db2_jdbc_url - type: string - description: DB2 JDBC URL - default: "" - - name: mas_aibroker_db2_ssl_enabled - type: string - description: DB2 SSL enabled - default: "false" - - name: mas_aibroker_db2_ca_cert - type: string - description: DB2 CA certificate - default: "" - - name: mas_aibroker_sls_secret_name - type: string - description: SLS secret name - default: "" - - name: mas_aibroker_sls_registration_key - type: string - description: SLS registration key - default: "" - - name: mas_aibroker_sls_url - type: string - description: SLS URL - default: "" - - name: mas_aibroker_sls_ca_cert - type: string - description: SLS CA certificate - default: "" - - name: environment_type - type: string - description: Environment type - default: "" - stepTemplate: env: {{ lookup('template', task_src_dir ~ '/common/cli-env.yml.j2') | indent(6) }} @@ -221,15 +159,6 @@ spec: - name: IBM_ENTITLEMENT_KEY value: $(params.ibm_entitlement_key) - # MAS Details - - name: MAS_INSTANCE_ID - value: $(params.mas_instance_id) - - # Application - Operator - # - name: MAS_AIBROKER_CHANNEL - # value: $(params.mas_aibroker_channel) - - name: MAS_APP_CHANNEL - value: $(params.mas_app_channel) - name: MAS_CONFIG_DIR value: /workspace/configs @@ -243,69 +172,77 @@ spec: - name: CUSTOM_LABELS value: $(params.custom_labels) - # AI Broker action for create/delete s3 secret - - name: MAS_AIBROKER_S3_ACTION - value: $(params.mas_aibroker_s3_action) - - # AI Broker action for create/delete api key - - name: MAS_AIBROKER_APIKEY_ACTION - value: $(params.mas_aibroker_apikey_action) - - # WatsonX api key - - name: MAS_AIBROKER_WATSONXAI_APIKEY - value: $(params.mas_aibroker_watsonxai_apikey) - - # WatsonX url - - name: MAS_AIBROKER_WATSONXAI_URL - value: $(params.mas_aibroker_watsonxai_url) - - # WatsonX project id - - name: MAS_AIBROKER_WATSONXAI_PROJECT_ID - value: $(params.mas_aibroker_watsonxai_project_id) - - # WatsonX action - - name: MAS_AIBROKER_WATSONX_ACTION - value: $(params.mas_aibroker_watsonx_action) - - # Opendatahub storage details - - name: MAS_AIBROKER_STORAGE_PROVIDER - value: $(params.mas_aibroker_storage_provider) - - name: MAS_AIBROKER_STORAGE_ACCESSKEY - value: $(params.mas_aibroker_storage_accesskey) - - name: MAS_AIBROKER_STORAGE_SECRETKEY - value: $(params.mas_aibroker_storage_secretkey) - - name: MAS_AIBROKER_STORAGE_HOST - value: $(params.mas_aibroker_storage_host) - - name: MAS_AIBROKER_STORAGE_PORT - value: $(params.mas_aibroker_storage_port) - - name: MAS_AIBROKER_STORAGE_SSL - value: $(params.mas_aibroker_storage_ssl) - - name: MAS_AIBROKER_STORAGE_REGION - value: $(params.mas_aibroker_storage_region) - - name: MAS_AIBROKER_STORAGE_PIPELINES_BUCKET - value: $(params.mas_aibroker_storage_pipelines_bucket) - - name: MAS_AIBROKER_STORAGE_TENANTS_BUCKET - value: $(params.mas_aibroker_storage_tenants_bucket) - - name: MAS_AIBROKER_STORAGE_TEMPLATES_BUCKET - value: $(params.mas_aibroker_storage_templates_bucket) + # AI Service Configuration + - name: AISERVICE_INSTANCE_ID + value: $(params.aiservice_instance_id) + - name: AISERVICE_CHANNEL + value: $(params.aiservice_channel) + - name: AISERVICE_SAAS + value: 'true' + - name: ENVIRONMENT_TYPE + value: $(params.environment_type) - # Ai Broker Tenant - - name: MAS_AIBROKER_TENANT_ENTITLEMENT_TYPE + # AI Broker action for create/delete s3 secret + - name: AISERVICE_S3_ACTION + value: $(params.aiservice_s3_action) + + # AI Broker action for create/delete api key + - name: AISERVICE_APIKEY_ACTION + value: $(params.aiservice_apikey_action) + + # Watsonx + - name: AISERVICE_WATSONXAI_APIKEY + value: $(params.aiservice_watsonxai_apikey) + - name: AISERVICE_WATSONXAI_URL + value: $(params.aiservice_watsonxai_url) + - name: AISERVICE_WATSONXAI_PROJECT_ID + value: $(params.aiservice_watsonxai_project_id) + - name: AISERVICE_WATSONX_ACTION + value: $(params.aiservice_watsonx_action) + + # S3 storage + - name: AISERVICE_STORAGE_PROVIDER + value: $(params.aiservice_storage_provider) + - name: AISERVICE_STORAGE_ACCESSKEY + value: $(params.aiservice_storage_accesskey) + - name: AISERVICE_STORAGE_SECRETKEY + value: $(params.aiservice_storage_secretkey) + - name: AISERVICE_STORAGE_HOST + value: $(params.aiservice_storage_host) + - name: AISERVICE_STORAGE_PORT + value: $(params.aiservice_storage_port) + - name: AISERVICE_STORAGE_SSL + value: $(params.aiservice_storage_ssl) + - name: AISERVICE_STORAGE_REGION + value: $(params.aiservice_storage_region) + - name: AISERVICE_STORAGE_PIPELINES_BUCKET + value: $(params.aiservice_storage_pipelines_bucket) + - name: AISERVICE_STORAGE_TENANTS_BUCKET + value: $(params.aiservice_storage_tenants_bucket) + - name: AISERVICE_STORAGE_TEMPLATES_BUCKET + value: $(params.aiservice_storage_templates_bucket) + + # Tenant Entitlement + - name: AISERVICE_TENANT_ENTITLEMENT_TYPE value: $(params.tenant_entitlement_type) - - name: MAS_AIBROKER_TENANT_ENTITLEMENT_START_DATE + - name: AISERVICE_TENANT_ENTITLEMENT_START_DATE value: $(params.tenant_entitlement_start_date) - - name: MAS_AIBROKER_TENANT_ENTITLEMENT_END_DATE + - name: AISERVICE_TENANT_ENTITLEMENT_END_DATE value: $(params.tenant_entitlement_end_date) - - name: MAS_AIBROKER_TENANT_S3_REGION - value: $(params.mas_aibroker_tenant_s3_region) - - name: MAS_AIBROKER_TENANT_S3_BUCKET_PREFIX - value: $(params.mas_aibroker_tenant_s3_bucket_prefix) - - name: MAS_AIBROKER_TENANT_S3_ENDPOINT_URL - value: $(params.mas_aibroker_tenant_s3_endpoint_url) - - name: MAS_AIBROKER_TENANT_S3_ACCESS_KEY - value: $(params.mas_aibroker_tenant_s3_access_key) - - name: MAS_AIBROKER_TENANT_S3_SECRET_KEY - value: $(params.mas_aibroker_tenant_s3_secret_key) + + # Tenant S3 storage + - name: AISERVICE_TENANT_S3_REGION + value: $(params.aiservice_tenant_s3_region) + - name: AISERVICE_TENANT_S3_BUCKET_PREFIX + value: $(params.aiservice_tenant_s3_bucket_prefix) + - name: AISERVICE_TENANT_S3_ENDPOINT_URL + value: $(params.aiservice_tenant_s3_endpoint_url) + - name: AISERVICE_TENANT_S3_ACCESS_KEY + value: $(params.aiservice_tenant_s3_access_key) + - name: AISERVICE_TENANT_S3_SECRET_KEY + value: $(params.aiservice_tenant_s3_secret_key) + + # RSL - name: RSL_URL value: $(params.rsl_url) - name: RSL_ORG_ID @@ -313,45 +250,11 @@ spec: - name: RSL_TOKEN value: $(params.rsl_token) - # Ai Broker Saas - - name: MAS_AIBROKER_SAAS - value: 'true' - - # DRO, DB2, SLS vars - - name: MAS_AIBROKER_DRO_SECRET_NAME - value: $(params.mas_aibroker_dro_secret_name) - - name: MAS_AIBROKER_DRO_API_KEY - value: $(params.mas_aibroker_dro_api_key) - - name: MAS_AIBROKER_DRO_URL - value: $(params.mas_aibroker_dro_url) - - name: MAS_AIBROKER_DRO_CA_CERT - value: $(params.mas_aibroker_dro_ca_cert) - - name: MAS_AIBROKER_DB2_USERNAME - value: $(params.mas_aibroker_db2_username) - - name: MAS_AIBROKER_DB2_PASSWORD - value: $(params.mas_aibroker_db2_password) - - name: MAS_AIBROKER_DB2_JDBC_URL - value: $(params.mas_aibroker_db2_jdbc_url) - - name: MAS_AIBROKER_DB2_SSL_ENABLED - value: $(params.mas_aibroker_db2_ssl_enabled) - - name: MAS_AIBROKER_DB2_CA_CERT - value: $(params.mas_aibroker_db2_ca_cert) - - name: MAS_AIBROKER_SLS_SECRET_NAME - value: $(params.mas_aibroker_sls_secret_name) - - name: MAS_AIBROKER_SLS_REGISTRATION_KEY - value: $(params.mas_aibroker_sls_registration_key) - - name: MAS_AIBROKER_SLS_URL - value: $(params.mas_aibroker_sls_url) - - name: MAS_AIBROKER_SLS_CA_CERT - value: $(params.mas_aibroker_sls_ca_cert) - - name: ENVIRONMENT_TYPE - value: $(params.environment_type) - steps: - - name: aibroker-tenant + - name: aiservice-tenant command: - /opt/app-root/src/run-role.sh - - aibroker_tenant + - aiservice_tenant image: quay.io/ibmmas/cli:latest imagePullPolicy: $(params.image_pull_policy) workingDir: /workspace/configs diff --git a/tekton/src/tasks/aiservice/aiservice.yml.j2 b/tekton/src/tasks/aiservice/aiservice.yml.j2 index 3fd20e45327..bec8ba3c484 100644 --- a/tekton/src/tasks/aiservice/aiservice.yml.j2 +++ b/tekton/src/tasks/aiservice/aiservice.yml.j2 @@ -2,7 +2,7 @@ apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: mas-devops-aibroker + name: mas-devops-aiservice spec: params: {{ lookup('template', task_src_dir ~ '/common/cli-params.yml.j2') | indent(4) }} @@ -22,25 +22,14 @@ spec: type: string # MAS Details - - name: mas_instance_id + - name: aiservice_instance_id type: string - description: Instance ID + description: AI Service Instance ID # Application - Operator - # - name: mas_aibroker_channel - - name: mas_app_channel + - name: aiservice_channel type: string - description: Catalog channel for the application operator subscription - - # Application - Operand - - name: mas_app_bindings_jdbc - default: "" - type: string - - - name: mas_app_plan - type: string - description: Application installation plan - default: "" + description: Catalog channel for the AI Service operator subscription # Artifactory details - name: mas_icr_cp @@ -56,159 +45,86 @@ spec: description: Optional MAS custom labels, comma separated list of key=value pairs default: "" - # AI Broker actions - - name: mas_aibroker_s3_action + # AI Broker actions + - name: aiservice_s3_action type: string - description: + description: default: "This option is optional" - - name: mas_aibroker_apikey_action + - name: aiservice_apikey_action type: string - description: + description: default: "This option is optional" # WatsonX params - - name: mas_aibroker_watsonxai_apikey + - name: aiservice_watsonxai_apikey type: string - description: + description: default: "This option is mandatory" - - name: mas_aibroker_watsonxai_url + - name: aiservice_watsonxai_url type: string - description: - default: "This option is mandatory" - - name: mas_aibroker_watsonxai_project_id + description: + default: "This option is mandatory" + - name: aiservice_watsonxai_project_id type: string - description: + description: default: "This option is mandatory" - - name: mas_aibroker_watsonx_action + - name: aiservice_watsonx_action type: string - description: + description: default: "This option is mandatory" - # AI Broker storage - - name: mas_aibroker_storage_provider + # AI Broker storage + - name: aiservice_storage_provider type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_accesskey + - name: aiservice_storage_accesskey type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_secretkey + - name: aiservice_storage_secretkey type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_host + - name: aiservice_storage_host type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_port + - name: aiservice_storage_port type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_ssl + - name: aiservice_storage_ssl type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_region + - name: aiservice_storage_region type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_pipelines_bucket + - name: aiservice_storage_pipelines_bucket type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_tenants_bucket + - name: aiservice_storage_tenants_bucket type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_templates_bucket + - name: aiservice_storage_templates_bucket type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_s3_bucket_prefix - type: string - default: "" - - name: mas_aibroker_s3_endpoint_url - type: string - default: "" - - name: mas_aibroker_db_host - type: string - default: "" - - name: mas_aibroker_db_port - type: string - default: "" - - name: mas_aibroker_db_user - type: string - default: "" - - name: mas_aibroker_db_database - type: string - default: "" - - name: mas_aibroker_db_secret_name - type: string - default: "" - - name: mas_aibroker_db_secret_key - type: string - default: "" - - name: mas_aibroker_db_secret_value - type: string - default: "" - - name: mas_aibroker_dro_secret_name - type: string - description: DRO secret name - default: "" - - name: mas_aibroker_dro_api_key + - name: aiservice_s3_bucket_prefix type: string - description: DRO API key default: "" - - name: mas_aibroker_dro_url + - name: aiservice_s3_endpoint_url type: string - description: DRO URL - default: "" - - name: mas_aibroker_dro_ca_cert - type: string - description: DRO CA certificate - default: "" - - name: mas_aibroker_db2_username - type: string - description: DB2 username - default: "" - - name: mas_aibroker_db2_password - type: string - description: DB2 password - default: "" - - name: mas_aibroker_db2_jdbc_url - type: string - description: DB2 JDBC URL - default: "" - - name: mas_aibroker_db2_ssl_enabled - type: string - description: DB2 SSL enabled - default: "false" - - name: mas_aibroker_db2_ca_cert - type: string - description: DB2 CA certificate - default: "" - - name: mas_aibroker_sls_secret_name - type: string - description: SLS secret name - default: "" - - name: mas_aibroker_sls_registration_key - type: string - description: SLS registration key - default: "" - - name: mas_aibroker_sls_url - type: string - description: SLS URL - default: "" - - name: mas_aibroker_sls_ca_cert - type: string - description: SLS CA certificate default: "" - name: environment_type type: string description: Environment type default: "" - + stepTemplate: env: {{ lookup('template', task_src_dir ~ '/common/cli-env.yml.j2') | indent(6) }} @@ -224,18 +140,12 @@ spec: value: $(params.ibm_entitlement_key) # MAS Details - - name: MAS_INSTANCE_ID - value: $(params.mas_instance_id) - - # Application - Operator - # - name: MAS_AIBROKER_CHANNEL - # value: $(params.mas_aibroker_channel) - - name: MAS_APP_CHANNEL - value: $(params.mas_app_channel) + - name: AISERVICE_INSTANCE_ID + value: $(params.aiservice_instance_id) + - name: AISERVICE_CHANNEL + value: $(params.aiservice_channel) - name: MAS_CONFIG_DIR value: /workspace/configs - - name: MAS_APP_ID - value: aibroker # Artifactory Details - name: MAS_ICR_CP @@ -246,110 +156,61 @@ spec: # Custom Label Support - name: CUSTOM_LABELS value: $(params.custom_labels) - - # AI Broker action for create/delete s3 secret - - name: MAS_AIBROKER_S3_ACTION - value: $(params.mas_aibroker_s3_action) - # AI Broker action for create/delete api key - - name: MAS_AIBROKER_APIKEY_ACTION - value: $(params.mas_aibroker_apikey_action) + # AI Broker action for create/delete s3 secret + - name: AISERVICE_S3_ACTION + value: $(params.aiservice_s3_action) - # WatsonX api key - - name: MAS_AIBROKER_WATSONXAI_APIKEY - value: $(params.mas_aibroker_watsonxai_apikey) + # AI Broker action for create/delete api key + - name: AISERVICE_APIKEY_ACTION + value: $(params.aiservice_apikey_action) - # WatsonX url - - name: MAS_AIBROKER_WATSONXAI_URL - value: $(params.mas_aibroker_watsonxai_url) - - # WatsonX project id - - name: MAS_AIBROKER_WATSONXAI_PROJECT_ID - value: $(params.mas_aibroker_watsonxai_project_id) - - # WatsonX action - - name: MAS_AIBROKER_WATSONX_ACTION - value: $(params.mas_aibroker_watsonx_action) - - # Opendatahub storage details - - name: MAS_AIBROKER_STORAGE_PROVIDER - value: $(params.mas_aibroker_storage_provider) - - name: MAS_AIBROKER_STORAGE_ACCESSKEY - value: $(params.mas_aibroker_storage_accesskey) - - name: MAS_AIBROKER_STORAGE_SECRETKEY - value: $(params.mas_aibroker_storage_secretkey) - - name: MAS_AIBROKER_STORAGE_HOST - value: $(params.mas_aibroker_storage_host) - - name: MAS_AIBROKER_STORAGE_PORT - value: $(params.mas_aibroker_storage_port) - - name: MAS_AIBROKER_STORAGE_SSL - value: $(params.mas_aibroker_storage_ssl) - - name: MAS_AIBROKER_STORAGE_REGION - value: $(params.mas_aibroker_storage_region) - - name: MAS_AIBROKER_STORAGE_PIPELINES_BUCKET - value: $(params.mas_aibroker_storage_pipelines_bucket) - - name: MAS_AIBROKER_STORAGE_TENANTS_BUCKET - value: $(params.mas_aibroker_storage_tenants_bucket) - - name: MAS_AIBROKER_STORAGE_TEMPLATES_BUCKET - value: $(params.mas_aibroker_storage_templates_bucket) - - name: MAS_AIBROKER_S3_BUCKET_PREFIX - value: $(params.mas_aibroker_s3_bucket_prefix) - - name: MAS_AIBROKER_S3_ENDPOINT_URL - value: $(params.mas_aibroker_s3_endpoint_url) + # Watsonx + - name: AISERVICE_WATSONXAI_APIKEY + value: $(params.aiservice_watsonxai_apikey) + - name: AISERVICE_WATSONXAI_URL + value: $(params.aiservice_watsonxai_url) + - name: AISERVICE_WATSONXAI_PROJECT_ID + value: $(params.aiservice_watsonxai_project_id) + - name: AISERVICE_WATSONX_ACTION + value: $(params.aiservice_watsonx_action) - # Ai Broker Saas - - name: MAS_AIBROKER_SAAS + # Opendatahub storage details + - name: AISERVICE_STORAGE_PROVIDER + value: $(params.aiservice_storage_provider) + - name: AISERVICE_STORAGE_ACCESSKEY + value: $(params.aiservice_storage_accesskey) + - name: AISERVICE_STORAGE_SECRETKEY + value: $(params.aiservice_storage_secretkey) + - name: AISERVICE_STORAGE_HOST + value: $(params.aiservice_storage_host) + - name: AISERVICE_STORAGE_PORT + value: $(params.aiservice_storage_port) + - name: AISERVICE_STORAGE_SSL + value: $(params.aiservice_storage_ssl) + - name: AISERVICE_STORAGE_REGION + value: $(params.aiservice_storage_region) + - name: AISERVICE_STORAGE_PIPELINES_BUCKET + value: $(params.aiservice_storage_pipelines_bucket) + - name: AISERVICE_STORAGE_TENANTS_BUCKET + value: $(params.aiservice_storage_tenants_bucket) + - name: AISERVICE_STORAGE_TEMPLATES_BUCKET + value: $(params.aiservice_storage_templates_bucket) + - name: AISERVICE_S3_BUCKET_PREFIX + value: $(params.aiservice_s3_bucket_prefix) + - name: AISERVICE_S3_ENDPOINT_URL + value: $(params.aiservice_s3_endpoint_url) + + - name: AISERVICE_SAAS value: 'true' - - # MariaDB details - - name: MAS_AIBROKER_DB_HOST - value: $(params.mas_aibroker_db_host) - - name: MAS_AIBROKER_DB_PORT - value: $(params.mas_aibroker_db_port) - - name: MAS_AIBROKER_DB_USER - value: $(params.mas_aibroker_db_user) - - name: MAS_AIBROKER_DB_DATABASE - value: $(params.mas_aibroker_db_database) - - name: MAS_AIBROKER_DB_SECRET_NAME - value: $(params.mas_aibroker_db_secret_name) - - name: MAS_AIBROKER_DB_SECRET_VALUE - value: $(params.mas_aibroker_db_secret_value) - - # DRO, DB2, SLS vars - - name: MAS_AIBROKER_DRO_SECRET_NAME - value: $(params.mas_aibroker_dro_secret_name) - - name: MAS_AIBROKER_DRO_API_KEY - value: $(params.mas_aibroker_dro_api_key) - - name: MAS_AIBROKER_DRO_URL - value: $(params.mas_aibroker_dro_url) - - name: MAS_AIBROKER_DRO_CA_CERT - value: $(params.mas_aibroker_dro_ca_cert) - - name: MAS_AIBROKER_DB2_USERNAME - value: $(params.mas_aibroker_db2_username) - - name: MAS_AIBROKER_DB2_PASSWORD - value: $(params.mas_aibroker_db2_password) - - name: MAS_AIBROKER_DB2_JDBC_URL - value: $(params.mas_aibroker_db2_jdbc_url) - - name: MAS_AIBROKER_DB2_SSL_ENABLED - value: $(params.mas_aibroker_db2_ssl_enabled) - - name: MAS_AIBROKER_DB2_CA_CERT - value: $(params.mas_aibroker_db2_ca_cert) - - name: MAS_AIBROKER_SLS_SECRET_NAME - value: $(params.mas_aibroker_sls_secret_name) - - name: MAS_AIBROKER_SLS_REGISTRATION_KEY - value: $(params.mas_aibroker_sls_registration_key) - - name: MAS_AIBROKER_SLS_URL - value: $(params.mas_aibroker_sls_url) - - name: MAS_AIBROKER_SLS_CA_CERT - value: $(params.mas_aibroker_sls_ca_cert) - name: ENVIRONMENT_TYPE value: $(params.environment_type) steps: - - name: aibroker + - name: aiservice command: - /opt/app-root/src/run-role.sh - - aibroker + - aiservice image: quay.io/ibmmas/cli:latest imagePullPolicy: $(params.image_pull_policy) workingDir: /workspace/configs diff --git a/tekton/src/tasks/aiservice/kmodels.yml.j2 b/tekton/src/tasks/aiservice/kmodels.yml.j2 index 057cb4b2404..781b454f159 100644 --- a/tekton/src/tasks/aiservice/kmodels.yml.j2 +++ b/tekton/src/tasks/aiservice/kmodels.yml.j2 @@ -2,7 +2,7 @@ apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: mas-devops-kmodels + name: mas-devops-aiservice-kmodels spec: params: {{ lookup('template', task_src_dir ~ '/common/cli-params.yml.j2') | indent(4) }} @@ -21,26 +21,6 @@ spec: - name: ibm_entitlement_key type: string - # MAS Details - - name: mas_instance_id - type: string - description: Instance ID - - # Application - Operator - # - name: mas_aibroker_channel - - name: mas_app_channel - type: string - description: Catalog channel for the application operator subscription - - # Application - Operand - - name: mas_app_bindings_jdbc - default: "" - type: string - - name: mas_app_plan - type: string - description: Application installation plan - default: "" - # Custom Label Support - name: custom_labels type: string @@ -56,65 +36,42 @@ spec: default: "" # Kmodels details - - name: mas_aibroker_controller_tag - type: string - description: Optional Kmodels details - default: "" - - name: mas_aibroker_store_tag - type: string - description: Optional Kmodels details - default: "" - - name: mas_aibroker_watcher_tag - type: string - description: Optional Kmodels details - default: "" - - name: mas_aibroker_connector_tag + - name: aiservice_instance_id type: string - description: Optional Kmodels details - default: "" - - name: mas_aibroker_pipeline_steps_tag - type: string - description: Optional Kmodels details - default: "" - - name: mas_aibroker_storage_pipelines_bucket + description: Instance ID + + - name: aiservice_storage_pipelines_bucket type: string - description: This option is mandatory default: "" - - name: mas_aibroker_storage_tenants_bucket + - name: aiservice_storage_tenants_bucket type: string - description: This option is mandatory default: "" - - name: mas_aibroker_storage_templates_bucket + - name: aiservice_storage_templates_bucket type: string - description: This option is mandatory default: "" - - name: mas_aibroker_storage_provider + + - name: aiservice_storage_provider type: string - default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_accesskey + + - name: aiservice_storage_region type: string - default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_secretkey + - name: aiservice_storage_accesskey type: string - default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_host + - name: aiservice_storage_secretkey type: string - default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_port + + - name: aiservice_storage_host type: string - default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_ssl + - name: aiservice_storage_port type: string - default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_region + - name: aiservice_storage_ssl type: string - default: "This option is mandatory" default: "" stepTemplate: @@ -132,14 +89,8 @@ spec: value: $(params.ibm_entitlement_key) # MAS Details - - name: MAS_INSTANCE_ID - value: $(params.mas_instance_id) - - # Application - Operator - # - name: MAS_AIBROKER_CHANNEL - # value: $(params.mas_aibroker_channel) - - name: MAS_APP_CHANNEL - value: $(params.mas_app_channel) + - name: AISERVICE_INSTANCE_ID + value: $(params.aiservice_instance_id) # Custom Label Support - name: CUSTOM_LABELS @@ -152,46 +103,35 @@ spec: value: $(params.mas_icr_cpopen) # Kmodels details - - name: MAS_AIBROKER_CONTROLLER_TAG - value: $(params.mas_aibroker_controller_tag) - - name: MAS_AIBROKER_STORE_TAG - value: $(params.mas_aibroker_store_tag) - - name: MAS_AIBROKER_WATCHER_TAG - value: $(params.mas_aibroker_watcher_tag) - - name: MAS_AIBROKER_CONNECTOR_TAG - value: $(params.mas_aibroker_connector_tag) - - name: MAS_AIBROKER_PIPELINE_STEPS_TAG - value: $(params.mas_aibroker_pipeline_steps_tag) - - name: MAS_AIBROKER_STORAGE_PIPELINES_BUCKET - value: $(params.mas_aibroker_storage_pipelines_bucket) - - name: MAS_AIBROKER_STORAGE_TENANTS_BUCKET - value: $(params.mas_aibroker_storage_tenants_bucket) - - name: MAS_AIBROKER_STORAGE_TEMPLATES_BUCKET - value: $(params.mas_aibroker_storage_templates_bucket) - - name: MAS_AIBROKER_STORAGE_PROVIDER - value: $(params.mas_aibroker_storage_provider) - - name: MAS_AIBROKER_STORAGE_ACCESSKEY - value: $(params.mas_aibroker_storage_accesskey) - - name: MAS_AIBROKER_STORAGE_SECRETKEY - value: $(params.mas_aibroker_storage_secretkey) - - name: MAS_AIBROKER_STORAGE_HOST - value: $(params.mas_aibroker_storage_host) - - name: MAS_AIBROKER_STORAGE_PORT - value: $(params.mas_aibroker_storage_port) - - name: MAS_AIBROKER_STORAGE_SSL - value: $(params.mas_aibroker_storage_ssl) - - name: MAS_AIBROKER_STORAGE_REGION - value: $(params.mas_aibroker_storage_region) + - name: AISERVICE_STORAGE_PIPELINES_BUCKET + value: $(params.aiservice_storage_pipelines_bucket) + - name: AISERVICE_STORAGE_TENANTS_BUCKET + value: $(params.aiservice_storage_tenants_bucket) + - name: AISERVICE_STORAGE_TEMPLATES_BUCKET + value: $(params.aiservice_storage_templates_bucket) + - name: AISERVICE_STORAGE_PROVIDER + value: $(params.aiservice_storage_provider) + - name: AISERVICE_STORAGE_ACCESSKEY + value: $(params.aiservice_storage_accesskey) + - name: AISERVICE_STORAGE_SECRETKEY + value: $(params.aiservice_storage_secretkey) + - name: AISERVICE_STORAGE_HOST + value: $(params.aiservice_storage_host) + - name: AISERVICE_STORAGE_PORT + value: $(params.aiservice_storage_port) + - name: AISERVICE_STORAGE_SSL + value: $(params.aiservice_storage_ssl) + - name: AISERVICE_STORAGE_REGION + value: $(params.aiservice_storage_region) # Ai Broker Saas - - name: MAS_AIBROKER_SAAS + - name: AISERVICE_SAAS value: 'true' - steps: - - name: kmodels + - name: aiservice-kmodels command: - /opt/app-root/src/run-role.sh - - kmodels + - aiservice_kmodels image: quay.io/ibmmas/cli:latest imagePullPolicy: $(params.image_pull_policy) diff --git a/tekton/src/tasks/aiservice/mariadb.yml.j2 b/tekton/src/tasks/aiservice/mariadb.yml.j2 deleted file mode 100644 index 344460435e5..00000000000 --- a/tekton/src/tasks/aiservice/mariadb.yml.j2 +++ /dev/null @@ -1,88 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: mas-devops-mariadb -spec: - params: - {{ lookup('template', task_src_dir ~ '/common/cli-params.yml.j2') | indent(4) }} - - # Pre-Release Support - - name: artifactory_username - default: '' - type: string - description: Required to use development MAS builds - - name: artifactory_token - default: '' - type: string - description: Required to use development MAS builds - - # Entitlement - - name: ibm_entitlement_key - type: string - - # MAS Details - - name: mas_instance_id - type: string - description: Instance ID - - - name: mariadb_user - type: string - description: user for mariadb - - name: mariadb_password - type: string - description: password for mariadb user - - name: mas_aibroker_db_user - type: string - description: database user for IBM Maximo AI Broker - default: "" - - name: mas_aibroker_db_database - type: string - description: database name for IBM Maximo AI Broker - default: "" - - name: mas_aibroker_db_secret_value - type: string - description: database secret value for IBM Maximo AI Broker - default: "" - - stepTemplate: - env: - {{ lookup('template', task_src_dir ~ '/common/cli-env.yml.j2') | indent(6) }} - - # Pre-Release Support - - name: ARTIFACTORY_USERNAME - value: $(params.artifactory_username) - - name: ARTIFACTORY_TOKEN - value: $(params.artifactory_token) - - # Entitlement - - name: IBM_ENTITLEMENT_KEY - value: $(params.ibm_entitlement_key) - - # MAS Details - - name: MAS_INSTANCE_ID - value: $(params.mas_instance_id) - - - name: MARIADB_NAMESPACE - value: mariadb - - - name: MARIADB_INSTANCE_NAME - value: mariadb-instance - - - name: MARIADB_USER - value: $(params.mariadb_user) - - - name: MARIADB_PASSWORD - value: $(params.mariadb_password) - - - name: MARIADB_DATABASE - value: $(params.mas_aibroker_db_database) - - - steps: - - name: mariadb - command: - - /opt/app-root/src/run-role.sh - - mariadb - image: quay.io/ibmmas/cli:latest - imagePullPolicy: $(params.image_pull_policy) diff --git a/tekton/src/tasks/aiservice/odh.yml.j2 b/tekton/src/tasks/aiservice/odh.yml.j2 index 8b5b0d1986e..e5b0b5dde1f 100644 --- a/tekton/src/tasks/aiservice/odh.yml.j2 +++ b/tekton/src/tasks/aiservice/odh.yml.j2 @@ -2,7 +2,7 @@ apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: mas-devops-odh + name: mas-devops-aiservice-odh spec: params: {{ lookup('template', task_src_dir ~ '/common/cli-params.yml.j2') | indent(4) }} @@ -27,8 +27,7 @@ spec: description: Instance ID # Application - Operator - # - name: mas_aibroker_channel - - name: mas_app_channel + - name: aiservice_channel type: string description: Catalog channel for the application operator subscription @@ -48,75 +47,43 @@ spec: default: "" # Opendatahub details - - name: mas_aibroker_storage_provider + - name: aiservice_storage_provider type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_accesskey + - name: aiservice_storage_accesskey type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_secretkey + - name: aiservice_storage_secretkey type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_host + - name: aiservice_storage_host type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_port + - name: aiservice_storage_port type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_ssl + - name: aiservice_storage_ssl type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_region + - name: aiservice_storage_region type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_pipelines_bucket + - name: aiservice_storage_pipelines_bucket type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_tenants_bucket + - name: aiservice_storage_tenants_bucket type: string default: "This option is mandatory" default: "" - - name: mas_aibroker_storage_templates_bucket - type: string - default: "This option is mandatory" - default: "" - - name: mas_aibroker_tenant_name - type: string - default: "This option is mandatory" - default: "" - - name: mas_aibroker_db_host - type: string - default: "This option is mandatory" - default: "" - - name: mas_aibroker_db_port - type: string - default: "This option is mandatory" - default: "" - - name: mas_aibroker_db_user - type: string - default: "This option is mandatory" - default: "" - - name: mas_aibroker_db_database - type: string - default: "This option is mandatory" - default: "" - - name: mas_aibroker_db_secret_name - type: string - default: "This option is mandatory" - default: "" - - name: mas_aibroker_db_secret_key - type: string - default: "This option is mandatory" - default: "" - - name: mas_aibroker_db_secret_value + - name: aiservice_storage_templates_bucket type: string default: "This option is mandatory" default: "" @@ -140,59 +107,39 @@ spec: value: $(params.mas_instance_id) # Application - Operator - # - name: MAS_AIBROKER_CHANNEL - # value: $(params.mas_aibroker_channel) - name: MAS_APP_CHANNEL - value: $(params.mas_app_channel) + value: $(params.aiservice_channel) # Custom Label Support - name: CUSTOM_LABELS value: $(params.custom_labels) # Opendatahub storage details - - name: MAS_AIBROKER_STORAGE_PROVIDER - value: $(params.mas_aibroker_storage_provider) - - name: MAS_AIBROKER_STORAGE_ACCESSKEY - value: $(params.mas_aibroker_storage_accesskey) - - name: MAS_AIBROKER_STORAGE_SECRETKEY - value: $(params.mas_aibroker_storage_secretkey) - - name: MAS_AIBROKER_STORAGE_HOST - value: $(params.mas_aibroker_storage_host) - - name: MAS_AIBROKER_STORAGE_PORT - value: $(params.mas_aibroker_storage_port) - - name: MAS_AIBROKER_STORAGE_SSL - value: $(params.mas_aibroker_storage_ssl) - - name: MAS_AIBROKER_STORAGE_REGION - value: $(params.mas_aibroker_storage_region) - - name: MAS_AIBROKER_STORAGE_PIPELINES_BUCKET - value: $(params.mas_aibroker_storage_pipelines_bucket) - - name: MAS_AIBROKER_STORAGE_TENANTS_BUCKET - value: $(params.mas_aibroker_storage_tenants_bucket) - - name: MAS_AIBROKER_STORAGE_TEMPLATES_BUCKET - value: $(params.mas_aibroker_storage_templates_bucket) - - name: MAS_AIBROKER_TENANT_NAME - value: $(params.mas_aibroker_tenant_name) - - # MariaDB details - - name: MAS_AIBROKER_DB_HOST - value: $(params.mas_aibroker_db_host) - - name: MAS_AIBROKER_DB_PORT - value: $(params.mas_aibroker_db_port) - - name: MAS_AIBROKER_DB_USER - value: $(params.mas_aibroker_db_user) - - name: MAS_AIBROKER_DB_DATABASE - value: $(params.mas_aibroker_db_database) - - name: MAS_AIBROKER_DB_SECRET_NAME - value: $(params.mas_aibroker_db_secret_name) - - name: MAS_AIBROKER_DB_SECRET_KEY - value: $(params.mas_aibroker_db_secret_key) - - name: MAS_AIBROKER_DB_SECRET_VALUE - value: $(params.mas_aibroker_db_secret_value) + - name: AISERVICE_STORAGE_PROVIDER + value: $(params.aiservice_storage_provider) + - name: AISERVICE_STORAGE_ACCESSKEY + value: $(params.aiservice_storage_accesskey) + - name: AISERVICE_STORAGE_SECRETKEY + value: $(params.aiservice_storage_secretkey) + - name: AISERVICE_STORAGE_HOST + value: $(params.aiservice_storage_host) + - name: AISERVICE_STORAGE_PORT + value: $(params.aiservice_storage_port) + - name: AISERVICE_STORAGE_SSL + value: $(params.aiservice_storage_ssl) + - name: AISERVICE_STORAGE_REGION + value: $(params.aiservice_storage_region) + - name: AISERVICE_STORAGE_PIPELINES_BUCKET + value: $(params.aiservice_storage_pipelines_bucket) + - name: AISERVICE_STORAGE_TENANTS_BUCKET + value: $(params.aiservice_storage_tenants_bucket) + - name: AISERVICE_STORAGE_TEMPLATES_BUCKET + value: $(params.aiservice_storage_templates_bucket) steps: - - name: odh + - name: aiservice-odh command: - /opt/app-root/src/run-role.sh - - odh + - aiservice_odh image: quay.io/ibmmas/cli:latest imagePullPolicy: $(params.image_pull_policy)