From dab8308122be1ff78b3ad1a876581ce038b8e437 Mon Sep 17 00:00:00 2001 From: Ritika Patil <94649368+riragh@users.noreply.github.com> Date: Mon, 14 Oct 2024 11:47:59 -0500 Subject: [PATCH] feat: (PSKD-729) Removed experimental Azure Service Bus support (#577) --- roles/common/tasks/main.yaml | 24 -------- roles/vdm/defaults/main.yaml | 6 -- roles/vdm/tasks/main.yaml | 10 ---- roles/vdm/tasks/message_broker.yaml | 86 ----------------------------- 4 files changed, 126 deletions(-) delete mode 100644 roles/vdm/tasks/message_broker.yaml diff --git a/roles/common/tasks/main.yaml b/roles/common/tasks/main.yaml index 3bc4b194..5294bf12 100644 --- a/roles/common/tasks/main.yaml +++ b/roles/common/tasks/main.yaml @@ -256,30 +256,6 @@ - tfstate.cluster_api_mode is defined - tfstate.cluster_api_mode.value|length > 0 - V4_CFG_INGRESS_MODE is not defined - - name: tfstate - azure message broker host # noqa: name[casing] - set_fact: - V4_CFG_MESSAGE_BROKER_HOST: "{{ tfstate.message_broker_hostname.value }}" - when: - - PROVIDER == "azure" - - tfstate.message_broker_hostname is defined - - tfstate.message_broker_hostname.value|length > 0 - - V4_CFG_MESSAGE_BROKER_HOST is not defined - - name: tfstate - azure message broker name # noqa: name[casing] - set_fact: - V4_CFG_MESSAGE_BROKER_NAME: "{{ tfstate.message_broker_name.value }}" - when: - - PROVIDER == "azure" - - tfstate.message_broker_name is defined - - tfstate.message_broker_name.value|length > 0 - - V4_CFG_MESSAGE_BROKER_NAME is not defined - - name: tfstate - azure message broker primary_key # noqa: name[casing] - set_fact: - V4_CFG_MESSAGE_BROKER_PASSWORD: "{{ tfstate.message_broker_primary_key.value }}" - when: - - PROVIDER == "azure" - - tfstate.message_broker_primary_key is defined - - tfstate.message_broker_primary_key.value|length > 0 - - V4_CFG_MESSAGE_BROKER_PASSWORD is not defined - name: tfstate - set tfstate to empty string # noqa: name[casing] set_fact: tfstate: "" diff --git a/roles/vdm/defaults/main.yaml b/roles/vdm/defaults/main.yaml index 1df50dc7..028031f6 100644 --- a/roles/vdm/defaults/main.yaml +++ b/roles/vdm/defaults/main.yaml @@ -106,12 +106,6 @@ V4_DEPLOYMENT_OPERATOR_CRB: sasoperator ## Setting true enables using custom du for below the line testing V4_CFG_BELOW_THE_LINE: false -## Message Broker - Experimental -V4_CFG_MESSAGE_BROKER_ENABLE: false -V4_CFG_MESSAGE_BROKER_HOST: null -V4_CFG_MESSAGE_BROKER_NAME: null -V4_CFG_MESSAGE_BROKER_PASSWORD: null - ## SAS Workload Orchestrator V4_WORKLOAD_ORCHESTRATOR_ENABLED: true diff --git a/roles/vdm/tasks/main.yaml b/roles/vdm/tasks/main.yaml index b3fcb44f..4892df22 100644 --- a/roles/vdm/tasks/main.yaml +++ b/roles/vdm/tasks/main.yaml @@ -204,16 +204,6 @@ - uninstall - update -- name: Include Message broker - include_tasks: message_broker.yaml - when: - - PROVIDER == "azure" - - V4_CFG_MESSAGE_BROKER_ENABLE - tags: - - install - - uninstall - - update - - name: Include Kustomize include_tasks: kustomize.yaml tags: diff --git a/roles/vdm/tasks/message_broker.yaml b/roles/vdm/tasks/message_broker.yaml deleted file mode 100644 index 18a23c8c..00000000 --- a/roles/vdm/tasks/message_broker.yaml +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright © 2020-2024, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. -# SPDX-License-Identifier: Apache-2.0 - ---- -- name: Message Broker - check sitedefault.yaml exists - stat: - path: "{{ DEPLOY_DIR }}/site-config/sitedefault.yaml" - register: stat_result - tags: - - install - - uninstall - - update - -- name: Message Broker - check message broker values present - ansible.builtin.fail: - msg: > - Message Broker - Azure Service Bus enabled but one or all of the expected variables: - V4_CFG_MESSAGE_BROKER_HOST, V4_CFG_MESSAGE_BROKER_NAME and V4_CFG_MESSAGE_BROKER_PASSWORD are missing. - when: - - V4_CFG_MESSAGE_BROKER_HOST is none or V4_CFG_MESSAGE_BROKER_NAME is none or V4_CFG_MESSAGE_BROKER_PASSWORD is none - tags: - - install - - uninstall - - update - -- name: Update site-default with message broker details - lineinfile: - path: "{{ DEPLOY_DIR }}/site-config/sitedefault.yaml" - line: "{{ item.line }}" - state: present - insertafter: EOF - with_items: - - { line: 'config/application/sas.event.arke.broker/type: {{ PROVIDER }}' } - - { line: 'config/application/sas.event.arke.broker/host: {{ V4_CFG_MESSAGE_BROKER_HOST }}' } - - { line: 'config/application/sas.event.arke.broker/port: 8000' } - - { line: 'config/application/sas.event.arke.broker/username: {{ V4_CFG_MESSAGE_BROKER_NAME }}' } - - { line: 'config/application/sas.event.arke.broker/password: {{ V4_CFG_MESSAGE_BROKER_PASSWORD }}' } - when: stat_result.stat.exists - tags: - - install - - uninstall - - update - -- name: Message Broker - check Rabbitmq configuration file is present - stat: - path: "{{ DEPLOY_DIR }}/sas-bases/examples/rabbitmq/configuration/rabbitmq-node-count.yaml" - register: rabbitmq_config - tags: - - install - - uninstall - - update - -- name: Message Broker - copy rabbitmq config file - copy: - src: "{{ DEPLOY_DIR }}/sas-bases/examples/rabbitmq/configuration/rabbitmq-node-count.yaml" - dest: "{{ role_path }}/templates/transformers/rabbitmq-node-count.yaml" - mode: "0660" - when: rabbitmq_config.stat.exists - tags: - - install - - uninstall - - update - -- name: Message Broker - scale Rabbitmq to 0 replicas - replace: - path: "{{ role_path }}/templates/transformers/rabbitmq-node-count.yaml" - regexp: "{% raw %}{{ NUMBER-OF-NODES }}{% endraw %}" - replace: "0" - when: rabbitmq_config.stat.exists - tags: - - install - - uninstall - - update - -- name: Message Broker - add resource - overlay_facts: - cadence_name: "{{ V4_CFG_CADENCE_NAME }}" - cadence_number: "{{ V4_CFG_CADENCE_VERSION }}" - existing: "{{ vdm_overlays }}" - add: - - { transformers: "rabbitmq-node-count.yaml", vdm: true} - when: rabbitmq_config.stat.exists - tags: - - install - - uninstall - - update