From b837fdc8f0ac8aab67a4af0fcf7103a26ab02bf9 Mon Sep 17 00:00:00 2001 From: rameshiyer27 Date: Mon, 29 Jul 2024 08:14:34 +0000 Subject: Use spring profiles for legacy configurations in regression Issue-ID: POLICY-5077 Signed-off-by: zrrmmua Change-Id: I76a33d684db3d4cb02c23d34d4b132ebf1f9853c --- compose/config/clamp/AcRuntimeParameters.yaml | 31 +++++++++ .../config/clamp/HttpParticipantParameters.yaml | 26 ++++++++ .../clamp/KubernetesParticipantParameters.yaml | 28 ++++++++ .../config/clamp/PolicyParticipantParameters.yaml | 28 ++++++++ .../clamp/SimulatorParticipantParameters.yaml | 28 +++++++- .../config/clamp/legacy/AcRuntimeParameters.yaml | 74 ---------------------- .../clamp/legacy/HttpParticipantParameters.yaml | 45 ------------- .../legacy/KubernetesParticipantParameters.yaml | 66 ------------------- .../clamp/legacy/PolicyParticipantParameters.yaml | 63 ------------------ .../legacy/SimulatorParticipantParameters.yaml | 50 --------------- 10 files changed, 140 insertions(+), 299 deletions(-) delete mode 100644 compose/config/clamp/legacy/AcRuntimeParameters.yaml delete mode 100644 compose/config/clamp/legacy/HttpParticipantParameters.yaml delete mode 100644 compose/config/clamp/legacy/KubernetesParticipantParameters.yaml delete mode 100644 compose/config/clamp/legacy/PolicyParticipantParameters.yaml delete mode 100644 compose/config/clamp/legacy/SimulatorParticipantParameters.yaml (limited to 'compose/config') diff --git a/compose/config/clamp/AcRuntimeParameters.yaml b/compose/config/clamp/AcRuntimeParameters.yaml index dbcbc562..f2ef511a 100644 --- a/compose/config/clamp/AcRuntimeParameters.yaml +++ b/compose/config/clamp/AcRuntimeParameters.yaml @@ -113,3 +113,34 @@ tracing: sampler: jaeger-remote: endpoint: http://jaeger:14250 + +# legacy config +--- + +spring: + config: + activate: + on-profile: legacy +runtime: + participantParameters: + heartBeatMs: 20000 + maxStatusWaitMs: 200000 + topicParameterGroup: + topicSources: + - + topic: policy-acruntime-participant + servers: + - ${topicServer:kafka:9092} + topicCommInfrastructure: kafka + fetchTimeout: 15000 + useHttps: false + topicSinks: + - + topic: policy-acruntime-participant + servers: + - ${topicServer:kafka:9092} + topicCommInfrastructure: kafka + useHttps: false + acmParameters: + toscaElementName: org.onap.policy.clamp.acm.AutomationCompositionElement + toscaCompositionName: org.onap.policy.clamp.acm.AutomationComposition diff --git a/compose/config/clamp/HttpParticipantParameters.yaml b/compose/config/clamp/HttpParticipantParameters.yaml index 62e309c3..9f9e2f0f 100644 --- a/compose/config/clamp/HttpParticipantParameters.yaml +++ b/compose/config/clamp/HttpParticipantParameters.yaml @@ -73,3 +73,29 @@ tracing: sampler: jaeger-remote: endpoint: http://jaeger:14250 + +# legacy config +--- + +spring: + config: + activate: + on-profile: legacy +participant: + intermediaryParameters: + reportingTimeIntervalMs: 120000 + participantId: 101c62b3-8918-41b9-a747-d21eb79c6c01 + clampAutomationCompositionTopics: + topicSources: + - topic: policy-acruntime-participant + servers: + - ${topicServer:kafka:9092} + topicCommInfrastructure: kafka + fetchTimeout: 15000 + useHttps: false + topicSinks: + - topic: policy-acruntime-participant + servers: + - ${topicServer:kafka:9092} + topicCommInfrastructure: kafka + useHttps: false diff --git a/compose/config/clamp/KubernetesParticipantParameters.yaml b/compose/config/clamp/KubernetesParticipantParameters.yaml index 76ae9696..ab96f51c 100644 --- a/compose/config/clamp/KubernetesParticipantParameters.yaml +++ b/compose/config/clamp/KubernetesParticipantParameters.yaml @@ -87,3 +87,31 @@ logging: chart: api: enabled: false + +# legacy config +--- + +spring: + config: + activate: + on-profile: legacy +participant: + intermediaryParameters: + reportingTimeIntervalMs: 120000 + participantId: 101c62b3-8918-41b9-a747-d21eb79c6c02 + clampAutomationCompositionTopics: + topicSources: + - + topic: policy-acruntime-participant + servers: + - ${topicServer:kafka:9092} + topicCommInfrastructure: kafka + fetchTimeout: 15000 + useHttps: false + topicSinks: + - + topic: policy-acruntime-participant + servers: + - ${topicServer:kafka:9092} + topicCommInfrastructure: kafka + useHttps: false diff --git a/compose/config/clamp/PolicyParticipantParameters.yaml b/compose/config/clamp/PolicyParticipantParameters.yaml index a65eeb03..c7af9dd1 100644 --- a/compose/config/clamp/PolicyParticipantParameters.yaml +++ b/compose/config/clamp/PolicyParticipantParameters.yaml @@ -84,3 +84,31 @@ server: enabled: false servlet: context-path: /onap/policy/clamp/acm/policyparticipant + +# legacy config +--- + +spring: + config: + activate: + on-profile: legacy +participant: + intermediaryParameters: + reportingTimeIntervalMs: 120000 + participantId: 101c62b3-8918-41b9-a747-d21eb79c6c03 + clampAutomationCompositionTopics: + topicSources: + - + topic: policy-acruntime-participant + servers: + - ${topicServer:kafka:9092} + topicCommInfrastructure: kafka + fetchTimeout: 15000 + useHttps: false + topicSinks: + - + topic: policy-acruntime-participant + servers: + - ${topicServer:kafka:9092} + topicCommInfrastructure: kafka + useHttps: false diff --git a/compose/config/clamp/SimulatorParticipantParameters.yaml b/compose/config/clamp/SimulatorParticipantParameters.yaml index 6f6a5131..996404f4 100644 --- a/compose/config/clamp/SimulatorParticipantParameters.yaml +++ b/compose/config/clamp/SimulatorParticipantParameters.yaml @@ -77,4 +77,30 @@ tracing: protocol: http sampler: jaeger-remote: - endpoint: http://jaeger:14250 \ No newline at end of file + endpoint: http://jaeger:14250 + +# legacy config +--- + +spring: + config: + activate: + on-profile: legacy +participant: + intermediaryParameters: + reportingTimeIntervalMs: 120000 + participantId: ${participantId:101c62b3-8918-41b9-a747-d21eb79c6c90} + clampAutomationCompositionTopics: + topicSources: + - topic: policy-acruntime-participant + servers: + - ${topicServer:kafka:9092} + topicCommInfrastructure: kafka + fetchTimeout: 15000 + useHttps: false + topicSinks: + - topic: policy-acruntime-participant + servers: + - ${topicServer:kafka:9092} + topicCommInfrastructure: kafka + useHttps: false diff --git a/compose/config/clamp/legacy/AcRuntimeParameters.yaml b/compose/config/clamp/legacy/AcRuntimeParameters.yaml deleted file mode 100644 index 656b3f9f..00000000 --- a/compose/config/clamp/legacy/AcRuntimeParameters.yaml +++ /dev/null @@ -1,74 +0,0 @@ -spring: - security: - user: - name: runtimeUser - password: zb!XztG34 - mvc: - converters: - preferred-json-mapper: gson - datasource: - url: jdbc:mariadb://${mariadb.host:mariadb}:${mariadb.port:3306}/clampacm - driverClassName: org.mariadb.jdbc.Driver - username: policy_user - password: policy_user - hikari: - connectionTimeout: 30000 - idleTimeout: 600000 - maxLifetime: 1800000 - maximumPoolSize: 10 - jpa: - hibernate: - ddl-auto: none - naming: - physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl - implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy - properties: - hibernate: - format_sql: true - -security: - enable-csrf: false - -server: - servlet: - context-path: /onap/policy/clamp/acm - port: 6969 - ssl: - enabled: false - error: - path: /error - -runtime: - participantParameters: - heartBeatMs: 20000 - maxStatusWaitMs: 200000 - topicParameterGroup: - topicSources: - - - topic: policy-acruntime-participant - servers: - - ${topicServer:kafka:9092} - topicCommInfrastructure: kafka - fetchTimeout: 15000 - useHttps: false - topicSinks: - - - topic: policy-acruntime-participant - servers: - - ${topicServer:kafka:9092} - topicCommInfrastructure: kafka - useHttps: false - acmParameters: - toscaElementName: org.onap.policy.clamp.acm.AutomationCompositionElement - toscaCompositionName: org.onap.policy.clamp.acm.AutomationComposition - -management: - endpoints: - web: - base-path: / - exposure: - include: health, metrics, prometheus - -metrics: - security: - disabled: false diff --git a/compose/config/clamp/legacy/HttpParticipantParameters.yaml b/compose/config/clamp/legacy/HttpParticipantParameters.yaml deleted file mode 100644 index a26a81d0..00000000 --- a/compose/config/clamp/legacy/HttpParticipantParameters.yaml +++ /dev/null @@ -1,45 +0,0 @@ -spring: - security: - user: - name: participantUser - password: zb!XztG34 - autoconfigure: - exclude: > - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration -security: - enable-csrf: false -participant: - intermediaryParameters: - reportingTimeIntervalMs: 120000 - description: Participant Description - participantId: 101c62b3-8918-41b9-a747-d21eb79c6c01 - clampAutomationCompositionTopics: - topicSources: - - topic: policy-acruntime-participant - servers: - - ${topicServer:kafka:9092} - topicCommInfrastructure: kafka - fetchTimeout: 15000 - useHttps: false - topicSinks: - - topic: policy-acruntime-participant - servers: - - ${topicServer:kafka:9092} - topicCommInfrastructure: kafka - useHttps: false - participantSupportedElementTypes: - - typeName: org.onap.policy.clamp.acm.HttpAutomationCompositionElement - typeVersion: 1.0.0 -management: - endpoints: - web: - exposure: - include: health, metrics, prometheus -server: - port: 6969 - ssl: - enabled: false - servlet: - context-path: /onap/policy/clamp/acm/httpparticipant diff --git a/compose/config/clamp/legacy/KubernetesParticipantParameters.yaml b/compose/config/clamp/legacy/KubernetesParticipantParameters.yaml deleted file mode 100644 index 449e9617..00000000 --- a/compose/config/clamp/legacy/KubernetesParticipantParameters.yaml +++ /dev/null @@ -1,66 +0,0 @@ -spring: - security: - user: - name: participantUser - password: zb!XztG34 - autoconfigure: - exclude: > - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration -security: - enable-csrf: false - -participant: - localChartDirectory: /home/policy/local-charts - infoFileName: CHART_INFO.json - intermediaryParameters: - reportingTimeIntervalMs: 120000 - description: Participant Description - participantId: 101c62b3-8918-41b9-a747-d21eb79c6c02 - clampAutomationCompositionTopics: - topicSources: - - - topic: policy-acruntime-participant - servers: - - ${topicServer:kafka:9092} - topicCommInfrastructure: kafka - fetchTimeout: 15000 - useHttps: false - topicSinks: - - - topic: policy-acruntime-participant - servers: - - ${topicServer:kafka:9092} - topicCommInfrastructure: kafka - useHttps: false - participantSupportedElementTypes: - - typeName: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement - typeVersion: 1.0.0 - -management: - endpoints: - web: - exposure: - include: health, metrics, prometheus -server: - port: 6969 - ssl: - enabled: false - servlet: - context-path: /onap/policy/clamp/acm/k8sparticipant - -logging: - # Configuration of logging - level: - ROOT: ERROR - org.springframework: ERROR - org.springframework.data: ERROR - org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR - org.onap.policy.clamp.acm.participant.kubernetes: INFO - file: - name: /var/log/onap/policy/clamp/application.log - -chart: - api: - enabled: false diff --git a/compose/config/clamp/legacy/PolicyParticipantParameters.yaml b/compose/config/clamp/legacy/PolicyParticipantParameters.yaml deleted file mode 100644 index 307e0b60..00000000 --- a/compose/config/clamp/legacy/PolicyParticipantParameters.yaml +++ /dev/null @@ -1,63 +0,0 @@ -spring: - security: - user: - name: participantUser - password: zb!XztG34 - autoconfigure: - exclude: > - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration -participant: - pdpGroup: defaultGroup - pdpType: apex - policyApiParameters: - clientName: api - hostname: policy-api - port: 6969 - userName: policyadmin - password: zb!XztG34 - useHttps: false - allowSelfSignedCerts: true - policyPapParameters: - clientName: pap - hostname: policy-pap - port: 6969 - userName: policyadmin - password: zb!XztG34 - useHttps: false - allowSelfSignedCerts: true - intermediaryParameters: - reportingTimeIntervalMs: 120000 - description: Participant Description - participantId: 101c62b3-8918-41b9-a747-d21eb79c6c03 - clampAutomationCompositionTopics: - topicSources: - - - topic: policy-acruntime-participant - servers: - - ${topicServer:kafka:9092} - topicCommInfrastructure: kafka - fetchTimeout: 15000 - useHttps: false - topicSinks: - - - topic: policy-acruntime-participant - servers: - - ${topicServer:kafka:9092} - topicCommInfrastructure: kafka - useHttps: false - participantSupportedElementTypes: - - typeName: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement - typeVersion: 1.0.0 -management: - endpoints: - web: - exposure: - include: health, metrics, prometheus -server: - port: 6969 - ssl: - enabled: false - servlet: - context-path: /onap/policy/clamp/acm/policyparticipant diff --git a/compose/config/clamp/legacy/SimulatorParticipantParameters.yaml b/compose/config/clamp/legacy/SimulatorParticipantParameters.yaml deleted file mode 100644 index acc1db66..00000000 --- a/compose/config/clamp/legacy/SimulatorParticipantParameters.yaml +++ /dev/null @@ -1,50 +0,0 @@ -spring: - security: - user: - name: participantUser - password: zb!XztG34 - autoconfigure: - exclude: - - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration - - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration - - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration - - org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration - -security: - enable-csrf: false -participant: - intermediaryParameters: - reportingTimeIntervalMs: 120000 - description: Participant Description - participantId: ${participantId:101c62b3-8918-41b9-a747-d21eb79c6c90} - clampAutomationCompositionTopics: - topicSources: - - topic: policy-acruntime-participant - servers: - - ${topicServer:kafka:9092} - topicCommInfrastructure: kafka - fetchTimeout: 15000 - useHttps: false - topicSinks: - - topic: policy-acruntime-participant - servers: - - ${topicServer:kafka:9092} - topicCommInfrastructure: kafka - useHttps: false - participantSupportedElementTypes: - - - typeName: ${supportedElementTypeName:org.onap.policy.clamp.acm.SimAutomationCompositionElement} - typeVersion: ${supportedElementTypeVersion:1.0.0} - -management: - endpoints: - web: - base-path: / - exposure: - include: health, metrics, prometheus -server: - port: 6969 - ssl: - enabled: false - servlet: - context-path: /onap/policy/simparticipant -- cgit 1.2.3-korg