From 45b444a488323b37b442348063f8c5ac8493ce9c Mon Sep 17 00:00:00 2001 From: "adheli.tavares" Date: Tue, 29 Mar 2022 13:52:35 +0100 Subject: sp3 tests update on setup - versions of images updated - fix run_tests with extra slash - add call to metrics on stability and performance tests Issue-ID: POLICY-4006 Change-Id: Idad63e9d256e149b224796c486f7322ecbc6ff61 Signed-off-by: adheli.tavares --- .../main/resources/setup/config/apiParameters.yaml | 82 ++++++++ .../setup/config/jsonConfigs/apiConfigFile.json | 57 ------ .../setup/config/jsonConfigs/dmaapSimConfig.json | 26 +-- .../setup/config/jsonConfigs/papConfigFile.json | 70 ------- .../setup/config/jsonConfigs/papGroups.json | 28 +++ .../setup/config/jsonConfigs/pdpSimConfig.json | 60 +++--- .../main/resources/setup/config/papParameters.yaml | 83 ++++++++ .../setup/distribution/etc/defaultConfig.json | 23 ++- .../resources/setup/distribution/etc/logback.xml | 4 +- .../src/main/resources/setup/docker-compose.yml | 227 +++++++++++---------- .../stability/src/main/resources/setup/start.sh | 11 +- .../stability/src/main/resources/setup/versions.sh | 10 +- .../src/main/resources/testplans/run_test.sh | 4 +- .../testplans/sample_csar_with_apex_policy.csar | Bin 95323 -> 92522 bytes .../src/main/resources/testplans/stability.jmx | 215 +++++++++---------- 15 files changed, 485 insertions(+), 415 deletions(-) create mode 100644 testsuites/stability/src/main/resources/setup/config/apiParameters.yaml delete mode 100644 testsuites/stability/src/main/resources/setup/config/jsonConfigs/apiConfigFile.json delete mode 100644 testsuites/stability/src/main/resources/setup/config/jsonConfigs/papConfigFile.json create mode 100644 testsuites/stability/src/main/resources/setup/config/jsonConfigs/papGroups.json create mode 100644 testsuites/stability/src/main/resources/setup/config/papParameters.yaml (limited to 'testsuites/stability') diff --git a/testsuites/stability/src/main/resources/setup/config/apiParameters.yaml b/testsuites/stability/src/main/resources/setup/config/apiParameters.yaml new file mode 100644 index 00000000..e61653ac --- /dev/null +++ b/testsuites/stability/src/main/resources/setup/config/apiParameters.yaml @@ -0,0 +1,82 @@ +server: + port: 6969 + ssl: + enabled: false + +spring: + security.user: + name: policyadmin + password: zb!XztG34 + mvc.converters.preferred-json-mapper: gson + + datasource: + url: jdbc:mariadb://mariadb:3306/policyadmin + driverClassName: org.mariadb.jdbc.Driver + username: policy_user + password: policy_user + jpa: + properties: + hibernate: + dialect: org.hibernate.dialect.MariaDB103Dialect + hibernate: + ddl-auto: none + naming: + physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl + implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy + +policy-api: + name: ApiGroup + aaf: false + +database: + name: PolicyProviderParameterGroup + implementation: org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl + driver: org.mariadb.jdbc.Driver + url: jdbc:mariadb://mariadb:3306/policyadmin + user: policy_user + password: policy_user + persistenceUnit: PolicyDb + +policy-preload: + policyTypes: + - policytypes/onap.policies.monitoring.tcagen2.yaml + - policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml + - policytypes/onap.policies.monitoring.dcae-restconfcollector.yaml + - policytypes/onap.policies.monitoring.dcae-pm-subscription-handler.yaml + - policytypes/onap.policies.monitoring.dcae-pm-mapper.yaml + - policytypes/onap.policies.Optimization.yaml + - policytypes/onap.policies.optimization.Resource.yaml + - policytypes/onap.policies.optimization.Service.yaml + - policytypes/onap.policies.optimization.resource.AffinityPolicy.yaml + - policytypes/onap.policies.optimization.resource.DistancePolicy.yaml + - policytypes/onap.policies.optimization.resource.HpaPolicy.yaml + - policytypes/onap.policies.optimization.resource.OptimizationPolicy.yaml + - policytypes/onap.policies.optimization.resource.PciPolicy.yaml + - policytypes/onap.policies.optimization.service.QueryPolicy.yaml + - policytypes/onap.policies.optimization.service.SubscriberPolicy.yaml + - policytypes/onap.policies.optimization.resource.Vim_fit.yaml + - policytypes/onap.policies.optimization.resource.VnfPolicy.yaml + - policytypes/onap.policies.controlloop.guard.Common.yaml + - policytypes/onap.policies.controlloop.guard.common.Blacklist.yaml + - policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter.yaml + - policytypes/onap.policies.controlloop.guard.common.MinMax.yaml + - policytypes/onap.policies.controlloop.guard.common.Filter.yaml + - policytypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml + - policytypes/onap.policies.Naming.yaml + - policytypes/onap.policies.Match.yaml + - policytypes/onap.policies.native.Drools.yaml + - policytypes/onap.policies.native.Xacml.yaml + - policytypes/onap.policies.native.Apex.yaml + - policytypes/onap.policies.controlloop.operational.Common.yaml + - policytypes/onap.policies.controlloop.operational.common.Apex.yaml + - policytypes/onap.policies.controlloop.operational.common.Drools.yaml + policies: + - policies/sdnc.policy.naming.input.tosca.yaml + +management: + endpoints: + web: + base-path: / + exposure: + include: health,metrics,prometheus + path-mapping.prometheus: metrics diff --git a/testsuites/stability/src/main/resources/setup/config/jsonConfigs/apiConfigFile.json b/testsuites/stability/src/main/resources/setup/config/jsonConfigs/apiConfigFile.json deleted file mode 100644 index 63e0c4c6..00000000 --- a/testsuites/stability/src/main/resources/setup/config/jsonConfigs/apiConfigFile.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "ApiGroup", - "restServerParameters": { - "host": "0.0.0.0", - "port": 6969, - "userName": "policyadmin", - "password": "zb!XztG34", - "https": false, - "aaf": false, - "prometheus": false - }, - "databaseProviderParameters": { - "name": "PolicyProviderParameterGroup", - "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", - "databaseDriver": "org.mariadb.jdbc.Driver", - "databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin", - "databaseUser": "policy_user", - "databasePassword": "policy_user", - "persistenceUnit": "PolicyMariaDb" - }, - "preloadPolicyTypes": [ - "policytypes/onap.policies.monitoring.tcagen2.yaml", - "policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml", - "policytypes/onap.policies.monitoring.dcae-restconfcollector.yaml", - "policytypes/onap.policies.monitoring.dcae-pm-subscription-handler.yaml", - "policytypes/onap.policies.monitoring.dcae-pm-mapper.yaml", - "policytypes/onap.policies.Optimization.yaml", - "policytypes/onap.policies.optimization.Resource.yaml", - "policytypes/onap.policies.optimization.Service.yaml", - "policytypes/onap.policies.optimization.resource.AffinityPolicy.yaml", - "policytypes/onap.policies.optimization.resource.DistancePolicy.yaml", - "policytypes/onap.policies.optimization.resource.HpaPolicy.yaml", - "policytypes/onap.policies.optimization.resource.OptimizationPolicy.yaml", - "policytypes/onap.policies.optimization.resource.PciPolicy.yaml", - "policytypes/onap.policies.optimization.service.QueryPolicy.yaml", - "policytypes/onap.policies.optimization.service.SubscriberPolicy.yaml", - "policytypes/onap.policies.optimization.resource.Vim_fit.yaml", - "policytypes/onap.policies.optimization.resource.VnfPolicy.yaml", - "policytypes/onap.policies.acm.guard.Common.yaml", - "policytypes/onap.policies.acm.guard.common.Blacklist.yaml", - "policytypes/onap.policies.acm.guard.common.FrequencyLimiter.yaml", - "policytypes/onap.policies.acm.guard.common.MinMax.yaml", - "policytypes/onap.policies.acm.guard.common.Filter.yaml", - "policytypes/onap.policies.acm.guard.coordination.FirstBlocksSecond.yaml", - "policytypes/onap.policies.Naming.yaml", - "policytypes/onap.policies.Match.yaml", - "policytypes/onap.policies.native.Drools.yaml", - "policytypes/onap.policies.native.Xacml.yaml", - "policytypes/onap.policies.native.Apex.yaml", - "policytypes/onap.policies.acm.operational.Common.yaml", - "policytypes/onap.policies.acm.operational.common.Apex.yaml", - "policytypes/onap.policies.acm.operational.common.Drools.yaml" - ], - "preloadPolicies" : [ - "policies/sdnc.policy.naming.input.tosca.yaml" - ] -} diff --git a/testsuites/stability/src/main/resources/setup/config/jsonConfigs/dmaapSimConfig.json b/testsuites/stability/src/main/resources/setup/config/jsonConfigs/dmaapSimConfig.json index fc08b0a8..ea8f7c03 100644 --- a/testsuites/stability/src/main/resources/setup/config/jsonConfigs/dmaapSimConfig.json +++ b/testsuites/stability/src/main/resources/setup/config/jsonConfigs/dmaapSimConfig.json @@ -1,15 +1,15 @@ { - "dmaapProvider": { - "name": "DMaaP simulator", - "topicSweepSec": 900 - }, - "restServers": [ - { - "name": "DMaaP simulator", - "providerClass": "org.onap.policy.models.sim.dmaap.rest.DmaapSimRestControllerV1", - "host": "0.0.0.0", - "port": 3904, - "https": false - } - ] + "dmaapProvider": { + "name": "DMaaP simulator", + "topicSweepSec": 900 + }, + "restServers": [ + { + "name": "DMaaP simulator", + "providerClass": "org.onap.policy.models.sim.dmaap.rest.DmaapSimRestControllerV1", + "host": "0.0.0.0", + "port": 3904, + "https": false + } + ] } \ No newline at end of file diff --git a/testsuites/stability/src/main/resources/setup/config/jsonConfigs/papConfigFile.json b/testsuites/stability/src/main/resources/setup/config/jsonConfigs/papConfigFile.json deleted file mode 100644 index 9b6f3b40..00000000 --- a/testsuites/stability/src/main/resources/setup/config/jsonConfigs/papConfigFile.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "PapGroup", - "restServerParameters": { - "host": "0.0.0.0", - "port": 6969, - "userName": "policyadmin", - "password": "zb!XztG34", - "https": false, - "aaf": false, - "prometheus": true - }, - "pdpParameters": { - "heartBeatMs": 300000, - "updateParameters": { - "maxRetryCount": 1, - "maxWaitMs": 30000 - }, - "stateChangeParameters": { - "maxRetryCount": 1, - "maxWaitMs": 30000 - } - }, - "databaseProviderParameters": { - "name": "PolicyProviderParameterGroup", - "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", - "databaseDriver": "org.mariadb.jdbc.Driver", - "databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin", - "databaseUser": "policy_user", - "databasePassword": "policy_user", - "persistenceUnit": "PolicyMariaDb" - }, - "savePdpStatisticsInDb": true, - "topicParameterGroup": { - "topicSources" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "message-router:3904" ], - "topicCommInfrastructure" : "dmaap", - "useHttps": false - }, - { - "topic" : "POLICY-HEARTBEAT", - "effectiveTopic": "POLICY-PDP-PAP", - "consumerGroup": "policy-pap", - "servers" : [ "message-router:3904" ], - "topicCommInfrastructure" : "dmaap", - "useHttps": false - }], - "topicSinks" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "message-router:3904" ], - "topicCommInfrastructure" : "dmaap", - "useHttps": false - }, - { - "topic" : "POLICY-NOTIFICATION", - "servers" : [ "message-router:3904" ], - "topicCommInfrastructure" : "dmaap", - "useHttps": false - }] - }, - "healthCheckRestClientParameters":[{ - "clientName": "api", - "hostname": "policy-api", - "port": 6969, - "userName": "policyadmin", - "password": "zb!XztG34", - "useHttps": false, - "basePath": "policy/api/v1/healthcheck" - }] -} diff --git a/testsuites/stability/src/main/resources/setup/config/jsonConfigs/papGroups.json b/testsuites/stability/src/main/resources/setup/config/jsonConfigs/papGroups.json new file mode 100644 index 00000000..c7fb6f19 --- /dev/null +++ b/testsuites/stability/src/main/resources/setup/config/jsonConfigs/papGroups.json @@ -0,0 +1,28 @@ +{ + "groups": [ + { + "name": "defaultGroup", + "version": "1.0.0", + "description": "The default group that registers all supported policy types and pdps.", + "pdpGroupState": "ACTIVE", + "pdpSubgroups": [ + { + "pdpType": "apex", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Apex", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Apex", + "version": "1.0.0" + } + ], + "currentInstanceCount": 1, + "desiredInstanceCount": 1, + "policies": [] + } + ] + } + ] +} diff --git a/testsuites/stability/src/main/resources/setup/config/jsonConfigs/pdpSimConfig.json b/testsuites/stability/src/main/resources/setup/config/jsonConfigs/pdpSimConfig.json index ee832326..d809955f 100644 --- a/testsuites/stability/src/main/resources/setup/config/jsonConfigs/pdpSimConfig.json +++ b/testsuites/stability/src/main/resources/setup/config/jsonConfigs/pdpSimConfig.json @@ -1,25 +1,39 @@ { - "name":"OnapPfParameterGroup", - "pdpStatusParameters": { - "pdpGroup": "defaultGroup", - "timeIntervalMs": 120000, - "pdpType":"apex", - "description":"Pdp Heartbeat", - "supportedPolicyTypes":[ - {"name":"onap.policies.acm.operational.common.Apex","version":"1.0.0"}, - {"name":"onap.policies.native.Apex","version":"1.0.0"} - ] - }, - "topicParameterGroup": { - "topicSources" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "message-router:3904" ], - "topicCommInfrastructure" : "dmaap" - }], - "topicSinks" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "message-router:3904" ], - "topicCommInfrastructure" : "dmaap" - }] - } + "name": "OnapPfParameterGroup", + "pdpStatusParameters": { + "pdpGroup": "defaultGroup", + "timeIntervalMs": 120000, + "pdpType": "apex", + "description": "Pdp Heartbeat", + "supportedPolicyTypes": [ + { + "name": "onap.policies.controlloop.operational.common.Apex", + "version": "1.0.0" + }, + { + "name": "onap.policies.native.Apex", + "version": "1.0.0" + } + ] + }, + "topicParameterGroup": { + "topicSources": [ + { + "topic": "POLICY-PDP-PAP", + "servers": [ + "message-router:3904" + ], + "topicCommInfrastructure": "dmaap" + } + ], + "topicSinks": [ + { + "topic": "POLICY-PDP-PAP", + "servers": [ + "message-router:3904" + ], + "topicCommInfrastructure": "dmaap" + } + ] + } } diff --git a/testsuites/stability/src/main/resources/setup/config/papParameters.yaml b/testsuites/stability/src/main/resources/setup/config/papParameters.yaml new file mode 100644 index 00000000..bb050205 --- /dev/null +++ b/testsuites/stability/src/main/resources/setup/config/papParameters.yaml @@ -0,0 +1,83 @@ +spring: + security: + user: + name: policyadmin + password: zb!XztG34 + http: + converters: + preferred-json-mapper: gson + datasource: + url: jdbc:mariadb://mariadb:3306/policyadmin + driverClassName: org.mariadb.jdbc.Driver + username: policy_user + password: policy_user + jpa: + properties: + hibernate: + dialect: org.hibernate.dialect.MariaDB103Dialect + hibernate: + ddl-auto: none + naming: + physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl + implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy + +server: + port: 6969 + ssl: + enabled: false + +pap: + name: PapGroup + aaf: false + pdpParameters: + heartBeatMs: 120000 + updateParameters: + maxRetryCount: 1 + maxWaitMs: 30000 + stateChangeParameters: + maxRetryCount: 1 + maxWaitMs: 30000 + savePdpStatisticsInDb: true + topicParameterGroup: + topicSources: + - topic: POLICY-PDP-PAP + servers: + - message-router + topicCommInfrastructure: dmaap + useHttps: false + fetchTimeout: 15000 + - topic: POLICY-HEARTBEAT + effectiveTopic: POLICY-PDP-PAP + consumerGroup: policy-pap + servers: + - message-router + topicCommInfrastructure: dmaap + useHttps: false + fetchTimeout: 15000 + topicSinks: + - topic: POLICY-PDP-PAP + servers: + - message-router + topicCommInfrastructure: dmaap + useHttps: false + - topic: POLICY-NOTIFICATION + servers: + - message-router + topicCommInfrastructure: dmaap + useHttps: false + healthCheckRestClientParameters: + - clientName: api + hostname: policy-api + port: 6969 + userName: policyadmin + password: zb!XztG34 + useHttps: false + basePath: policy/api/v1/healthcheck + +management: + endpoints: + web: + base-path: / + exposure: + include: health, metrics, prometheus + path-mapping.prometheus: metrics diff --git a/testsuites/stability/src/main/resources/setup/distribution/etc/defaultConfig.json b/testsuites/stability/src/main/resources/setup/distribution/etc/defaultConfig.json index 8a5b769e..0dda1952 100644 --- a/testsuites/stability/src/main/resources/setup/distribution/etc/defaultConfig.json +++ b/testsuites/stability/src/main/resources/setup/distribution/etc/defaultConfig.json @@ -4,7 +4,9 @@ "host": "0.0.0.0", "port": 6969, "userName": "healthcheck", - "password": "zb!XztG34" + "password": "zb!XztG34", + "https": false, + "prometheus": true }, "receptionHandlerParameters": { "S3PReceptionHandler": { @@ -13,12 +15,12 @@ "receptionHandlerConfigurationName": "fileConfiguration", "pluginHandlerParameters": { "policyDecoders": { - "ToscaPolicyDecoder":{ - "decoderType":"ToscaPolicyDecoder", - "decoderClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicy", + "ToscaPolicyDecoder": { + "decoderType": "ToscaPolicyDecoder", + "decoderClassName": "org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicy", "decoderConfigurationName": "toscaPolicyDecoderConfiguration" }, - "ToscaAutomationCompositionDecoder": { + "ToscaAutomationCompositionDecoder": { "decoderType": "ToscaAutomationCompositionDecoder", "decoderClassName": "org.onap.policy.distribution.reception.decoding.policy.file.AutomationCompositionDecoderFileInCsar", "decoderConfigurationName": "toscaAutomationCompositionDecoderConfiguration" @@ -49,9 +51,9 @@ } }, "policyDecoderConfigurationParameters": { - "toscaPolicyDecoderConfiguration":{ - "parameterClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicyParameterGroup", - "parameters":{ + "toscaPolicyDecoderConfiguration": { + "parameterClassName": "org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicyParameterGroup", + "parameters": { "policyFileName": "tosca_policy", "policyTypeFileName": "tosca_policy_type" } @@ -63,7 +65,6 @@ } } }, - "policyForwarderConfigurationParameters": { "lifecycleApiPolicyConfiguration": { "parameterClassName": "org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiForwarderParameters", @@ -94,8 +95,8 @@ "clientName": "policy-clamp-runtime-acm", "hostname": "policy-clamp-runtime-acm", "port": 6969, - "useHttps": true, - "userName": "policyadmin", + "useHttps": false, + "userName": "runtimeUser", "password": "zb!XztG34" } } diff --git a/testsuites/stability/src/main/resources/setup/distribution/etc/logback.xml b/testsuites/stability/src/main/resources/setup/distribution/etc/logback.xml index 34a40204..82f6d3b4 100644 --- a/testsuites/stability/src/main/resources/setup/distribution/etc/logback.xml +++ b/testsuites/stability/src/main/resources/setup/distribution/etc/logback.xml @@ -1,7 +1,7 @@