From 94c5393da96c65140c2a999cc87252cbb9d077d5 Mon Sep 17 00:00:00 2001 From: nehasangwai-ibm Date: Mon, 13 Apr 2026 23:20:51 +0530 Subject: [PATCH] [patch] Revert changes added for collaborate addon --- .github/workflows/verify-cli-pr.yml | 2 +- python/src/mas/cli/install/app.py | 18 ----- python/src/mas/cli/install/argBuilder.py | 5 -- python/src/mas/cli/install/argParser.py | 12 ---- .../src/mas/cli/install/settings/__init__.py | 3 +- .../cli/install/settings/manageSettings.py | 4 -- .../mas/cli/install/settings/redisSettings.py | 70 ------------------- python/src/mas/cli/install/summarizer.py | 8 --- tekton/generate-tekton-tasks.yml | 2 - tekton/src/params/install.yml.j2 | 15 ---- tekton/src/pipelines/mas-install.yml.j2 | 20 ++---- .../taskdefs/dependencies/redis.yml.j2 | 30 -------- tekton/src/tasks/dependencies/redis.yml.j2 | 64 ----------------- 13 files changed, 9 insertions(+), 244 deletions(-) delete mode 100644 python/src/mas/cli/install/settings/redisSettings.py delete mode 100644 tekton/src/pipelines/taskdefs/dependencies/redis.yml.j2 delete mode 100644 tekton/src/tasks/dependencies/redis.yml.j2 diff --git a/.github/workflows/verify-cli-pr.yml b/.github/workflows/verify-cli-pr.yml index 61d577adc93..ce17dde3265 100644 --- a/.github/workflows/verify-cli-pr.yml +++ b/.github/workflows/verify-cli-pr.yml @@ -28,4 +28,4 @@ jobs: echo "Found local Python package ($GITHUB_WORKSPACE/image/cli/install/mas_devops.tar.gz) in this PR, Local package is not allowed in the master branch." RC=1 fi - exit $RC \ No newline at end of file + exit $RC diff --git a/python/src/mas/cli/install/app.py b/python/src/mas/cli/install/app.py index d1d508ec61a..e1395166975 100644 --- a/python/src/mas/cli/install/app.py +++ b/python/src/mas/cli/install/app.py @@ -846,11 +846,7 @@ def configSNO(self): if self.isSNO(): self.setParam("mongodb_replicas", "1") self.setParam("mongodb_cpu_requests", "500m") - self.setParam("redis_replicas", "1") self.setParam("mas_app_settings_aio_flag", "false") - else: - # Multi-node cluster: use 3 replicas for Redis HA - self.setParam("redis_replicas", "3") @logMethodCall def configDNSAndCerts(self): @@ -1722,12 +1718,6 @@ def nonInteractiveMode(self) -> None: if value is not None and value != "": self.setParam(key, value) self.setParam("sls_mongodb_cfg_file", f"/workspace/configs/mongo-{value}.yml") - # Redis - elif key == "redis_namespace": - if value is not None and value != "": - self.setParam(key, value) - self.setParam("redis_action", "install") - self.setParam("redis_cfg_file", f"/workspace/configs/redis-{value}.yml") # SLS elif key == "license_file": @@ -1880,14 +1870,6 @@ def nonInteractiveMode(self) -> None: if ((self.getParam("mas_app_channel_predict") is not None and self.getParam("mas_app_channel_predict") != "") and 'health' not in self.getParam("mas_appws_components")): self.fatalError("--manage-components must include 'health' component when installing Predict") - # Configure Redis if Collaborate addon is enabled - if self.installManage and "collaborate=" in self.getParam("mas_appws_components"): - logger.debug("Collaborate addon detected in mas_appws_components, configuring Redis") - self.setParam("redis_action", "install") - if self.getParam("redis_namespace") == "": - self.setParam("redis_namespace", "redis") - self.setParam("redis_cfg_file", f"/workspace/configs/redis-{self.getParam('redis_namespace')}.yml") - # Validate ArcGIS installation requirements in non-interactive mode if self.installArcgis: hasSpatial = self.installManage and "spatial=" in self.getParam("mas_appws_components") diff --git a/python/src/mas/cli/install/argBuilder.py b/python/src/mas/cli/install/argBuilder.py index f98855a74b6..eeb9891f69d 100644 --- a/python/src/mas/cli/install/argBuilder.py +++ b/python/src/mas/cli/install/argBuilder.py @@ -180,11 +180,6 @@ def buildCommand(self) -> str: if self.getParam('mongodb_namespace') != "": command += f" --mongodb-namespace \"{self.getParam('mongodb_namespace')}\"{newline}" - # Redis Configuration - # ----------------------------------------------------------------------------- - if self.getParam('redis_namespace') != "": - command += f" --redis-namespace \"{self.getParam('redis_namespace')}\"{newline}" - # OCP Configuration # ----------------------------------------------------------------------------- if self.getParam('ocp_ingress_tls_secret_name') != "": diff --git a/python/src/mas/cli/install/argParser.py b/python/src/mas/cli/install/argParser.py index 5d0e9e712c6..ff0134a245c 100644 --- a/python/src/mas/cli/install/argParser.py +++ b/python/src/mas/cli/install/argParser.py @@ -423,18 +423,6 @@ def isValidFile(parser: argparse.ArgumentParser, arg: str) -> str: help="Namespace for MongoDB Community Operator" ) -# Redis Configuration -# ----------------------------------------------------------------------------- -redisArgGroup = installArgParser.add_argument_group( - "Redis", - "Configure the namespace for Redis deployment (required for Collaborate addon)." -) -redisArgGroup.add_argument( - "--redis-namespace", - required=False, - help="Namespace for Redis deployment (default: redis)" -) - # OCP Configuration # ----------------------------------------------------------------------------- ocpArgGroup = installArgParser.add_argument_group( diff --git a/python/src/mas/cli/install/settings/__init__.py b/python/src/mas/cli/install/settings/__init__.py index 5dc7a68e8d8..5f6b0de29da 100644 --- a/python/src/mas/cli/install/settings/__init__.py +++ b/python/src/mas/cli/install/settings/__init__.py @@ -10,13 +10,12 @@ from .db2Settings import Db2SettingsMixin from .mongodbSettings import MongoDbSettingsMixin -from .redisSettings import RedisSettingsMixin from .kafkaSettings import KafkaSettingsMixin from .manageSettings import ManageSettingsMixin from .additionalConfigs import AdditionalConfigsMixin -class InstallSettingsMixin(Db2SettingsMixin, MongoDbSettingsMixin, RedisSettingsMixin, KafkaSettingsMixin, ManageSettingsMixin, AdditionalConfigsMixin): +class InstallSettingsMixin(Db2SettingsMixin, MongoDbSettingsMixin, KafkaSettingsMixin, ManageSettingsMixin, AdditionalConfigsMixin): """ This class collects all the Mixins providing interactive prompts for mas-install """ diff --git a/python/src/mas/cli/install/settings/manageSettings.py b/python/src/mas/cli/install/settings/manageSettings.py index 3fac6f84c4a..7f006559cf6 100644 --- a/python/src/mas/cli/install/settings/manageSettings.py +++ b/python/src/mas/cli/install/settings/manageSettings.py @@ -176,10 +176,6 @@ def manageSettingsComponents(self) -> None: self.params["mas_appws_components"] += ",aip=latest" if self.yesOrNo(" - Vegetation Management"): self.params["mas_appws_components"] += ",vegm=latest" - if self.yesOrNo(" - Collaborate"): - self.params["mas_appws_components"] += ",collaborate=latest" - # Configure Redis for Collaborate addon - self.configRedis() logger.debug(f"Generated mas_appws_components = {self.params['mas_appws_components']}") if ",icd=" in self.params["mas_appws_components"]: diff --git a/python/src/mas/cli/install/settings/redisSettings.py b/python/src/mas/cli/install/settings/redisSettings.py deleted file mode 100644 index 64e30d17365..00000000000 --- a/python/src/mas/cli/install/settings/redisSettings.py +++ /dev/null @@ -1,70 +0,0 @@ -# ***************************************************************************** -# Copyright (c) 2024, 2026 IBM Corporation and other Contributors. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# ***************************************************************************** - -from typing import TYPE_CHECKING, Dict, List - - -if TYPE_CHECKING: - from prompt_toolkit.completion import WordCompleter - from prompt_toolkit.validation import Validator - - -class RedisSettingsMixin(): - if TYPE_CHECKING: - # Attributes from BaseApp and other mixins - params: Dict[str, str] - showAdvancedOptions: bool - - # Methods from BaseApp - def setParam(self, param: str, value: str) -> None: - ... - - def getParam(self, param: str) -> str: - ... - - # Methods from PrintMixin - def printH1(self, message: str) -> None: - ... - - def printDescription(self, content: List[str]) -> None: - ... - - # Methods from PromptMixin - def promptForString( - self, - message: str, - param: str | None = None, - default: str = "", - isPassword: bool = False, - validator: Validator | None = None, - completer: WordCompleter | None = None - ) -> str: - ... - - def configRedis(self) -> None: - """ - Configure Redis for Collaborate addon. - Redis will be deployed automatically when Collaborate is enabled. - """ - self.printH1("Configure Redis for Collaborate") - self.printDescription([ - "Redis is required for the Collaborate addon to support caching.", - "The installer will automatically deploy Redis with high availability (Sentinel + HAProxy)." - ]) - - if self.showAdvancedOptions: - self.promptForString("Redis namespace", "redis_namespace", default="redis") - else: - # Use default namespace - self.setParam("redis_namespace", "redis") - - # Always install Redis when Collaborate is enabled - self.setParam("redis_action", "install") - self.setParam("redis_cfg_file", f"/workspace/configs/redis-{self.getParam('redis_namespace')}.yml") diff --git a/python/src/mas/cli/install/summarizer.py b/python/src/mas/cli/install/summarizer.py index a7ec9a21173..3de50649aac 100644 --- a/python/src/mas/cli/install/summarizer.py +++ b/python/src/mas/cli/install/summarizer.py @@ -198,7 +198,6 @@ def manageSummary(self) -> None: self.printSummary(" + Workday Applications", "Enabled" if "workday=" in self.getParam("mas_appws_components") else "Disabled") self.printSummary(" + AIP", "Enabled" if "aip=" in self.getParam("mas_appws_components") else "Disabled") self.printSummary(" + Vegetation Management", "Enabled" if "vegm=" in self.getParam("mas_appws_components") else "Disabled") - self.printSummary(" + Collaborate", "Enabled" if "collaborate=" in self.getParam("mas_appws_components") else "Disabled") self.printParamSummary("+ Upgrade Type", "mas_appws_upgrade_type") @@ -376,12 +375,6 @@ def mongoSummary(self) -> None: else: self.fatalError(f"Unexpected value for mongodb_action parameter: {self.getParam('mongodb_action')}") - def redisSummary(self) -> None: - if self.getParam("redis_action") == "install": - self.printH2("Redis") - self.printSummary("Type", "Redis with Sentinel HA") - self.printParamSummary("Install Namespace", "redis_namespace") - def kafkaSummary(self) -> None: if self.getParam("kafka_action_system") != "": self.printH2("Kafka") @@ -452,7 +445,6 @@ def displayInstallSummary(self) -> None: # Application Dependencies self.mongoSummary() - self.redisSummary() self.db2Summary() self.cosSummary() self.kafkaSummary() diff --git a/tekton/generate-tekton-tasks.yml b/tekton/generate-tekton-tasks.yml index 12392eebade..3518e1ce5e8 100644 --- a/tekton/generate-tekton-tasks.yml +++ b/tekton/generate-tekton-tasks.yml @@ -38,8 +38,6 @@ - mongodb - nvidia-gpu - ocs - - redis - - rhoai-migration - sls-registry-update - sls - turbonomic diff --git a/tekton/src/params/install.yml.j2 b/tekton/src/params/install.yml.j2 index 1bce85e8d0b..a08c963ca96 100644 --- a/tekton/src/params/install.yml.j2 +++ b/tekton/src/params/install.yml.j2 @@ -90,21 +90,6 @@ type: string description: IBM Cloud MongoDb admin password default: "" -# Dependencies - Redis -# ----------------------------------------------------------------------------- -- name: redis_namespace - type: string - description: Redis namespace - default: "" -- name: redis_replicas - type: string - description: Redis replicas - default: "" -- name: redis_action - type: string - description: Redis action - default: "" - # Dependencies (Kafka) - General variables - name: kafka_action_system diff --git a/tekton/src/pipelines/mas-install.yml.j2 b/tekton/src/pipelines/mas-install.yml.j2 index 74cd075f8b2..5cbf23660ea 100644 --- a/tekton/src/pipelines/mas-install.yml.j2 +++ b/tekton/src/pipelines/mas-install.yml.j2 @@ -107,40 +107,34 @@ spec: - cert-manager - grafana - # 2.2 Redis - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/redis.yml.j2') | indent(4) }} - runAfter: - - cert-manager - - grafana - - # 2.3 Kafka + # 2.2 Kafka {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/kafka.yml.j2') | indent(4) }} runAfter: - grafana - # 2.4 Db2 - # 2.4.1 System Db2 + # 2.3 Db2 + # 2.3.1 System Db2 {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/db2.yml.j2', template_vars={'suffix': 'system'}) | indent(4) }} runAfter: - cert-manager - # 2.4.2 Dedicated Manage Db2 + # 2.3.2 Dedicated Manage Db2 {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/db2.yml.j2', template_vars={'suffix': 'manage'}) | indent(4) }} runAfter: - db2-system - # 2.4.3 Install Dedicated Db2 for AI Service + # 2.3.3 Install Dedicated Db2 for AI Service # ------------------------------------------------------------------------- {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/db2.yml.j2', template_vars={'suffix': 'aiservice'}) | indent(4) }} runAfter: - cert-manager - # 2.5 IBM SLS + # 2.4 IBM SLS {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/sls.yml.j2') | indent(4) }} runAfter: - mongodb - # 2.6 DRO + # 2.5 DRO {{ lookup('template', pipeline_src_dir ~ '/taskdefs/dependencies/dro.yml.j2') | indent(4) }} runAfter: - ibm-catalogs diff --git a/tekton/src/pipelines/taskdefs/dependencies/redis.yml.j2 b/tekton/src/pipelines/taskdefs/dependencies/redis.yml.j2 deleted file mode 100644 index 666a699c181..00000000000 --- a/tekton/src/pipelines/taskdefs/dependencies/redis.yml.j2 +++ /dev/null @@ -1,30 +0,0 @@ -- name: redis - timeout: "0" - params: - {{ lookup('template', pipeline_src_dir ~ '/taskdefs/common/cli-params.yml.j2') | indent(4) }} - - name: devops_suite_name - value: dependencies-redis - - - name: mas_instance_id - value: $(params.mas_instance_id) - - - name: redis_namespace - value: $(params.redis_namespace) - - name: redis_replicas - value: $(params.redis_replicas) - - name: custom_labels - value: $(params.custom_labels) - - name: redis_action - value: $(params.redis_action) - - when: - - input: "$(params.redis_action)" - operator: in - values: ["install"] - - taskRef: - kind: Task - name: mas-devops-redis - workspaces: - - name: configs - workspace: shared-configs \ No newline at end of file diff --git a/tekton/src/tasks/dependencies/redis.yml.j2 b/tekton/src/tasks/dependencies/redis.yml.j2 deleted file mode 100644 index 1383723d1d0..00000000000 --- a/tekton/src/tasks/dependencies/redis.yml.j2 +++ /dev/null @@ -1,64 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: mas-devops-redis -spec: - params: - {{ lookup('template', task_src_dir ~ '/common/cli-params.yml.j2') | indent(4) }} - - - name: mas_instance_id - type: string - description: Instance ID - default: "" - - name: custom_labels - type: string - description: Optional MAS custom labels, comma separated list of key=value pairs - default: "" - - # Redis parameters - - name: redis_namespace - type: string - description: Redis namespace - default: "" - - name: redis_replicas - type: string - description: Redis replicas - default: "" - - name: redis_action - type: string - description: Optional. Used to control Redis installation - default: "" - - stepTemplate: - env: - {{ lookup('template', task_src_dir ~ '/common/cli-env.yml.j2') | indent(6) }} - - # General - - name: MAS_CONFIG_DIR - value: /workspace/configs - - name: MAS_INSTANCE_ID - value: $(params.mas_instance_id) - - name: CUSTOM_LABELS - value: $(params.custom_labels) - - # Redis parameters - - name: REDIS_NAMESPACE - value: $(params.redis_namespace) - - name: REDIS_REPLICAS - value: $(params.redis_replicas) - - name: REDIS_ACTION - value: $(params.redis_action) - - steps: - - name: redis - command: - - /opt/app-root/src/run-role.sh - - redis - image: quay.io/ibmmas/cli:latest - imagePullPolicy: $(params.image_pull_policy) - workingDir: /workspace/configs - - workspaces: - - name: configs - optional: true