diff options
Diffstat (limited to 'docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default')
7 files changed, 895 insertions, 0 deletions
diff --git a/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/consumers.py.erb b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/consumers.py.erb new file mode 100644 index 0000000..ca58bc6 --- /dev/null +++ b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/consumers.py.erb @@ -0,0 +1,90 @@ +#!/usr/bin/python +import sys +import subprocess +#from time import sleep +import time +from datetime import datetime + +class bcolors: + HEADER = '\033[95m' + OKBLUE = '\033[94m' + OKGREEN = '\033[92m' + WARNING = '\033[93m' + FAIL = '\033[91m' + ENDC = '\033[0m' + BOLD = '\033[1m' + UNDERLINE = '\033[4m' + + +############################## +# Functions +############################## +def checkBackend(): + command="curl -s -o /dev/null -I -w \"%{http_code}\" -i <%= @protocol %>://<%= @catalog_ip %>:<%= @catalog_port %>/sdc2/rest/v1/user/jh0003" + + proc = subprocess.Popen( command , shell=True , stdout=subprocess.PIPE ) + (out, err) = proc.communicate() + result = out.strip() + return result + + +def checkConsumer(consumerName): + command="curl -s -o /dev/null -I -w \"%{http_code}\" -i -H \"Accept: application/json; charset=UTF-8\" -H \"Content-Type: application/json\" -H \"USER_ID: jh0003\" <%= @protocol %>://<%= @catalog_ip %>:<%= @catalog_port %>/sdc2/rest/v1/consumers/" + consumerName + + proc = subprocess.Popen( command , shell=True , stdout=subprocess.PIPE ) + (out, err) = proc.communicate() + result = out.strip() + return result + + +def createConsumer( consumerName, consumerSalt, consumerPass ): + print '[INFO] ' + consumerName + command="curl -s -o /dev/null -w \"%{http_code}\" -X POST -i -H \"Accept: application/json; charset=UTF-8\" -H \"Content-Type: application/json\" -H \"USER_ID: jh0003\" <%= @protocol %>://<%= @catalog_ip %>:<%= @catalog_port %>/sdc2/rest/v1/consumers/ -d '{\"consumerName\": '" + consumerName + "', \"consumerSalt\": '" + consumerSalt + "',\"consumerPassword\": '" + consumerPass + "'}'" + + proc = subprocess.Popen( command , shell=True , stdout=subprocess.PIPE) + + (out, err) = proc.communicate() + result = out.strip() + return result + + + + +############################## +# Definitions +############################## +consumersList = [ "<%= @consumerName %>" ] +salt = "67fbde1c142bb25c7d6086252d6ab08d" +password = "d6e61a6859456cf4ded84f641ae59301ebf19d56cd5fc8a8f15b7cc54d3b6429" +beStat=0 + + +############################## +# Main +############################## + +for i in range(1,10): + myResult = checkBackend() + if myResult == '200': + print '[INFO]: SDC Backend is up and running' + beStat=1 + break + else: + currentTime = datetime.now() + print '[ERROR]: ' + currentTime.strftime('%Y/%m/%d %H:%M:%S') + bcolors.FAIL + ' SDC Backend not responding, try #' + str(i) + bcolors.ENDC + time.sleep(10) + +if beStat == 0: + print '[ERROR]: ' + time.strftime('%Y/%m/%d %H:%M:%S') + bcolors.FAIL + 'SDC Backend is DOWN :-(' + bcolors.ENDC + sys.exit(0) + +for consumer in consumersList: + myResult = checkConsumer(consumer) + if myResult == '200': + print '[INFO]: ' + consumer + ' already exists' + else: + myResult = createConsumer( consumer, salt, password ) + if myResult == '201': + print '[INFO]: ' + consumer + ' created, result: [' + myResult + ']' + else: + print '[ERROR]: ' + bcolors.FAIL + consumer + bcolors.ENDC + ' error creating , result: [' + myResult + ']' diff --git a/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb new file mode 100644 index 0000000..6251043 --- /dev/null +++ b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb @@ -0,0 +1,37 @@ +# Configure the server to run with SSL/TLS and using HTTPS +server.port=<%= @dcae_be_port %> +server.contextPath=/ +##ScheduleTimer +scheduled.timer.value=5000 +asdc_catalog_url=asdc +uri=<%= @protocol %>://<%= @consumerAuth %>@<%= @sdc_be_vip %>:<%= @sdc_be_port %>#demo +toscalab.url=http://localhost:8085 +blueprinter.uri=${toscalab.url}/translate +blueprinter.hcuri=${toscalab.url}/healthcheck +blueprinter.hcretrynum=3 +asdc_rootPath=/sdc/v1/catalog/ +healthpoller.fixedDelay=120000 +compositionConfig.isRuleEditorActive=true +compositionConfig.flowTypes={"Syslog":{"entryPointPhaseName":"syslog_map","lastPhaseName":"map_publish"},\ + "SNMP":{"entryPointPhaseName":"snmp_map","lastPhaseName":"map_publish"},\ + "FOI":{"entryPointPhaseName":"foi_map","lastPhaseName":"map_publish"},\ + "Guest OS":{"entryPointPhaseName":"guest_os_map","lastPhaseName":"map_publish"},\ + "Status Poller":{"entryPointPhaseName":"status_poller_map","lastPhaseName":"map_publish"},\ + "SNMP Polling":{"entryPointPhaseName":"snmp_polling_map","lastPhaseName":"map_publish"},\ + "TCA Hi Lo":{"entryPointPhaseName":"tca_hi_lo_map","lastPhaseName":"map_publish"},\ + "Syslog Collector":{"entryPointPhaseName":"syslog_map","lastPhaseName":"syslog_publish"},\ + "Syslog MSEA":{"entryPointPhaseName":"syslog_map","lastPhaseName":"syslog_publish"},\ + "Status Poller Collector":{"entryPointPhaseName":"status_poller_map","lastPhaseName":"status_poller_publish"},\ + "Status Poller MSE":{"entryPointPhaseName":"snmp_map","lastPhaseName":"snmp_publish"},\ + "FOI Collector":{"entryPointPhaseName":"pmossFoiPhase","lastPhaseName":"foiEventToDmaapPhase"},\ + "Docker Map":{"entryPointPhaseName":"docker_map","lastPhaseName":"docker_publish"},\ + "SNMP MSE":{"entryPointPhaseName":"snmp_map","lastPhaseName":"snmp_publish"},\ + "SAM Collector":{"entryPointPhaseName":"sam_collector_map","lastPhaseName":"sam_collector_publish"},\ + "Docker MSE":{"entryPointPhaseName":"docker_map","lastPhaseName":"docker_publish"},\ + "SNMP PM Poller":{"entryPointPhaseName":"docker_map","lastPhaseName":"docker_publilsh"},\ + "Discovery and MIB Poller":{"entryPointPhaseName":"snmp_pm_map","lastPhaseName":"snmp_pm_publish"},\ + "Nagios docker MSE":{"entryPointPhaseName":"docker_map","lastPhaseName":"docker_publish"},\ + "VES Fault":{"entryPointPhaseName":"ves_fault_map","lastPhaseName":"ves_fault_publish"},\ + "VES Heartbeat":{"entryPointPhaseName":"ves_heartbeat_map","lastPhaseName":"ves_heartbeat_publish"},\ + "VES Measurement":{"entryPointPhaseName":"ves_measurement_map","lastPhaseName":"ves_measurement_publish"},\ + "VES Syslog":{"entryPointPhaseName":"ves_syslog_map","lastPhaseName":"ves_syslog_publish"}} diff --git a/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-error-configuration.erb b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-error-configuration.erb new file mode 100644 index 0000000..7ab42b6 --- /dev/null +++ b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-error-configuration.erb @@ -0,0 +1,278 @@ +# DCAE-D Errors +errors: + OK: { + code: 200, + message: "OK", + messageId: "200" + } + CREATED: { + code: 201, + message: "OK", + messageId: "201" + } + NO_CONTENT: { + code: 204, + message: "No Content", + messageId: "204" + } +#--------POL4050----------------------------- + NOT_ALLOWED: { + code: 405, + message: "Error: Method not allowed.", + messageId: "POL4050" + } +#--------POL5000----------------------------- + GENERAL_ERROR: { + code: 500, + message: "Error: Internal Server Error. Please try again later.", + messageId: "POL5000" + } +#--------POL5500----------------------------- + CATALOG_NOT_AVAILABLE: { + code: 502, + message: "Error - SDC Catalog currently not available. Please try again later", + messageId: "POL5500" + } +#--------POL5501----------------------------- + AUTH_ERROR: { + code: 502, + message: "Error – connection to SDC catalog could not be authenticated. Please contact your administrator", + messageId: "POL5501" + } + +#---------SVC4000----------------------------- + INVALID_CONTENT: { + code: 400, + message: "Error: Invalid content.", + messageId: "SVC4000" + } + +#---------SVC6001----------------------------- + NOT_FOUND: { + code: 404, + message: "No Monitoring Templates were found.", + messageId: "SVC6001" + } +#---------SVC6005----------------------------- + CONFIGURATION_ERROR: { + code: 500, + message: "Error – Failed to find configuration.", + messageId: "SVC6005" + } +#---------SVC6006----------------------------- + VES_SCHEMA_NOT_FOUND: { + code: 500, + message: "Error – Failed to find VES Schema definitions.", + messageId: "SVC6006" + } +#---------SVC6007----------------------------- +# %1 - VES Schema filename +# %2 - error reason + VES_SCHEMA_INVALID: { + code: 500, + message: "Error – Failed to parse VES Schema file '%1'. [%2]", + messageId: "SVC6007" + } +#---------SVC6008----------------------------- + FLOW_TYPES_CONFIGURATION_ERROR: { + code: 500, + message: "Error – Failed to read flow type definitions.", + messageId: "SVC6008" + } +#---------SVC6010----------------------------- + CLONE_FAILED: { + code: 409, + message: "Error – could not import Monitoring Template.", + messageId: "SVC6010" + } +#---------SVC6020----------------------------- + EMPTY_SERVICE_LIST: { + code: 404, + message: "Service List is not available.", + messageId: "SVC6020" + } +#---------SVC6021----------------------------- + MONITORING_TEMPLATE_ATTACHMENT_ERROR: { + code: 409, + message: "Error – Monitoring Template is not available for editing.", + messageId: "SVC6021" + } + +#---------SVC6031----------------------------- +# %1 - Component Name + MISSING_TOSCA_FILE: { + code: 404, + message: "Error – Could not read component %1 details.", + messageId: "SVC6031" + } +#---------SVC6032----------------------------- +# %1 - Component Name + VALIDATE_TOSCA_ERROR: { + code: 500, + message: "Error – Component %1 details could not be parsed.", + messageId: "SVC6032" + } +#---------SVC6033----------------------------- + SUBMIT_BLUEPRINT_ERROR: { + code: 500, + message: "Error –Failed to submit blueprint.", + messageId: "SVC6033" + } +#---------SVC6034----------------------------- +# %1 -VFCMT Name + GENERATE_BLUEPRINT_ERROR: { + code: 500, + message: "Error – Failed to generate blueprint file for Monitoring Template %1.", + messageId: "SVC6034" + } +#---------SVC6035----------------------------- +# %1 - the error reason + INVALID_RULE_FORMAT: { + code: 400, + message: "Error - Rule format is invalid: %1.", + messageId: "SVC6035" + } +#---------SVC6036----------------------------- + SAVE_RULE_FAILED: { + code: 409, + message: "Error - Failed to save rule. Internal persistence error", + messageId: "SVC6036" + } + +#---------SVC6038----------------------------- +# %1 - VFCMT uuid + RESOURCE_NOT_VFCMT_ERROR: { + code: 400, + message: "Resource with uuid %1 is either not of resourceType='VFCMT' or not of category='Template' or not of subCategory='Monitoring Template'", + messageId: "SVC6038" + } +#---------SVC6039----------------------------- +# %1 - serviceUuid +# %2 - vfiName + VFI_FETCH_ERROR: { + code: 404, + message: "Service %1 does not contain a VFI named %2", + messageId: "SVC6039" + } +#-----------SVC6085--------------------------- +# %1 - current user id +# %2 - resource/service name +# %3 - last modifier user id + USER_CONFLICT: { + code: 403, + message: "Error: User conflict. Operation not allowed for user %1 on asset %2 checked out by %3.", + messageId: "SVC6085" + } + +#---------SVC6100----------------------------- + MISSING_RULE_DESCRIPTION: { + code: 400, + message: "Please enter a valid rule description.", + messageId: "SVC6100" + } +#---------SVC6101----------------------------- + MISSING_ACTION: { + code: 400, + message: "Rule must have at least one action.", + messageId: "SVC6101" + } + +#---------SVC6104----------------------------- +# %1 - action target + MISSING_CONCAT_VALUE: { + code: 400, + message: "Please fill all from fields of concat action to %1", + messageId: "SVC6104" + } +#---------SVC6105----------------------------- +# %1 - condition group type + INVALID_GROUP_CONDITION: { + code: 400, + message: "Undefined condition group type: %1", + messageId: "SVC6105" + } + +#---------SVC6106----------------------------- + MISSING_CONDITION_ITEM: { + code: 400, + message: "Please enter all condition items", + messageId: "SVC6106" + } +#---------SVC6107----------------------------- +# %1 - left/right + MISSING_OPERAND: { + code: 400, + message: "Please enter the %1 operand field", + messageId: "SVC6107" + } +#---------SVC6108----------------------------- +# %1 - operator + INVALID_OPERATOR: { + code: 400, + message: "Undefined operator: %1", + messageId: "SVC6108" + } +#---------SVC6109----------------------------- +# %1 - action target + MISSING_ENTRY: { + code: 400, + message: "Please fill all key-value pairs of map action to %1", + messageId: "SVC6109" + } +#---------SVC6110----------------------------- +# %1 - action target + MISSING_DEFAULT_VALUE: { + code: 400, + message: "Please fill the default value of map action to %1", + messageId: "SVC6110" + } +#---------SVC6111----------------------------- + DUPLICATE_KEY: { + code: 400, + message: "Error: Duplication in map keys exists, please modify rule configuration", + messageId: "SVC6111" + } +#---------SVC6112----------------------------- +# %1 - dependent actions + ACTION_DEPENDENCY: { + code: 400, + message: "A circular dependency was detected between actions. The following fields should be resolved: %1", + messageId: "SVC6112" + } +#---------SVC6113----------------------------- +# %1 - dependent rule ids +# %2 - dependent action targets + RULE_DEPENDENCY: { + code: 400, + message: "A circular dependency was detected between rules: %1 within fields: %2", + messageId: "SVC6113" + } +#---------SVC6114----------------------------- +# %1 - dcae component name + NODE_NOT_FOUND: { + code: 400, + message: "DCAE component %1 not found in composition", + messageId: "SVC6114" + } +#---------SVC6115----------------------------- + DELETE_RULE_FAILED: { + code: 409, + message: "Delete rule failed. Internal persistence error", + messageId: "SVC6115" + } +#---------SVC6116----------------------------- +# %1 - reason + TRANSLATE_FAILED: { + code: 400, + message: "Translation failed. Reason: %1", + messageId: "SVC6116" + } +#---------SVC6117----------------------------- +# %1 - field name +# %2 - action type +# %3 - action target + MISSING_ACTION_FIELD: { + code: 400, + message: "Please fill the %1 field of %2 action to %3", + messageId: "SVC6117" + }
\ No newline at end of file diff --git a/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-logback-spring.erb b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-logback-spring.erb new file mode 100644 index 0000000..7c0bfb6 --- /dev/null +++ b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-logback-spring.erb @@ -0,0 +1,342 @@ +<!-- Copyright (c) 2016 AT&T Intellectual Property. All rights reserved. --> +<configuration scan="true" scanPeriod="3 seconds"> + <include resource="org/springframework/boot/logging/logback/base.xml"/> + <!--<jmxConfigurator /> --> + + <!-- specify the component name --> + <property name="componentName" value="DCAE"></property> + + <!-- log file names --> + <property name="generalLogName" value="application" /> + <property name="securityLogName" value="security" /> + <property name="performanceLogName" value="performance" /> + <property name="serverLogName" value="server" /> + <property name="policyLogName" value="policy" /> + <property name="errorLogName" value="error" /> + <property name="metricsLogName" value="metrics" /> + <property name="auditLogName" value="audit" /> + <property name="debugLogName" value="debug" /> + + <property name="defaultPattern" value="%date{ISO8601,UTC}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}| %msg%n" /> + + <property name="auditLoggerPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}| %msg%n" /> + <property name="metricsLoggerPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}| %msg%n" /> + <property name="errorLoggerPattern" value="%date{ISO8601,UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDescription}| %msg%n" /> + <property name="debugLoggerPattern" value="%date{ISO8601,UTC}|%X{RequestId}| %msg%n" /> + + <property name="logDirectory" value="${log.home}/${componentName}" /> + + + <!-- Example evaluator filter applied against console appender --> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>${defaultPattern}</pattern> + </encoder> + </appender> + + <!-- ============================================================================ --> + <!-- EELF Appenders --> + <!-- ============================================================================ --> + + <!-- The EELFAppender is used to record events to the general application + log --> + + + <appender name="EELF" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${generalLogName}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/${generalLogName}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${defaultPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELF" /> + </appender> + + <!-- EELF Security Appender. This appender is used to record security events + to the security log file. Security events are separate from other loggers + in EELF so that security log records can be captured and managed in a secure + way separate from the other logs. This appender is set to never discard any + events. --> + <appender name="EELFSecurity" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${securityLogName}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/${securityLogName}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${defaultPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncEELFSecurity" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <discardingThreshold>0</discardingThreshold> + <appender-ref ref="EELFSecurity" /> + </appender> + + <!-- EELF Performance Appender. This appender is used to record performance + records. --> + <appender name="EELFPerformance" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${performanceLogName}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/${performanceLogName}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${defaultPattern}</pattern> + </encoder> + </appender> + <appender name="asyncEELFPerformance" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELFPerformance" /> + </appender> + + <!-- EELF Server Appender. This appender is used to record Server related + logging events. The Server logger and appender are specializations of the + EELF application root logger and appender. This can be used to segregate Server + events from other components, or it can be eliminated to record these events + as part of the application root log. --> + <appender name="EELFServer" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${serverLogName}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/${serverLogName}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${defaultPattern}</pattern> + </encoder> + </appender> + <appender name="asyncEELFServer" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELFServer" /> + </appender> + + + <!-- EELF Policy Appender. This appender is used to record Policy engine + related logging events. The Policy logger and appender are specializations + of the EELF application root logger and appender. This can be used to segregate + Policy engine events from other components, or it can be eliminated to record + these events as part of the application root log. --> + <appender name="EELFPolicy" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${policyLogName}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/${policyLogName}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${defaultPattern}</pattern> + </encoder> + </appender> + <appender name="asyncEELFPolicy" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELFPolicy" /> + </appender> + + + <!-- EELF Audit Appender. This appender is used to record audit engine + related logging events. The audit logger and appender are specializations + of the EELF application root logger and appender. This can be used to segregate + Policy engine events from other components, or it can be eliminated to record + these events as part of the application root log. --> + + <!-- Audit log --> + <appender name="EELFAudit" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${auditLogName}.log</file> + <!-- Audit messages filter - accept audit messages --> + <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> + <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> + <marker>AUDIT_MARKER</marker> + <marker>AUDIT</marker> + </evaluator> + <onMismatch>DENY</onMismatch> + <onMatch>ACCEPT</onMatch> + </filter> + + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/${auditLogName}.%i.log.zip</fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>10</maxIndex> + </rollingPolicy> + + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>20MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${auditLoggerPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELFAudit" /> + </appender> + +<appender name="EELFMetrics" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${metricsLogName}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/${metricsLogName}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - + %msg%n"</pattern> --> + <pattern>${metricsLoggerPattern}</pattern> + </encoder> + </appender> + + + <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELFMetrics"/> + </appender> + + <appender name="EELFError" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${errorLogName}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/${errorLogName}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${errorLoggerPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELFError"/> + </appender> + + <appender name="EELFDebug" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/${debugLogName}.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/${debugLogName}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${debugLoggerPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>256</queueSize> + <appender-ref ref="EELFDebug" /> + <includeCallerData>true</includeCallerData> + </appender> + + + <!-- ============================================================================ --> + <!-- EELF loggers --> + <!-- ============================================================================ --> + <logger name="com.att.eelf" level="info" additivity="false"> + <appender-ref ref="asyncEELF" /> + </logger> + <logger name="com.att.eelf.security" level="info" additivity="false"> + <appender-ref ref="asyncEELFSecurity" /> + </logger> + <logger name="com.att.eelf.perf" level="info" additivity="false"> + <appender-ref ref="asyncEELFPerformance" /> + </logger> + <logger name="com.att.eelf.server" level="info" additivity="false"> + <appender-ref ref="asyncEELFServer" /> + </logger> + <logger name="com.att.eelf.policy" level="info" additivity="false"> + <appender-ref ref="asyncEELFPolicy" /> + </logger> + + <logger name="org.openecomp.sdc.common.ecomplog.EcompLoggerAudit" level="info" additivity="false"> + <appender-ref ref="asyncEELFAudit" /> + </logger> + + <logger name="com.att.eelf.metrics" level="info" additivity="false"> + <appender-ref ref="asyncEELFMetrics" /> + </logger> + + + <logger name="com.att.eelf.error" level="error" additivity="false"> + <appender-ref ref="asyncEELFError" /> + </logger> + + <logger name="com.att.eelf.debug" level="debug" additivity="false"> + <appender-ref ref="asyncEELFDebug" /> + </logger> + + + + + <root level="INFO"> + <appender-ref ref="asyncEELF" /> + </root> + +</configuration> diff --git a/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/http-ini.erb b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/http-ini.erb new file mode 100644 index 0000000..8f26690 --- /dev/null +++ b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/http-ini.erb @@ -0,0 +1,29 @@ +# --------------------------------------- +# Module: http +<%= @http_option %> + +### HTTP Connector Configuration + +## Connector host/address to bind to +# jetty.http.host=0.0.0.0 + +## Connector port to listen on +jetty.http.port=<%= @http_port %> + +## Connector idle timeout in milliseconds +jetty.http.idleTimeout=30000 + +## Connector socket linger time in seconds (-1 to disable) +# jetty.http.soLingerTime=-1 + +## Number of acceptors (-1 picks default based on number of cores) +# jetty.http.acceptors=-1 + +## Number of selectors (-1 picks default based on number of cores) +# jetty.http.selectors=-1 + +## ServerSocketChannel backlog (0 picks platform default) +# jetty.http.acceptorQueueSize=0 + +## Thread priority delta to give to acceptor threads +# jetty.http.acceptorPriorityDelta=0 diff --git a/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/https-ini.erb b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/https-ini.erb new file mode 100644 index 0000000..9999a41 --- /dev/null +++ b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/https-ini.erb @@ -0,0 +1,29 @@ +# --------------------------------------- +# Module: https +--module=https + +### HTTPS Connector Configuration + +## Connector host/address to bind to +# jetty.https.host=0.0.0.0 + +## Connector port to listen on +jetty.https.port=<%= @https_port %> + +## Connector idle timeout in milliseconds +jetty.https.idleTimeout=30000 + +## Connector socket linger time in seconds (-1 to disable) +# jetty.https.soLingerTime=-1 + +## Number of acceptors (-1 picks default based on number of cores) +# jetty.https.acceptors=-1 + +## Number of selectors (-1 picks default based on number of cores) +# jetty.https.selectors=-1 + +## ServerSocketChannel backlog (0 picks platform default) +# jetty.https.acceptorQueueSize=0 + +## Thread priority delta to give to acceptor threads +# jetty.https.acceptorPriorityDelta=0 diff --git a/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/ssl-ini.erb b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/ssl-ini.erb new file mode 100644 index 0000000..9abac51 --- /dev/null +++ b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/ssl-ini.erb @@ -0,0 +1,90 @@ +# --------------------------------------- +# Module: ssl +--module=ssl + +### TLS(SSL) Connector Configuration + +## Connector host/address to bind to +# jetty.ssl.host=0.0.0.0 + +## Connector port to listen on +jetty.ssl.port=<%= @https_port %> + +## Connector idle timeout in milliseconds +# jetty.ssl.idleTimeout=30000 + +## Connector socket linger time in seconds (-1 to disable) +# jetty.ssl.soLingerTime=-1 + +## Number of acceptors (-1 picks default based on number of cores) +# jetty.ssl.acceptors=-1 + +## Number of selectors (-1 picks default based on number of cores) +# jetty.ssl.selectors=-1 + +## ServerSocketChannel backlog (0 picks platform default) +# jetty.ssl.acceptorQueueSize=0 + +## Thread priority delta to give to acceptor threads +# jetty.ssl.acceptorPriorityDelta=0 + +## Whether request host names are checked to match any SNI names +# jetty.ssl.sniHostCheck=true + +## max age in seconds for a Strict-Transport-Security response header (default -1) +# jetty.ssl.stsMaxAgeSeconds=31536000 + +## include subdomain property in any Strict-Transport-Security header (default false) +# jetty.ssl.stsIncludeSubdomains=true + +### SslContextFactory Configuration +## Note that OBF passwords are not secure, just protected from casual observation +## See http://www.eclipse.org/jetty/documentation/current/configuring-security-secure-passwords.html + +## Keystore file path (relative to $jetty.base) +#jetty.sslContext.keyStorePath=etc/keystore + +## Truststore file path (relative to $jetty.base) +#jetty.sslContext.trustStorePath=etc/truststore + +## Keystore password +# jetty.sslContext.keyStorePassword=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 +jetty.sslContext.keyStorePassword=<%= @jetty_keystore_pwd %> + +## Keystore type and provider +# jetty.sslContext.keyStoreType=JKS +# jetty.sslContext.keyStoreProvider= + +## KeyManager password +# jetty.sslContext.keyManagerPassword=OBF:1u2u1wml1z7s1z7a1wnl1u2g +jetty.sslContext.keyManagerPassword=<%= @jetty_keymanager_pwd %> + +## Truststore password +# jetty.sslContext.trustStorePassword=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 +jetty.sslContext.trustStorePassword=<%= @jetty_truststore_pwd %> + +## Truststore type and provider +# jetty.sslContext.trustStoreType=JKS +# jetty.sslContext.trustStoreProvider= + +## whether client certificate authentication is required +# jetty.sslContext.needClientAuth=false + +## Whether client certificate authentication is desired +# jetty.sslContext.wantClientAuth=false + +## Whether cipher order is significant (since java 8 only) +# jetty.sslContext.useCipherSuitesOrder=true + +## To configure Includes / Excludes for Cipher Suites or Protocols see tweak-ssl.xml example at +## https://www.eclipse.org/jetty/documentation/current/configuring-ssl.html#configuring-sslcontextfactory-cipherSuites + +## Set the size of the SslSession cache +# jetty.sslContext.sslSessionCacheSize=-1 + +## Set the timeout (in seconds) of the SslSession cache timeout +# jetty.sslContext.sslSessionTimeout=-1 + +## Allow SSL renegotiation +# jetty.sslContext.renegotiationAllowed=true +# jetty.sslContext.renegotiationLimit=5 |