summaryrefslogtreecommitdiffstats
path: root/kubernetes/sdc
diff options
context:
space:
mode:
authorAlexis de Talhouƫt <alexis.de_talhouet@bell.ca>2018-02-16 18:54:32 +0000
committerGerrit Code Review <gerrit@onap.org>2018-02-16 18:54:32 +0000
commit2e00737960d2131070d809c2b81d48382020c189 (patch)
tree491a9ead25016ec5f611eed410531e66e939eb3f /kubernetes/sdc
parent3472e8ae8b323f83cb0f7add5ff97b7fed936b0f (diff)
parentba635b3dc4d520e4be28dc82c40b049567ff2c88 (diff)
Merge "Config seg sdc deployment"
Diffstat (limited to 'kubernetes/sdc')
-rwxr-xr-xkubernetes/sdc/resources/config/environments/AUTO.json74
-rwxr-xr-xkubernetes/sdc/resources/config/environments/Template.json75
-rw-r--r--kubernetes/sdc/resources/config/log/be/logback.xml187
-rw-r--r--kubernetes/sdc/resources/config/log/fe/logback.xml187
-rw-r--r--kubernetes/sdc/resources/config/log/filebeat/filebeat.yml41
-rwxr-xr-xkubernetes/sdc/resources/config/sdc-fe/FE_2_setup_configuration.rb27
-rw-r--r--kubernetes/sdc/templates/sdc-be.yaml14
-rw-r--r--kubernetes/sdc/templates/sdc-cs.yaml5
-rw-r--r--kubernetes/sdc/templates/sdc-environments-configmap.yaml9
-rw-r--r--kubernetes/sdc/templates/sdc-es.yaml21
-rw-r--r--kubernetes/sdc/templates/sdc-fe-configmap.yaml9
-rw-r--r--kubernetes/sdc/templates/sdc-fe.yaml20
-rw-r--r--kubernetes/sdc/templates/sdc-kb.yaml5
-rw-r--r--kubernetes/sdc/templates/sdc-log-configmap.yaml27
-rw-r--r--kubernetes/sdc/values.yaml3
15 files changed, 683 insertions, 21 deletions
diff --git a/kubernetes/sdc/resources/config/environments/AUTO.json b/kubernetes/sdc/resources/config/environments/AUTO.json
new file mode 100755
index 0000000000..5d6eaef94e
--- /dev/null
+++ b/kubernetes/sdc/resources/config/environments/AUTO.json
@@ -0,0 +1,74 @@
+{
+ "name": "AUTO",
+ "description": "OpenSource-AUTO",
+ "cookbook_versions": {
+ "Deploy-SDandC": "= 1.0.0"
+ },
+ "json_class": "Chef::Environment",
+ "chef_type": "environment",
+
+ "default_attributes": {
+ "CS_VIP": "sdc-cs.onap-sdc",
+ "BE_VIP": "sdc-be.onap-sdc",
+ "FE_VIP": "sdc-fe.onap-sdc",
+ "ES_VIP": "sdc-es.onap-sdc",
+ "interfaces": {
+ "application": "eth0",
+ "private": "eth0"
+ },
+ "ECompP": {
+ "ecomp_rest_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/auxapi",
+ "ueb_url_list": "dmaap.onap-message-router, dmaap.onap-message-router",
+ "app_secret": "XftIATw9Jr3VzAcPqt3NnJOu",
+ "app_key": "x9UfO7JsDn8BESVX",
+ "inbox_name": "ECOMP-PORTAL-INBOX",
+ "ecomp_redirect_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/login.htm",
+ "app_topic_name": "ECOMP-PORTAL-OUTBOX-SDC1",
+ "decryption_key": "AGLDdG4D04BKm2IxIWEr8o=="
+ },
+ "UEB": {
+ "PublicKey": "iPIxkpAMI8qTcQj8",
+ "SecretKey": "Ehq3WyT4bkif4zwgEbvshGal",
+ "fqdn": ["dmaap.onap-message-router", "dmaap.onap-message-router"]
+ },
+ "Nodes": {
+ "CS": "sdc-cs.onap-sdc",
+ "BE": "sdc-be.onap-sdc",
+ "FE": "sdc-fe.onap-sdc",
+ "ES": "sdc-es.onap-sdc"
+ }
+ },
+ "override_attributes": {
+ "FE": {
+ "http_port": "8181",
+ "https_port": "9443"
+ },
+ "BE": {
+ "http_port": "8080",
+ "https_port": "8443"
+ },
+ "elasticsearch": {
+ "cluster_name": "SDC-ES-",
+ "ES_path_home": "/usr/share/elasticsearch",
+ "ES_path_data": "/usr/share/elasticsearch/data",
+ "num_of_replicas": "0",
+ "num_of_shards": "1"
+ },
+
+ "cassandra": {
+ "concurrent_reads": "32",
+ "num_tokens": "256",
+ "data_dir": "/var/lib/cassandra/data",
+ "hinted_handoff_enabled": "true",
+ "cassandra_user": "asdc_user",
+ "cassandra_password": "Aa1234%^!",
+ "concurrent_writes": "32",
+ "cluster_name": "SDC-CS-",
+ "multithreaded_compaction": "false",
+ "cache_dir": "/var/lib/cassandra/saved_caches",
+ "log_file": "/var/lib/cassandra/log/system.log",
+ "phi_convict_threshold": "8",
+ "commitlog_dir": "/var/lib/cassandra/commitlog"
+ }
+ }
+}
diff --git a/kubernetes/sdc/resources/config/environments/Template.json b/kubernetes/sdc/resources/config/environments/Template.json
new file mode 100755
index 0000000000..ddddc78e2b
--- /dev/null
+++ b/kubernetes/sdc/resources/config/environments/Template.json
@@ -0,0 +1,75 @@
+{
+ "name": "xxx",
+ "description": "OpenSource-xxx",
+ "cookbook_versions": {
+ "Deploy-SDandC": "= 1.0.0"
+ },
+ "json_class": "Chef::Environment",
+ "chef_type": "environment",
+
+ "default_attributes": {
+ "CS_VIP": "yyy",
+ "BE_VIP": "yyy",
+ "FE_VIP": "yyy",
+ "ES_VIP": "yyy",
+ "interfaces": {
+ "application": "eth0",
+ "private": "eth1"
+ },
+ "ECompP": {
+ "ecomp_rest_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/auxapi",
+ "ueb_url_list": "dmaap.onap-message-router,dmaap.onap-message-router",
+ "app_secret": "XftIATw9Jr3VzAcPqt3NnJOu",
+ "app_key": "x9UfO7JsDn8BESVX",
+ "inbox_name": "ECOMP-PORTAL-INBOX",
+ "ecomp_redirect_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/login.htm",
+ "app_topic_name": "ECOMP-PORTAL-OUTBOX-SDC1",
+ "decryption_key": "AGLDdG4D04BKm2IxIWEr8o=="
+ },
+ "UEB": {
+ "PublicKey": "iPIxkpAMI8qTcQj8",
+ "SecretKey": "Ehq3WyT4bkif4zwgEbvshGal",
+ "fqdn": ["dmaap.onap-message-router", "dmaap.onap-message-router"]
+ },
+ "Nodes": {
+ "CS": "yyy",
+ "BE": "yyy",
+ "FE": "yyy",
+ "ES": "yyy"
+ }
+ },
+ "override_attributes": {
+ "FE": {
+ "http_port": "8181",
+ "https_port": "9443"
+ },
+ "BE": {
+ "http_port": "8080",
+ "https_port": "8443"
+ },
+ "elasticsearch": {
+ "cluster_name": "SDC-ES-",
+ "ES_path_home": "/usr/share/elasticsearch",
+ "ES_path_data": "/usr/share/elasticsearch/data",
+ "num_of_replicas": "0",
+ "num_of_shards": "1"
+ },
+
+ "cassandra": {
+ "concurrent_reads": "32",
+ "num_tokens": "256",
+ "data_dir": "/var/lib/cassandra/data",
+ "hinted_handoff_enabled": "true",
+ "cassandra_user": "asdc_user",
+ "cassandra_password": "Aa1234%^!",
+ "concurrent_writes": "32",
+ "cluster_name": "SDC-CS-",
+ "multithreaded_compaction": "false",
+ "cache_dir": "/var/lib/cassandra/saved_caches",
+ "log_file": "/var/lib/cassandra/log/system.log",
+ "phi_convict_threshold": "8",
+ "commitlog_dir": "/var/lib/cassandra/commitlog"
+ }
+ }
+}
+
diff --git a/kubernetes/sdc/resources/config/log/be/logback.xml b/kubernetes/sdc/resources/config/log/be/logback.xml
new file mode 100644
index 0000000000..4d508e3047
--- /dev/null
+++ b/kubernetes/sdc/resources/config/log/be/logback.xml
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration scan="true" scanPeriod="3 seconds">
+ <property name="logDir" value="/var/log/onap" />
+ <property name="componentName" scope="system" value="sdc"></property>
+ <property name="subComponentName" scope="system" value="sdc-be"></property>
+ <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
+ <property file="${config.home}/catalog-be/configuration.yaml" />
+ <property name="enable-all-log" scope="context" value="false" />
+ <!-- log file names -->
+ <property name="errorLogName" value="error" />
+ <property name="metricsLogName" value="metrics" />
+ <property name="auditLogName" value="audit" />
+ <property name="debugLogName" value="debug" />
+ <property name="transactionLogName" value="transaction" />
+ <property name="allLogName" value="all" />
+ <property name="queueSize" value="256" />
+ <property name="maxFileSize" value="50MB" />
+ <property name="maxHistory" value="30" />
+ <property name="totalSizeCap" value="10GB" />
+ <property name="pattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}\t[%thread]\t%-5level\t%logger{36}\t%replace(%replace(%replace(%mdc){'\t','\\\\t'}){', ','\t'}){'\n', '\\\\n'}\t%replace(%replace(%msg){'\n', '\\\\n'}){'\t','\\\\t'}%n" />
+ <!-- All log -->
+ <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
+ <then>
+ <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="ALL_ROLLING">
+ <file>${logDirectory}/${allLogName}.log</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${allLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${pattern}</pattern>
+ </encoder>
+ </appender>
+ <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_ALL">
+ <appender-ref ref="ALL_ROLLING" />
+ </appender>
+ </then>
+ </if>
+ <!-- Error log -->
+ <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="ERROR_ROLLING">
+ <file>${logDirectory}/${errorLogName}.log</file>
+ <!-- Audit messages filter - deny audit messages -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>AUDIT_MARKER</marker>
+ </evaluator>
+ <onMismatch>NEUTRAL</onMismatch>
+ <onMatch>DENY</onMatch>
+ </filter>
+ <!-- Transaction messages filter - deny Transaction messages -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>TRANSACTION_MARKER</marker>
+ </evaluator>
+ <onMismatch>NEUTRAL</onMismatch>
+ <onMatch>DENY</onMatch>
+ </filter>
+ <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>INFO</level>
+ </filter>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${pattern}</pattern>
+ </encoder>
+ </appender>
+ <!-- Debug log -->
+ <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="DEBUG_ROLLING">
+ <file>${logDirectory}/${debugLogName}.log</file>
+ <!-- No need to deny audit messages - they are INFO only, will be denied
+ anyway -->
+ <!-- Transaction messages filter - deny Transaction messages, there are
+ some DEBUG level messages among them -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>TRANSACTION_MARKER</marker>
+ </evaluator>
+ <onMismatch>NEUTRAL</onMismatch>
+ <onMatch>DENY</onMatch>
+ </filter>
+ <!-- accept DEBUG and TRACE level -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator">
+ <expression>e.level.toInt() &lt;= DEBUG.toInt()</expression>
+ </evaluator>
+ <OnMismatch>DENY</OnMismatch>
+ <OnMatch>NEUTRAL</OnMatch>
+ </filter>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${pattern}</pattern>
+ </encoder>
+ </appender>
+ <!-- Audit log -->
+ <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="AUDIT_ROLLING">
+ <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>
+ </evaluator>
+ <onMismatch>DENY</onMismatch>
+ <onMatch>ACCEPT</onMatch>
+ </filter>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${pattern}</pattern>
+ </encoder>
+ </appender>
+ <!-- SdncTransaction log -->
+ <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="TRANSACTION_ROLLING">
+ <file>${logDirectory}/${transactionLogName}.log</file>
+ <!-- Transaction messages filter - accept audit messages -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>TRANSACTION_MARKER</marker>
+ </evaluator>
+ <onMismatch>DENY</onMismatch>
+ <onMatch>ACCEPT</onMatch>
+ </filter>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${transactionLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${pattern}</pattern>
+ </encoder>
+ </appender>
+ <!-- Asynchronicity Configurations -->
+ <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_DEBUG">
+ <queueSize>${queueSize}</queueSize>
+ <appender-ref ref="DEBUG_ROLLING" />
+ </appender>
+ <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_TRANSACTION">
+ <queueSize>${queueSize}</queueSize>
+ <appender-ref ref="TRANSACTION_ROLLING" />
+ </appender>
+ <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_ERROR">
+ <queueSize>${queueSize}</queueSize>
+ <appender-ref ref="ERROR_ROLLING" />
+ </appender>
+ <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_AUDIT">
+ <queueSize>${queueSize}</queueSize>
+ <appender-ref ref="AUDIT_ROLLING" />
+ </appender>
+ <root level="INFO">
+ <appender-ref ref="ASYNC_ERROR" />
+ <appender-ref ref="ASYNC_DEBUG" />
+ <appender-ref ref="ASYNC_AUDIT" />
+ <appender-ref ref="ASYNC_TRANSACTION" />
+ <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
+ <then>
+ <appender-ref ref="ALL_ROLLING" />
+ </then>
+ </if>
+ </root>
+ <logger level="INFO" name="org.openecomp.sdc" />
+</configuration> \ No newline at end of file
diff --git a/kubernetes/sdc/resources/config/log/fe/logback.xml b/kubernetes/sdc/resources/config/log/fe/logback.xml
new file mode 100644
index 0000000000..a8e9ed7264
--- /dev/null
+++ b/kubernetes/sdc/resources/config/log/fe/logback.xml
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration scan="true" scanPeriod="3 seconds">
+ <property name="logDir" value="/var/log/onap" />
+ <property name="componentName" scope="system" value="sdc"></property>
+ <property name="subComponentName" scope="system" value="sdc-fe"></property>
+ <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
+ <property file="${config.home}/catalog-fe/configuration.yaml" />
+ <property name="enable-all-log" scope="context" value="false" />
+ <!-- log file names -->
+ <property name="errorLogName" value="error" />
+ <property name="metricsLogName" value="metrics" />
+ <property name="auditLogName" value="audit" />
+ <property name="debugLogName" value="debug" />
+ <property name="transactionLogName" value="transaction" />
+ <property name="allLogName" value="all" />
+ <property name="queueSize" value="256" />
+ <property name="maxFileSize" value="50MB" />
+ <property name="maxHistory" value="30" />
+ <property name="totalSizeCap" value="10GB" />
+ <property name="pattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}\t[%thread]\t%-5level\t%logger{36}\t%replace(%replace(%replace(%mdc){'\t','\\\\t'}){', ','\t'}){'\n', '\\\\n'}\t%replace(%replace(%msg){'\n', '\\\\n'}){'\t','\\\\t'}%n" />
+ <!-- All log -->
+ <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
+ <then>
+ <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="ALL_ROLLING">
+ <file>${logDirectory}/${allLogName}.log</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${allLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${pattern}</pattern>
+ </encoder>
+ </appender>
+ <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_ALL">
+ <appender-ref ref="ALL_ROLLING" />
+ </appender>
+ </then>
+ </if>
+ <!-- Error log -->
+ <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="ERROR_ROLLING">
+ <file>${logDirectory}/${errorLogName}.log</file>
+ <!-- Audit messages filter - deny audit messages -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>AUDIT_MARKER</marker>
+ </evaluator>
+ <onMismatch>NEUTRAL</onMismatch>
+ <onMatch>DENY</onMatch>
+ </filter>
+ <!-- Transaction messages filter - deny Transaction messages -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>TRANSACTION_MARKER</marker>
+ </evaluator>
+ <onMismatch>NEUTRAL</onMismatch>
+ <onMatch>DENY</onMatch>
+ </filter>
+ <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>INFO</level>
+ </filter>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${pattern}</pattern>
+ </encoder>
+ </appender>
+ <!-- Debug log -->
+ <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="DEBUG_ROLLING">
+ <file>${logDirectory}/${debugLogName}.log</file>
+ <!-- No need to deny audit messages - they are INFO only, will be denied
+ anyway -->
+ <!-- Transaction messages filter - deny Transaction messages, there are
+ some DEBUG level messages among them -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>TRANSACTION_MARKER</marker>
+ </evaluator>
+ <onMismatch>NEUTRAL</onMismatch>
+ <onMatch>DENY</onMatch>
+ </filter>
+ <!-- accept DEBUG and TRACE level -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator">
+ <expression>e.level.toInt() &lt;= DEBUG.toInt()</expression>
+ </evaluator>
+ <OnMismatch>DENY</OnMismatch>
+ <OnMatch>NEUTRAL</OnMatch>
+ </filter>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${pattern}</pattern>
+ </encoder>
+ </appender>
+ <!-- Audit log -->
+ <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="AUDIT_ROLLING">
+ <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>
+ </evaluator>
+ <onMismatch>DENY</onMismatch>
+ <onMatch>ACCEPT</onMatch>
+ </filter>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${pattern}</pattern>
+ </encoder>
+ </appender>
+ <!-- SdncTransaction log -->
+ <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="TRANSACTION_ROLLING">
+ <file>${logDirectory}/${transactionLogName}.log</file>
+ <!-- Transaction messages filter - accept audit messages -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>TRANSACTION_MARKER</marker>
+ </evaluator>
+ <onMismatch>DENY</onMismatch>
+ <onMatch>ACCEPT</onMatch>
+ </filter>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${transactionLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${pattern}</pattern>
+ </encoder>
+ </appender>
+ <!-- Asynchronicity Configurations -->
+ <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_DEBUG">
+ <queueSize>${queueSize}</queueSize>
+ <appender-ref ref="DEBUG_ROLLING" />
+ </appender>
+ <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_TRANSACTION">
+ <queueSize>${queueSize}</queueSize>
+ <appender-ref ref="TRANSACTION_ROLLING" />
+ </appender>
+ <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_ERROR">
+ <queueSize>${queueSize}</queueSize>
+ <appender-ref ref="ERROR_ROLLING" />
+ </appender>
+ <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_AUDIT">
+ <queueSize>${queueSize}</queueSize>
+ <appender-ref ref="AUDIT_ROLLING" />
+ </appender>
+ <root level="INFO">
+ <appender-ref ref="ASYNC_ERROR" />
+ <appender-ref ref="ASYNC_DEBUG" />
+ <appender-ref ref="ASYNC_AUDIT" />
+ <appender-ref ref="ASYNC_TRANSACTION" />
+ <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
+ <then>
+ <appender-ref ref="ALL_ROLLING" />
+ </then>
+ </if>
+ </root>
+ <logger level="INFO" name="org.openecomp.sdc" />
+</configuration> \ No newline at end of file
diff --git a/kubernetes/sdc/resources/config/log/filebeat/filebeat.yml b/kubernetes/sdc/resources/config/log/filebeat/filebeat.yml
new file mode 100644
index 0000000000..f316b866af
--- /dev/null
+++ b/kubernetes/sdc/resources/config/log/filebeat/filebeat.yml
@@ -0,0 +1,41 @@
+filebeat.prospectors:
+#it is mandatory, in our case it's log
+- input_type: log
+ #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory.
+ paths:
+ - /var/log/onap/*/*/*/*.log
+ - /var/log/onap/*/*/*.log
+ - /var/log/onap/*/*.log
+ #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive
+ ignore_older: 48h
+ # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit
+ clean_inactive: 96h
+
+
+# Name of the registry file. If a relative path is used, it is considered relative to the
+# data path. Else full qualified file name.
+#filebeat.registry_file: ${path.data}/registry
+
+
+output.logstash:
+ #List of logstash server ip addresses with port number.
+ #But, in our case, this will be the loadbalancer IP address.
+ #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately.
+ hosts: ["logstash.onap-log:5044"]
+ #If enable will do load balancing among availabe Logstash, automatically.
+ loadbalance: true
+
+ #The list of root certificates for server verifications.
+ #If certificate_authorities is empty or not set, the trusted
+ #certificate authorities of the host system are used.
+ #ssl.certificate_authorities: $ssl.certificate_authorities
+
+ #The path to the certificate for SSL client authentication. If the certificate is not specified,
+ #client authentication is not available.
+ #ssl.certificate: $ssl.certificate
+
+ #The client certificate key used for client authentication.
+ #ssl.key: $ssl.key
+
+ #The passphrase used to decrypt an encrypted key stored in the configured key file
+ #ssl.key_passphrase: $ssl.key_passphrase
diff --git a/kubernetes/sdc/resources/config/sdc-fe/FE_2_setup_configuration.rb b/kubernetes/sdc/resources/config/sdc-fe/FE_2_setup_configuration.rb
new file mode 100755
index 0000000000..9fc662ee0a
--- /dev/null
+++ b/kubernetes/sdc/resources/config/sdc-fe/FE_2_setup_configuration.rb
@@ -0,0 +1,27 @@
+jetty_base="/var/lib/jetty"
+template "catalog-fe-config" do
+ path "#{jetty_base}/config/catalog-fe/configuration.yaml"
+ source "FE-configuration.yaml.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables({
+ :fe_host_ip => node['HOST_IP'],
+ :be_host_ip => "sdc-be.onap-sdc",
+ :catalog_port => node['BE'][:http_port],
+ :ssl_port => node['BE'][:https_port]
+ })
+end
+
+template "onboarding-fe-config" do
+ path "#{jetty_base}/config/onboarding-fe/onboarding_configuration.yaml"
+ source "FE-onboarding-configuration.yaml.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables({
+ :catalog_ip => node['HOST_IP'],
+ :catalog_port => node['BE'][:http_port],
+ :ssl_port => node['BE'][:https_port]
+})
+end
diff --git a/kubernetes/sdc/templates/sdc-be.yaml b/kubernetes/sdc/templates/sdc-be.yaml
index 41560525e1..6485aa1983 100644
--- a/kubernetes/sdc/templates/sdc-be.yaml
+++ b/kubernetes/sdc/templates/sdc-be.yaml
@@ -89,27 +89,29 @@ spec:
volumeMounts:
- mountPath: /usr/share/filebeat/filebeat.yml
name: filebeat-conf
+ subPath: filebeat.yml
- mountPath: /var/log/onap
name: sdc-logs-2
- mountPath: /usr/share/filebeat/data
name: sdc-data-filebeat
volumes:
- name: filebeat-conf
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+ configMap:
+ name: sdc-filebeat-configmap
- name: sdc-logs-2
emptyDir: {}
- name: sdc-data-filebeat
emptyDir: {}
- name: sdc-logback
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdc/be/logback.xml
+ configMap:
+ name : sdc-log-be-configmap
- name: sdc-sdc-es-es
hostPath:
path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
- name: sdc-environments
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/environments
+ configMap:
+ name: sdc-environments-configmap
+ defaultMode: 0755
- name: sdc-localtime
hostPath:
path: /etc/localtime
diff --git a/kubernetes/sdc/templates/sdc-cs.yaml b/kubernetes/sdc/templates/sdc-cs.yaml
index a81d4ae826..d70ead4407 100644
--- a/kubernetes/sdc/templates/sdc-cs.yaml
+++ b/kubernetes/sdc/templates/sdc-cs.yaml
@@ -67,8 +67,9 @@ spec:
persistentVolumeClaim:
claimName: sdc-cs-db
- name: sdc-environments
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/environments
+ configMap:
+ name : sdc-environments-configmap
+ defaultMode: 0755
- name: sdc-localtime
hostPath:
path: /etc/localtime
diff --git a/kubernetes/sdc/templates/sdc-environments-configmap.yaml b/kubernetes/sdc/templates/sdc-environments-configmap.yaml
new file mode 100644
index 0000000000..f8456b0efe
--- /dev/null
+++ b/kubernetes/sdc/templates/sdc-environments-configmap.yaml
@@ -0,0 +1,9 @@
+#{{ if not .Values.disableSdcSdcBe }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: sdc-environments-configmap
+ namespace: {{ .Values.nsPrefix }}-sdc
+data:
+{{ tpl (.Files.Glob "resources/config/environments/*").AsConfig . | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/sdc/templates/sdc-es.yaml b/kubernetes/sdc/templates/sdc-es.yaml
index 1d2ba4805b..3f2ef332b1 100644
--- a/kubernetes/sdc/templates/sdc-es.yaml
+++ b/kubernetes/sdc/templates/sdc-es.yaml
@@ -16,6 +16,20 @@ spec:
app: sdc-es
name: sdc-es
spec:
+ initContainers:
+ - name: sdc-logs-init
+ image: {{ .Values.image.ubuntuInit }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ command:
+ - /bin/bash
+ - "-c"
+ - |
+ mkdir -p /ubuntu-init/ASDC/ASDC-ES/
+ mkdir -p /ubuntu-init/ASDC/ASDC-CS/
+ mkdir -p /ubuntu-init/ASDC/ASDC-KB/
+ mkdir -p /ubuntu-init/ASDC/ASDC-BE/
+ mkdir -p /ubuntu-init/ASDC/ASDC-FE/
+ chmod -R 777 /ubuntu-init/
containers:
- image: {{ .Values.image.sdcElasticsearch }}
imagePullPolicy: {{ .Values.pullPolicy }}
@@ -30,6 +44,8 @@ spec:
- name: ES_HEAP_SIZE
value: "1024M"
volumeMounts:
+ - name: sdc-logs
+ mountPath: /ubuntu-init/
- mountPath: /root/chef-solo/environments/
name: sdc-environments
- mountPath: /etc/localtime
@@ -47,8 +63,9 @@ spec:
periodSeconds: 10
volumes:
- name: sdc-environments
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/environments
+ configMap :
+ name : sdc-environments-configmap
+ defaultMode: 0755
- name: sdc-localtime
hostPath:
path: /etc/localtime
diff --git a/kubernetes/sdc/templates/sdc-fe-configmap.yaml b/kubernetes/sdc/templates/sdc-fe-configmap.yaml
new file mode 100644
index 0000000000..2f60ef88e3
--- /dev/null
+++ b/kubernetes/sdc/templates/sdc-fe-configmap.yaml
@@ -0,0 +1,9 @@
+#{{ if not .Values.disableSdcSdcFe }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: sdc-fe-configmap
+ namespace: {{ .Values.nsPrefix }}-sdc
+data:
+{{ tpl (.Files.Glob "resources/config/sdc-fe/*").AsConfig . | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/sdc/templates/sdc-fe.yaml b/kubernetes/sdc/templates/sdc-fe.yaml
index bc1777f3ab..b4205ed653 100644
--- a/kubernetes/sdc/templates/sdc-fe.yaml
+++ b/kubernetes/sdc/templates/sdc-fe.yaml
@@ -62,6 +62,7 @@ spec:
name: sdc-logs-2
- mountPath: /root/chef-solo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb
name: sdc-fe-config
+ subPath: FE_2_setup_configuration.rb
- mountPath: /tmp/logback.xml
name: sdc-logback
lifecycle:
@@ -82,27 +83,29 @@ spec:
volumeMounts:
- mountPath: /usr/share/filebeat/filebeat.yml
name: filebeat-conf
+ subPath: filebeat.yml
- mountPath: /var/log/onap
name: sdc-logs-2
- mountPath: /usr/share/filebeat/data
name: sdc-data-filebeat
volumes:
- name: filebeat-conf
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+ configMap:
+ name : sdc-filebeat-configmap
- name: sdc-logs-2
emptyDir: {}
- name: sdc-data-filebeat
emptyDir: {}
- name: sdc-logback
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdc/fe/logback.xml
+ configMap:
+ name : sdc-log-fe-configmap
- name: sdc-sdc-es-es
hostPath:
path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
- name: sdc-environments
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/environments
+ configMap:
+ name: sdc-environments-configmap
+ defaultMode: 0755
- name: sdc-localtime
hostPath:
path: /etc/localtime
@@ -110,8 +113,9 @@ spec:
hostPath:
path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/logs
- name: sdc-fe-config
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/sdc-fe/FE_2_setup_configuration.rb
+ configMap:
+ name: sdc-fe-configmap
+ defaultMode: 0755
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }}
diff --git a/kubernetes/sdc/templates/sdc-kb.yaml b/kubernetes/sdc/templates/sdc-kb.yaml
index a7334d4d08..658f6c1a03 100644
--- a/kubernetes/sdc/templates/sdc-kb.yaml
+++ b/kubernetes/sdc/templates/sdc-kb.yaml
@@ -59,8 +59,9 @@ spec:
periodSeconds: 10
volumes:
- name: sdc-environments
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/environments
+ configMap:
+ name: sdc-environments-configmap
+ defaultMode: 0755
- name: sdc-localtime
hostPath:
path: /etc/localtime
diff --git a/kubernetes/sdc/templates/sdc-log-configmap.yaml b/kubernetes/sdc/templates/sdc-log-configmap.yaml
new file mode 100644
index 0000000000..c79f9e064c
--- /dev/null
+++ b/kubernetes/sdc/templates/sdc-log-configmap.yaml
@@ -0,0 +1,27 @@
+#{{ if not .Values.disableSdcSdcBe }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: sdc-log-be-configmap
+ namespace: {{ .Values.nsPrefix }}-sdc
+data:
+{{ tpl (.Files.Glob "resources/config/log/be/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: sdc-filebeat-configmap
+ namespace: {{ .Values.nsPrefix }}-sdc
+data:
+{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
+#{{ end }}
+---
+#{{ if not .Values.disableSdcSdcFe }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: sdc-log-fe-configmap
+ namespace: {{ .Values.nsPrefix }}-sdc
+data:
+{{ tpl (.Files.Glob "resources/config/log/fe/*").AsConfig . | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/sdc/values.yaml b/kubernetes/sdc/values.yaml
index 67f2810deb..1cc5dd0076 100644
--- a/kubernetes/sdc/values.yaml
+++ b/kubernetes/sdc/values.yaml
@@ -8,4 +8,5 @@ image:
sdcElasticsearch: nexus3.onap.org:10001/openecomp/sdc-elasticsearch:v1.1.0
sdcCassandra: nexus3.onap.org:10001/openecomp/sdc-cassandra:v1.1.0
sdcBackend: nexus3.onap.org:10001/openecomp/sdc-backend:v1.1.0
- filebeat: docker.elastic.co/beats/filebeat:5.5.0 \ No newline at end of file
+ filebeat: docker.elastic.co/beats/filebeat:5.5.0
+ ubuntuInit: oomk8s/ubuntu-init:1.0.0