aboutsummaryrefslogtreecommitdiffstats
path: root/compose/config/distribution
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2023-02-17 15:14:07 +0000
committerAdheli Tavares <adheli.tavares@est.tech>2023-02-22 13:22:48 +0000
commit1f339f886d01c6d6ac5cfd6467850c61fee4f675 (patch)
tree9c59715170d07c951421f5cf8f4d7d939e289c8b /compose/config/distribution
parenta6664dc5c767210a78f140b9fa149c2a8261b428 (diff)
Restructure of csit files to be used both by docker and k8s config
Issue-ID: POLICY-4125 Change-Id: Id63b3badb1b451b36e3226970dcafaa5a62d860f Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'compose/config/distribution')
-rw-r--r--compose/config/distribution/defaultConfig.json76
-rw-r--r--compose/config/distribution/groups.json137
-rw-r--r--compose/config/distribution/logback.xml136
3 files changed, 349 insertions, 0 deletions
diff --git a/compose/config/distribution/defaultConfig.json b/compose/config/distribution/defaultConfig.json
new file mode 100644
index 00000000..c8451eba
--- /dev/null
+++ b/compose/config/distribution/defaultConfig.json
@@ -0,0 +1,76 @@
+{
+ "name":"SDCDistributionGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"policyadmin",
+ "password":"zb!XztG34",
+ "https": false,
+ "prometheus": true
+ },
+ "receptionHandlerParameters":{
+ "FileReceptionHandler":{
+ "receptionHandlerType":"File",
+ "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.file.FileSystemReceptionHandler",
+ "receptionHandlerConfigurationName":"fileConfiguration",
+ "pluginHandlerParameters":{
+ "policyDecoders":{
+ "ApexDecoder":{
+ "decoderType":"ApexDecoder",
+ "decoderClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicy",
+ "decoderConfigurationName": "apexDecoderConfiguration"
+ }
+ },
+ "policyForwarders":{
+ "LifeCycleApiForwarder":{
+ "forwarderType":"LifeCycleAPI",
+ "forwarderClassName":"org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiPolicyForwarder",
+ "forwarderConfigurationName": "lifecycleApiConfiguration"
+ }
+ }
+ }
+ }
+ },
+ "receptionHandlerConfigurationParameters":{
+ "fileConfiguration":{
+ "parameterClassName":"org.onap.policy.distribution.reception.handling.file.FileSystemReceptionHandlerConfigurationParameterGroup",
+ "parameters":{
+ "watchPath": "/opt/app/policy/distribution/etc/temp/",
+ "maxThread": 1
+ }
+ }
+ },
+ "policyDecoderConfigurationParameters":{
+ "apexDecoderConfiguration":{
+ "parameterClassName":"org.onap.policy.distribution.reception.decoding.policy.file.PolicyDecoderFileInCsarToPolicyParameterGroup",
+ "parameters":{
+ "policyFileName": "apex_policy.json",
+ "policyTypeFileName": "apex_policy_type.json"
+ }
+ }
+ },
+ "policyForwarderConfigurationParameters":{
+ "lifecycleApiConfiguration":{
+ "parameterClassName":"org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiForwarderParameters",
+ "parameters":{
+ "apiParameters": {
+ "clientName": "policy-api",
+ "hostname": "policy-api",
+ "port": 6969,
+ "userName": "policyadmin",
+ "password": "zb!XztG34",
+ "useHttps": false
+ },
+ "papParameters": {
+ "clientName": "policy-pap",
+ "hostname": "policy-pap",
+ "port": 6969,
+ "userName": "policyadmin",
+ "password": "zb!XztG34",
+ "useHttps": false
+ },
+ "deployPolicies": true
+ }
+ }
+ }
+}
diff --git a/compose/config/distribution/groups.json b/compose/config/distribution/groups.json
new file mode 100644
index 00000000..6ee30e1c
--- /dev/null
+++ b/compose/config/distribution/groups.json
@@ -0,0 +1,137 @@
+{
+ "groups": [
+ {
+ "name": "defaultGroup",
+ "version": "1.0.0",
+ "description": "The default group that registers all supported policy types and pdps.",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "pdpType": "xacml",
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.guard.common.FrequencyLimiter",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.common.MinMax",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.common.Blacklist",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.common.Filter",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.monitoring.*",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.*",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.AffinityPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.DistancePolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.HpaPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.OptimizationPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.PciPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.service.QueryPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.service.SubscriberPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.Vim_fit",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.optimization.resource.VnfPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.native.Xacml",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.Naming",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.match.*",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "policies": [
+ {
+ "name": "SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "pdpType": "drools",
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.operational.common.Drools",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.native.drools.Controller",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.native.drools.Artifact",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "policies": []
+ },
+ {
+ "pdpType": "apex",
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.operational.common.Apex",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.native.Apex",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 1,
+ "policies": []
+ }
+ ]
+ }
+ ]
+}
diff --git a/compose/config/distribution/logback.xml b/compose/config/distribution/logback.xml
new file mode 100644
index 00000000..fdd850f9
--- /dev/null
+++ b/compose/config/distribution/logback.xml
@@ -0,0 +1,136 @@
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2018 Ericsson. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+-->
+
+<configuration scan="true" scanPeriod="30 seconds" debug="false">
+
+ <property name="logDir" value="${POLICY_LOGS}" />
+
+ <property name="errorLog" value="error" />
+ <property name="debugLog" value="debug" />
+ <property name="networkLog" value="network" />
+
+ <property name="metricLog" value="metric" />
+ <property name="transactionLog" value="audit" />
+
+ <property name="debugPattern"
+ value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" />
+ <property name="errorPattern" value="${debugPattern}" />
+ <property name="networkPattern"
+ value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" />
+
+ <property name="metricPattern"
+ value="%X{RequestID}|%X{InvocationID}|%X{ServiceName}|%X{PartnerName}|%X{BeginTimestamp}|%X{EndTimestamp}|%X{ElapsedTime}|%X{ServiceInstanceID}|%X{VirtualServerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%X{Severity}|%X{TargetEntity}|%X{TargetServiceName}|%X{Server}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ProcessKey}|%X{RemoteHost}|%X{AlertSeverity}|%X{TargetVirtualEntity}|%level|%thread| %msg%n" />
+ <property name="transactionPattern" value="${metricPattern}" />
+
+ <appender name="ErrorOut"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDir}/${errorLog}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
+ </rollingPolicy>
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>WARN</level>
+ </filter>
+ <encoder>
+ <pattern>${errorPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="AsyncErrorOut"
+ class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="ErrorOut" />
+ </appender>
+
+ <appender name="DebugOut"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDir}/${debugLog}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${debugPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="AsyncDebugOut"
+ class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="DebugOut" />
+ </appender>
+
+ <appender name="NetworkOut"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDir}/${networkLog}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${networkPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="AsyncNetworkOut"
+ class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="NetworkOut" />
+ </appender>
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <Pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</Pattern>
+ </encoder>
+ </appender>
+
+ <appender name="AsyncStdOut" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="STDOUT" />
+ </appender>
+
+ <logger name="network" level="INFO" additivity="false">
+ <appender-ref ref="AsyncNetworkOut" />
+ <appender-ref ref="AsyncStdOut" />
+ </logger>
+
+ <logger name="org.eclipse.jetty.server.RequestLog" level="info" additivity="false">
+ <appender-ref ref="AsyncNetworkOut" />
+ <appender-ref ref="AsyncStdOut" />
+ </logger>
+
+ <logger name="org.eclipse.jetty" level="ERROR" />
+
+ <root level="INFO">
+ <appender-ref ref="AsyncDebugOut" />
+ <appender-ref ref="AsyncErrorOut" />
+ <appender-ref ref="AsyncStdOut" />
+ </root>
+
+</configuration>