summaryrefslogtreecommitdiffstats
path: root/datarouter-node/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'datarouter-node/src/main/resources')
-rw-r--r--datarouter-node/src/main/resources/EelfMessages.properties70
-rw-r--r--datarouter-node/src/main/resources/docker/Dockerfile7
-rw-r--r--datarouter-node/src/main/resources/docker/startup.sh18
-rw-r--r--datarouter-node/src/main/resources/log4j.properties32
-rw-r--r--datarouter-node/src/main/resources/log4j.properties.tmpl11
-rw-r--r--datarouter-node/src/main/resources/logback.xml405
-rw-r--r--datarouter-node/src/main/resources/misc/descriptor.xml53
-rw-r--r--datarouter-node/src/main/resources/misc/doaction42
-rw-r--r--datarouter-node/src/main/resources/misc/drtrnode114
-rw-r--r--datarouter-node/src/main/resources/misc/havecert.tmpl11
-rw-r--r--datarouter-node/src/main/resources/misc/log4j.properties.tmpl11
-rw-r--r--datarouter-node/src/main/resources/misc/node.properties112
-rw-r--r--datarouter-node/src/main/resources/misc/notes54
-rw-r--r--datarouter-node/src/main/resources/node.properties112
14 files changed, 1052 insertions, 0 deletions
diff --git a/datarouter-node/src/main/resources/EelfMessages.properties b/datarouter-node/src/main/resources/EelfMessages.properties
new file mode 100644
index 00000000..8c17417d
--- /dev/null
+++ b/datarouter-node/src/main/resources/EelfMessages.properties
@@ -0,0 +1,70 @@
+#-------------------------------------------------------------------------------
+# ============LICENSE_START==================================================
+# * org.onap.dmaap
+# * ===========================================================================
+# * Copyright © 2017 AT&T Intellectual Property. 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.
+# * ============LICENSE_END====================================================
+# *
+# * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+# *
+#-------------------------------------------------------------------------------
+########################################################################
+#Resource key=Error Code|Message text|Resolution text |Description text
+#######
+#Newlines can be utilized to add some clarity ensuring continuing line
+#has atleast one leading space
+#ResourceKey=\
+# ERR0000E\
+# Sample error msg txt\
+# Sample resolution msg\
+# Sample description txt
+#
+######
+#Error code classification category
+#100 Permission errors
+#200 Availability errors/Timeouts
+#300 Data errors
+#400 Schema Interface type/validation errors
+#500 Business process errors
+#900 Unknown errors
+#
+########################################################################
+
+# Messages for Data Router EELF framework
+
+#Prints FeedID in the EELF apicalls log
+MESSAGE_WITH__FEEDID=EELF0001I| FeedID = {0}
+
+#Prints User in the EELF apicalls log
+MESSAGE_WITH_BEHALF=EELF0002I| User = {0}
+
+#Prints User and FeedID in the EELF apicalls log
+MESSAGE_WITH_BEHALF_AND_FEEDID=EELF0003I| User = {0} FeedID = {1}
+
+#Prints keystore file error in EELF errors log
+MESSAGE_KEYSTORE_LOAD_ERROR=EELF0001E| Error loading my keystore file {0} {1}
+
+MESSAGE_KEYSORE_NAME_ERROR=EELF0002E| Error extracting my name from my keystore file. {0}
+
+MESSAGE_PARSING_ERROR=EELF0003E| Error parsing configuration data from provisioning server. {0}
+
+MESSAGE_CONF_FAILED=EELF0004E| Configuration failed. {0} - try again later.
+
+MESSAGE_BAD_PROV_URL=EELF0005E| Bad provisioning server URL {0}
+
+MESSAGE_KEYSTORE_FETCH_ERROR=EELF0006E| Unable to fetch canonical name from keystore file {0}
+
+MESSAGE_PROPERTIES_LOAD_ERROR=EELF0007E| Unable to load local configuration file - etc/node.properties
+
diff --git a/datarouter-node/src/main/resources/docker/Dockerfile b/datarouter-node/src/main/resources/docker/Dockerfile
new file mode 100644
index 00000000..fbf54566
--- /dev/null
+++ b/datarouter-node/src/main/resources/docker/Dockerfile
@@ -0,0 +1,7 @@
+FROM java:8
+ADD opt /opt/
+ADD startup.sh /startup.sh
+RUN chmod 700 /startup.sh
+ENTRYPOINT ./startup.sh start
+EXPOSE 8443
+EXPOSE 8080 \ No newline at end of file
diff --git a/datarouter-node/src/main/resources/docker/startup.sh b/datarouter-node/src/main/resources/docker/startup.sh
new file mode 100644
index 00000000..8cb71dd6
--- /dev/null
+++ b/datarouter-node/src/main/resources/docker/startup.sh
@@ -0,0 +1,18 @@
+LIB=/opt/app/datartr/lib
+ETC=/opt/app/datartr/etc
+echo "this is LIB" $LIB
+echo "this is ETC" $ETC
+mkdir -p /opt/app/datartr/logs
+mkdir -p /opt/app/datartr/spool
+mkdir -p /opt/app/datartr/spool/f
+mkdir -p /opt/app/datartr/spool/n
+mkdir -p /opt/app/datartr/spool/s
+CLASSPATH=$ETC
+for FILE in `find $LIB -name *.jar`; do
+ CLASSPATH=$CLASSPATH:$FILE
+done
+java -classpath $CLASSPATH com.att.research.datarouter.node.NodeMain
+
+runner_file="$LIB/datarouter-node-jar-with-dependencies.jar"
+echo "Starting using" $runner_file
+java -Dcom.att.eelf.logging.file==/opt/app/datartr/etc/logback.xml -Dcom.att.eelf.logging.path=/ -Dcom.att.research.datarouter.node.ConfigFile==/opt/app/datartr/etc/node.properties -jar $runner_file \ No newline at end of file
diff --git a/datarouter-node/src/main/resources/log4j.properties b/datarouter-node/src/main/resources/log4j.properties
new file mode 100644
index 00000000..5b2f019f
--- /dev/null
+++ b/datarouter-node/src/main/resources/log4j.properties
@@ -0,0 +1,32 @@
+#-------------------------------------------------------------------------------
+# ============LICENSE_START==================================================
+# * org.onap.dmaap
+# * ===========================================================================
+# * Copyright © 2017 AT&T Intellectual Property. 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.
+# * ============LICENSE_END====================================================
+# *
+# * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+# *
+#-------------------------------------------------------------------------------
+log4j.debug=FALSE
+log4j.rootLogger=INFO,Root
+
+log4j.appender.Root=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.Root.file=/root/node.log
+log4j.appender.Root.datePattern='.'yyyyMMdd
+log4j.appender.Root.append=true
+log4j.appender.Root.layout=org.apache.log4j.PatternLayout
+log4j.appender.Root.layout.ConversionPattern=%d %p %m%n
+!
diff --git a/datarouter-node/src/main/resources/log4j.properties.tmpl b/datarouter-node/src/main/resources/log4j.properties.tmpl
new file mode 100644
index 00000000..299edbfe
--- /dev/null
+++ b/datarouter-node/src/main/resources/log4j.properties.tmpl
@@ -0,0 +1,11 @@
+cat <<!EOF
+log4j.debug=FALSE
+log4j.rootLogger=INFO,Root
+
+log4j.appender.Root=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.Root.file=C:/Users/sg481n/node.log
+log4j.appender.Root.datePattern='.'yyyyMMdd
+log4j.appender.Root.append=true
+log4j.appender.Root.layout=org.apache.log4j.PatternLayout
+log4j.appender.Root.layout.ConversionPattern=%d %p %m%n
+!EOF
diff --git a/datarouter-node/src/main/resources/logback.xml b/datarouter-node/src/main/resources/logback.xml
new file mode 100644
index 00000000..a47486d9
--- /dev/null
+++ b/datarouter-node/src/main/resources/logback.xml
@@ -0,0 +1,405 @@
+<!--
+ ============LICENSE_START==================================================
+ * org.onap.dmaap
+ * ===========================================================================
+ * Copyright © 2017 AT&T Intellectual Property. 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.
+ * ============LICENSE_END====================================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ *
+-->
+<configuration scan="true" scanPeriod="3 seconds" debug="true">
+ <!--<jmxConfigurator /> -->
+ <!-- directory path for all other type logs -->
+ <!-- property name="logDir" value="/home/eby/dr2/logs" / -->
+ <property name="logDir" value="/opt/app/datartr/logs" />
+
+ <!-- directory path for debugging type logs -->
+ <!-- property name="debugDir" value="/home/eby/dr2/debug-logs" /-->
+
+ <!-- specify the component name
+ <ECOMP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
+ <!-- This creates the MSO directory in in the LogDir which is not needed, mentioned last directory of the path-->
+ <!-- property name="componentName" value="logs"></property -->
+
+ <!-- log file names -->
+ <property name="generalLogName" value="apicalls" />
+ <!-- name="securityLogName" value="security" -->
+ <!-- name="performanceLogName" value="performance" -->
+ <!-- name="serverLogName" value="server" -->
+ <!-- name="policyLogName" value="policy"-->
+ <property name="errorLogName" value="errors" />
+ <!-- name="metricsLogName" value="metrics" -->
+ <!-- name="auditLogName" value="audit" -->
+ <!-- name="debugLogName" value="debug" -->
+ <property name="jettyAndNodeLogName" value="node"></property>
+ <property name="defaultPattern" value="%d{MM/dd-HH:mm:ss.SSS}|%logger|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|%msg%n" />
+ <property name="jettyAndNodeLoggerPattern" value="%d{MM/dd-HH:mm:ss.SSS}|%logger|%thread|%.-5level|%msg%n" />
+
+ <property name="debugLoggerPattern" value="%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|[%caller{3}]|%msg%n" />
+
+ <property name="logDirectory" value="${logDir}" />
+ <!-- property name="debugLogDirectory" value="${debugDir}/${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>
+ <filter class="ch.qos.logback.classic.filter.LevelFilter">
+ <level>INFO</level>
+ <onMatch>ACCEPT</onMatch>
+ <onMismatch>DENY</onMismatch>
+ </filter>
+ <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>
+ <outputPatternAsHeader>true</outputPatternAsHeader>
+ <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. -->
+
+ <!--appender name="EELFAudit"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${auditLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${logDirectory}/${auditLogName}.%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="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>${defaultPattern}</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>
+ <filter class="ch.qos.logback.classic.filter.LevelFilter">
+ <level>ERROR</level>
+ <onMatch>ACCEPT</onMatch>
+ <onMismatch>DENY</onMismatch>
+ </filter>
+ <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>${defaultPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="EELFError"/>
+ </appender>
+
+ <!-- ============================================================================ -->
+ <appender name="jettyAndNodelog"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDirectory}/${jettyAndNodeLogName}.log</file>
+ <filter class="com.att.research.datarouter.node.eelf.EELFFilter" />
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${logDirectory}/${jettyAndNodeLogName}.%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>${jettyAndNodeLoggerPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncEELFjettyAndNodelog" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="jettyAndNodelog" />
+ <includeCallerData>true</includeCallerData>
+ </appender>
+
+ <!-- ============================================================================ -->
+
+
+ <!--appender name="EELFDebug"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${debugLogDirectory}/${debugLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <fileNamePattern>${debugLogDirectory}/${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.error" level="error" additivity="false">
+ <appender-ref ref="asyncEELFError" />
+ </logger>
+
+ <logger name="log4j.logger.org.eclipse.jetty" additivity="false" level="info">
+ <appender-ref ref="asyncEELFjettyAndNodelog"/>
+ </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="com.att.eelf.audit" 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.debug" level="debug" additivity="false">
+ <appender-ref ref="asyncEELFDebug" />
+ </logger-->
+
+
+
+
+ <root level="INFO">
+ <appender-ref ref="asyncEELF" />
+ <appender-ref ref="asyncEELFError" />
+ <appender-ref ref="asyncEELFjettyAndNodelog" />
+ </root>
+
+</configuration>
diff --git a/datarouter-node/src/main/resources/misc/descriptor.xml b/datarouter-node/src/main/resources/misc/descriptor.xml
new file mode 100644
index 00000000..88fccc19
--- /dev/null
+++ b/datarouter-node/src/main/resources/misc/descriptor.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ============LICENSE_START==================================================
+ * org.onap.dmaap
+ * ===========================================================================
+ * Copyright © 2017 AT&T Intellectual Property. 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.
+ * ============LICENSE_END====================================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ *
+-->
+<descriptor version="1" xmlns="http://aft.att.com/swm/descriptor">
+ <platforms>
+ <platform os="Linux" osVersions="*" architecture="*"/>
+ </platforms>
+ <paths>
+ <path name="/opt/app/datartr" user="datartr" group="datartr" permissions="755,644" recursive="true"/>
+ <path name="/opt/app/platform/init.d/drtrnode" user="datartr" group="datartr" permissions="755"/>
+ </paths>
+ <actions>
+ <action type="INIT">
+ <proc stage="POST" user="datartr" group="datartr"/>
+ </action>
+ <action type="FALL">
+ <proc stage="PRE" user="datartr" group="datartr"/>
+ <proc stage="POST" user="datartr" group="datartr"/>
+ </action>
+ <action type="INST">
+ <proc stage="PRE" user="datartr" group="datartr"/>
+ <proc stage="POST" user="datartr" group="datartr"/>
+ </action>
+ <action type="DINST">
+ <proc stage="PRE" user="datartr" group="datartr"/>
+ </action>
+ </actions>
+ <dependencies>
+ <dependencyFilter componentName="com.att.java:jdk8lin" versions="[1.8.0.77-02]" sequence="1"/>
+ <dependencyFilter componentName="com.att.platform:initd" versions="[1.0.15,)" sequence="2"/>
+ <dependencyFilter componentName="com.att.dmaap.datarouter:util" versions="[1.0.7,)" sequence="3"/>
+ </dependencies>
+</descriptor>
diff --git a/datarouter-node/src/main/resources/misc/doaction b/datarouter-node/src/main/resources/misc/doaction
new file mode 100644
index 00000000..617b01d9
--- /dev/null
+++ b/datarouter-node/src/main/resources/misc/doaction
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+cd /opt/app/datartr/etc
+for action in "$@"
+do
+case "$action" in
+'backup')
+ cp log4j.properties log4j.properties.save 2>/dev/null
+ cp node.properties node.properties.save 2>/dev/null
+ cp havecert havecert.save 2>/dev/null
+ ;;
+'stop')
+ /opt/app/platform/init.d/drtrnode stop
+ ;;
+'start')
+ /opt/app/platform/init.d/drtrnode start || exit 1
+ ;;
+'config')
+ /bin/bash log4j.properties.tmpl >log4j.properties
+ /bin/bash node.properties.tmpl >node.properties
+ /bin/bash havecert.tmpl >havecert
+ echo "$AFTSWM_ACTION_NEW_VERSION" >VERSION.node
+ chmod +x havecert
+ rm -f /opt/app/platform/rc.d/K90drtrnode /opt/app/platform/rc.d/S10drtrnode
+ ln -s ../init.d/drtrnode /opt/app/platform/rc.d/K90drtrnode
+ ln -s ../init.d/drtrnode /opt/app/platform/rc.d/S10drtrnode
+ ;;
+'restore')
+ cp log4j.properties.save log4j.properties 2>/dev/null
+ cp node.properties.save node.properties 2>/dev/null
+ cp havecert.save havecert 2>/dev/null
+ ;;
+'clean')
+ rm -f log4j.properties node.properties havecert log4j.properties.save node.properties.save havecert.save SHUTDOWN redirections.dat VERSION.node
+ rm -f /opt/app/platform/rc.d/K90drtrnode /opt/app/platform/rc.d/S10drtrnode
+ ;;
+*)
+ exit 1
+ ;;
+esac
+done
+exit 0
diff --git a/datarouter-node/src/main/resources/misc/drtrnode b/datarouter-node/src/main/resources/misc/drtrnode
new file mode 100644
index 00000000..ba784f36
--- /dev/null
+++ b/datarouter-node/src/main/resources/misc/drtrnode
@@ -0,0 +1,114 @@
+#!/bin/bash
+
+umask 0022
+TZ=GMT0
+export TZ
+PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/java/jdk/jdk180/bin
+export PATH
+CLASSPATH=`echo /opt/app/datartr/etc /opt/app/datartr/lib/*.jar | tr ' ' ':'`
+export CLASSPATH
+
+pids() {
+ ps -ef | grep java | grep node.NodeMain | sed -e 's/[^ ]* *//' -e 's/ .*//'
+}
+
+start() {
+ ID=`id -n -u`
+ GRP=`id -n -g`
+ if [ "$ID" != "root" ]
+ then
+ echo drtrnode must be started as user datartr not $ID
+ exit 1
+ fi
+ if [ "$GRP" != "datartr" ]
+ then
+ echo drtrnode must be started as group datartr not $GRP
+ exit 1
+ fi
+ cd /opt/app/datartr
+ if etc/havecert
+ then
+ echo >/dev/null
+ else
+ echo No certificate file available. Cannot start
+ exit 0
+ fi
+ PIDS=`pids`
+ if [ "$PIDS" != "" ]
+ then
+ echo drtrnode already running
+ exit 0
+ fi
+
+ mkdir -p /opt/app/datartr/spool/s
+ chmod 755 /opt/app/datartr/spool/s
+
+ rm -f /opt/app/datartr/etc/SHUTDOWN
+ nohup java com.att.research.datarouter.node.NodeMain </dev/null >/dev/null 2>&1 &
+ sleep 5
+ PIDS=`pids`
+ if [ "$PIDS" = "" ]
+ then
+ echo drtrnode startup failed
+ else
+ echo drtrnode started
+ fi
+}
+
+stop() {
+ ID=`id -n -u`
+ GRP=`id -n -g`
+ if [ "$ID" != "datartr" ]
+ then
+ echo drtrnode must be stopped as user datartr not $ID
+ exit 1
+ fi
+ if [ "$GRP" != "datartr" ]
+ then
+ echo drtrnode must be stopped as group datartr not $GRP
+ exit 1
+ fi
+ touch /opt/app/datartr/etc/SHUTDOWN
+ PIDS=`pids`
+ if [ "$PIDS" != "" ]
+ then
+ sleep 5
+ kill -9 $PIDS
+ sleep 5
+ echo drtrnode stopped
+ else
+ echo drtrnode not running
+ fi
+}
+
+status() {
+ PIDS=`pids`
+ if [ "$PIDS" != "" ]
+ then
+ echo drtrnode running
+ else
+ echo drtrnode not running
+ fi
+}
+
+case "$1" in
+'start')
+ start
+ ;;
+'stop')
+ stop
+ ;;
+'restart')
+ stop
+ sleep 20
+ start
+ ;;
+'status')
+ status
+ ;;
+*)
+ echo "Usage: $0 { start | stop | restart }"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/datarouter-node/src/main/resources/misc/havecert.tmpl b/datarouter-node/src/main/resources/misc/havecert.tmpl
new file mode 100644
index 00000000..2e813ba3
--- /dev/null
+++ b/datarouter-node/src/main/resources/misc/havecert.tmpl
@@ -0,0 +1,11 @@
+#!/bin/bash
+cat <<!EOF
+TZ=GMT0
+cd /opt/app/datartr;
+if [ -f ${DRTR_NODE_KSTOREFILE:-etc/keystore} ]
+then
+ exit 0
+fi
+echo `date '+%F %T,000'` WARN Certificate file "${DRTR_NODE_KSTOREFILE:-etc/keystore}" is missing >>${DRTR_NODE_LOGS:-logs}/node.log
+exit 1
+!EOF
diff --git a/datarouter-node/src/main/resources/misc/log4j.properties.tmpl b/datarouter-node/src/main/resources/misc/log4j.properties.tmpl
new file mode 100644
index 00000000..24bd3df0
--- /dev/null
+++ b/datarouter-node/src/main/resources/misc/log4j.properties.tmpl
@@ -0,0 +1,11 @@
+cat <<!EOF
+log4j.debug=FALSE
+log4j.rootLogger=INFO,Root
+
+log4j.appender.Root=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.Root.file=${DRTR_NODE_LOGS:-logs}/node.log
+log4j.appender.Root.datePattern='.'yyyyMMdd
+log4j.appender.Root.append=true
+log4j.appender.Root.layout=org.apache.log4j.PatternLayout
+log4j.appender.Root.layout.ConversionPattern=%d %p %m%n
+!EOF
diff --git a/datarouter-node/src/main/resources/misc/node.properties b/datarouter-node/src/main/resources/misc/node.properties
new file mode 100644
index 00000000..fb97702f
--- /dev/null
+++ b/datarouter-node/src/main/resources/misc/node.properties
@@ -0,0 +1,112 @@
+#-------------------------------------------------------------------------------
+# ============LICENSE_START==================================================
+# * org.onap.dmaap
+# * ===========================================================================
+# * Copyright © 2017 AT&T Intellectual Property. 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.
+# * ============LICENSE_END====================================================
+# *
+# * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+# *
+#-------------------------------------------------------------------------------
+#
+# Configuration parameters fixed at startup for the DataRouter node
+#
+# URL to retrieve dynamic configuration
+#
+#ProvisioningURL: ${DRTR_PROV_INTURL}
+ProvisioningURL=https://prov.datarouternew.com:8443/internal/prov
+
+#
+# URL to upload PUB/DEL/EXP logs
+#
+#LogUploadURL: ${DRTR_LOG_URL}
+LogUploadURL=https://prov.datarouternew.com:8443/internal/logs
+
+#
+# The port number for http as seen within the server
+#
+#IntHttpPort: ${DRTR_NODE_INTHTTPPORT:-8080}
+IntHttpPort=8080
+#
+# The port number for https as seen within the server
+#
+IntHttpsPort=8443
+#
+# The external port number for https taking port mapping into account
+#
+ExtHttpsPort=443
+#
+# The minimum interval between fetches of the dynamic configuration
+# from the provisioning server
+#
+MinProvFetchInterval=10000
+#
+# The minimum interval between saves of the redirection data file
+#
+MinRedirSaveInterval=10000
+#
+# The path to the directory where log files are stored
+#
+LogDir=/opt/app/datartr/logs
+#
+# The retention interval (in days) for log files
+#
+LogRetention=30
+#
+# The path to the directories where data and meta data files are stored
+#
+SpoolDir=/opt/app/datartr/spool
+#
+# The path to the redirection data file
+#
+#RedirectionFile: etc/redirections.dat
+#
+# The type of keystore for https
+#
+KeyStoreType: jks
+#
+# The path to the keystore for https
+#
+KeyStoreFile:/opt/app/datartr/self_signed/keystore.jks
+#
+# The password for the https keystore
+#
+KeyStorePassword=changeit
+#
+# The password for the private key in the https keystore
+#
+KeyPassword=changeit
+#
+# The type of truststore for https
+#
+TrustStoreType=jks
+#
+# The path to the truststore for https
+#
+#TrustStoreFile=/usr/lib/jvm/java-8-oracle/jre/lib/security/cacerts
+TrustStoreFile=/opt/app/datartr/self_signed/cacerts.jks
+#
+# The password for the https truststore
+#
+TrustStorePassword=changeit
+#
+# The path to the file used to trigger an orderly shutdown
+#
+QuiesceFile=etc/SHUTDOWN
+#
+# The key used to generate passwords for node to node transfers
+#
+NodeAuthKey=Node123!
+
diff --git a/datarouter-node/src/main/resources/misc/notes b/datarouter-node/src/main/resources/misc/notes
new file mode 100644
index 00000000..f37a8ea2
--- /dev/null
+++ b/datarouter-node/src/main/resources/misc/notes
@@ -0,0 +1,54 @@
+package notes for com.att.dmaap.datarouter:node
+
+This component is for the Data Router Node software.
+
+The following pre-requisite components should already be present:
+ com.att.aft.swm:swm-cli
+ com.att.aft.swm:swm-node
+ - SWM Variables: AFTSWM_AUTOLINK_PARENTS=/opt/app:/opt/app/workload,/opt/app/aft:/opt/app/workload/aft
+ com.att.platform:uam-auto
+ com.att.java:jdk8lin
+ com.att.platform:initd
+ com.att.platform:port-fwd
+ - SWM Variables: PLATFORM_PORT_FWD=80,8080|443,8443
+ com.att.dmaap.datarouter:util
+
+In a non-production environment, the URL for fetching provisioning data from
+the provisioning server must be overridden. This can be done by setting a SWM
+variable prior to installing this component. The production (default) value for
+this variable is:
+ DRTR_PROV_INTURL=https://feeds-drtr.web.att.com/internal/prov
+
+Similarly, the URL for uploading event logs to the log server must be overridden. This can also be done by setting a SWM variable. The production (default) value is:
+ DRTR_LOG_URL=https://feeds-drtr.web.att.com/internal/logs
+
+Other SWM variables that can be set are:
+
+DRTR_NODE_INTHTTPPORT (default 8080)
+ The TCP/IP port number the component should listen on for "go fetch"
+ requests from the provisioning server
+DRTR_NODE_INTHTTPSPORT (default 8443)
+ The TCP/IP port number the component should listen on for publish
+ requests from feed publishers and other nodes
+DRTR_NODE_EXTHTTPSPORT (default 443)
+ The TCP/IP port number the component should use for node-to-node
+ transfers and for sending redirect requests back to publishers
+DRTR_NODE_SPOOL (default /opt/app/datartr/spool)
+ The directory where data files should be saved while in transit
+DRTR_NODE_LOGS (default /opt/app/datartr/logs)
+ The directory where log files should be kept
+DRTR_NODE_LOG_RETENTION (default 30)
+ How long a log file is kept before being deleted
+DRTR_NODE_KSTOREFILE (default /opt/app/datartr/etc/keystore)
+ The java keystore file containing the server certificate and private key
+ for this server
+DRTR_NODE_KSTOREPASS (default changeit)
+ The password for the keystore file
+DRTR_NODE_PVTKEYPASS (default changeit)
+ The password for the private key in the keystore file
+DRTR_NODE_TSTOREFILE (by default, use the truststore from the Java JDK)
+ The java keystore file containing the trusted certificate authority
+ certificates
+DRTR_NODE_TSTOREPASS (default changeit)
+ The password for the trust store file. Only applies if a trust store
+ file is specified.
diff --git a/datarouter-node/src/main/resources/node.properties b/datarouter-node/src/main/resources/node.properties
new file mode 100644
index 00000000..fb97702f
--- /dev/null
+++ b/datarouter-node/src/main/resources/node.properties
@@ -0,0 +1,112 @@
+#-------------------------------------------------------------------------------
+# ============LICENSE_START==================================================
+# * org.onap.dmaap
+# * ===========================================================================
+# * Copyright © 2017 AT&T Intellectual Property. 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.
+# * ============LICENSE_END====================================================
+# *
+# * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+# *
+#-------------------------------------------------------------------------------
+#
+# Configuration parameters fixed at startup for the DataRouter node
+#
+# URL to retrieve dynamic configuration
+#
+#ProvisioningURL: ${DRTR_PROV_INTURL}
+ProvisioningURL=https://prov.datarouternew.com:8443/internal/prov
+
+#
+# URL to upload PUB/DEL/EXP logs
+#
+#LogUploadURL: ${DRTR_LOG_URL}
+LogUploadURL=https://prov.datarouternew.com:8443/internal/logs
+
+#
+# The port number for http as seen within the server
+#
+#IntHttpPort: ${DRTR_NODE_INTHTTPPORT:-8080}
+IntHttpPort=8080
+#
+# The port number for https as seen within the server
+#
+IntHttpsPort=8443
+#
+# The external port number for https taking port mapping into account
+#
+ExtHttpsPort=443
+#
+# The minimum interval between fetches of the dynamic configuration
+# from the provisioning server
+#
+MinProvFetchInterval=10000
+#
+# The minimum interval between saves of the redirection data file
+#
+MinRedirSaveInterval=10000
+#
+# The path to the directory where log files are stored
+#
+LogDir=/opt/app/datartr/logs
+#
+# The retention interval (in days) for log files
+#
+LogRetention=30
+#
+# The path to the directories where data and meta data files are stored
+#
+SpoolDir=/opt/app/datartr/spool
+#
+# The path to the redirection data file
+#
+#RedirectionFile: etc/redirections.dat
+#
+# The type of keystore for https
+#
+KeyStoreType: jks
+#
+# The path to the keystore for https
+#
+KeyStoreFile:/opt/app/datartr/self_signed/keystore.jks
+#
+# The password for the https keystore
+#
+KeyStorePassword=changeit
+#
+# The password for the private key in the https keystore
+#
+KeyPassword=changeit
+#
+# The type of truststore for https
+#
+TrustStoreType=jks
+#
+# The path to the truststore for https
+#
+#TrustStoreFile=/usr/lib/jvm/java-8-oracle/jre/lib/security/cacerts
+TrustStoreFile=/opt/app/datartr/self_signed/cacerts.jks
+#
+# The password for the https truststore
+#
+TrustStorePassword=changeit
+#
+# The path to the file used to trigger an orderly shutdown
+#
+QuiesceFile=etc/SHUTDOWN
+#
+# The key used to generate passwords for node to node transfers
+#
+NodeAuthKey=Node123!
+