fixed config so data-router start 60/70160/1
authorfpaquett <francis.paquette@amdocs.com>
Wed, 10 Oct 2018 12:51:06 +0000 (08:51 -0400)
committerfpaquett <francis.paquette@amdocs.com>
Wed, 10 Oct 2018 12:51:22 +0000 (08:51 -0400)
Fixed 3 issues:

- Needed to add another mount point for logs as the event-client-library
  expects logs in /opt/app/data-router/logs
- Added the configuration regarding the use of aai-schema-ingest 1.3.0
- Fixed configuration parameters regaring the move to https to connect to
  dmaap.

Issue-ID: AAI-1699
Change-Id: Ia92cd44c142433d0d0b308cc77f1f10e95acad60
Signed-off-by: fpaquett <francis.paquette@amdocs.com>
kubernetes/aai/charts/aai-data-router/resources/config/schemaIngest.properties
kubernetes/aai/charts/aai-data-router/resources/dynamic/conf/data-router-oxm.xml [new file with mode: 0644]
kubernetes/aai/charts/aai-data-router/resources/dynamic/conf/entity-event-policy.xml
kubernetes/aai/charts/aai-data-router/templates/configmap.yaml
kubernetes/aai/charts/aai-data-router/templates/deployment.yaml

index d091651..8c680b5 100644 (file)
 # ============LICENSE_END=========================================================\r
 #\r
 \r
-# Properties for the SchemaLocationsBean\r
 \r
-# The AAI Schema jar will be unpacked to bundleconfig/etc\r
-schemaConfig=NA\r
-# OXM files named aai_oxm_v*.xml are unpacked here:\r
-nodeDir=/opt/app/data-router/bundleconfig/etc/oxm\r
-# DB Edge Rules are unpacked here:\r
+# Properties for the SchemaLocationsBean\r
+# Files named aai_oxm_v*.xml are unpacked here:\r
+nodeDir=/opt/app/data-router/onap/oxm\r
+# Dummy folder/directory:\r
 edgeDir=\r
-# DB Edge Property files are copied here:\r
-edgePropsDir=\r
+\r
+# Properties required by the aai-common - aai-schema-ingest lib as of 1.3.0\r
+schema.configuration.location=N/A\r
+schema.nodes.location=/opt/app/data-router/onap/oxm/\r
+schema.edges.location=\r
+# These versions need to exist if they are included in the list\r
+schema.version.list=v9,v10,v11,v12,v13,v14\r
+# Decalares the oxm version to load\r
+schema.version.api.default=v14\r
+\r
+# Don't use these properties in our application, need to be set to prevent an exception on startup (see SchemaVersions bean)\r
+schema.version.depth.start=v14\r
+schema.version.related.link.start=v14\r
+schema.version.app.root.start=v14\r
+schema.version.namespace.change.start=v14\r
+schema.version.edge.label.start=v14\r
+~\r
+\r
diff --git a/kubernetes/aai/charts/aai-data-router/resources/dynamic/conf/data-router-oxm.xml b/kubernetes/aai/charts/aai-data-router/resources/dynamic/conf/data-router-oxm.xml
new file mode 100644 (file)
index 0000000..c945c39
--- /dev/null
@@ -0,0 +1,22 @@
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
+        xmlns:task="http://www.springframework.org/schema/task"
+        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+                http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd
+                http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd">
+
+  <context:property-placeholder
+        location="file:${CONFIG_HOME}/schemaIngest.properties"
+        ignore-unresolvable="true" />
+
+  <bean id="schemaLocationsBean" class="org.onap.aai.setup.SchemaLocationsBean">
+                <!-- When running with AJSC these properties must be injected directly.
+                                             The reason for this is unknown. -->
+                <property name="nodeDirectory" value="${nodeDir}" />
+                <property name="edgeDirectory" value="${edgeDir}" />
+        </bean>
+
+  <bean id="schemaVersions" class="org.onap.aai.setup.SchemaVersions"/>
+
+</beans>
+
index 60e71ec..b5e4129 100644 (file)
@@ -32,6 +32,8 @@
     <property name="searchCertName" value="client-cert-onap.p12" />
     <property name="searchKeystorePwd" value="OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10" />
     <property name="searchKeystore" value="tomcat_keystore" />
+    <property name="schemaVersions" ref="schemaVersions" />
+    <property name="schemaLocationsBean" ref="schemaLocationsBean" />
   </bean>
   
   <bean id="consumerBeanEntityEvent" class="org.onap.aai.event.client.DMaaPEventConsumer" >
@@ -45,7 +47,7 @@
     <constructor-arg name="messageLimit" value="100" />
     <constructor-arg name="transportType" value="HTTPAUTH" />
     <constructor-arg name="protocol" value="{{.Values.event.protocol}}" />
-    <constructor-arg name="contentType" value="application/json" />
+    <constructor-arg name="filter"><null /></constructor-arg>
   </bean>
 
   <bean id="entityEventPolicy" class="org.onap.aai.datarouter.policy.EntityEventPolicy" init-method="startup" >
index 23d3dbb..c8532b2 100644 (file)
@@ -37,7 +37,9 @@ metadata:
     heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/dynamic/routes/entity-event.route").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/dynamic/conf/data-router-oxm.xml").AsConfig . | indent 2 }}
 {{ tpl (.Files.Glob "resources/dynamic/conf/entity-event-policy.xml").AsConfig . | indent 2 }}
+
 ---
 apiVersion: v1
 kind: ConfigMap
@@ -63,4 +65,4 @@ metadata:
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
 data:
-{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
\ No newline at end of file
+{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
index 83542da..a7ecbce 100644 (file)
@@ -94,11 +94,17 @@ spec:
         - mountPath: /opt/app/data-router/dynamic/conf/entity-event-policy.xml
           subPath: entity-event-policy.xml
           name: {{ include "common.fullname" . }}-dynamic-policy
+        - mountPath: /opt/app/data-router/dynamic/conf/data-router-oxm.xml
+          subPath: data-router-oxm.xml
+          name: {{ include "common.fullname" . }}-dynamic-oxm
         - mountPath: /opt/app/data-router/bundleconfig/etc/logback.xml
           name: {{ include "common.fullname" . }}-logback-config
           subPath: logback.xml
         - mountPath: /var/log/onap
           name: {{ include "common.fullname" . }}-logs
+        - mountPath: /logs
+          name: {{ include "common.fullname" . }}-logs
+
         ports:
         - containerPort: {{ .Values.service.internalPort }}
         {{- if eq .Values.liveness.enabled true }}
@@ -126,6 +132,8 @@ spec:
           name: filebeat-conf
         - mountPath: /var/log/onap
           name: {{ include "common.fullname" . }}-logs
+        - mountPath: /logs
+          name: {{ include "common.fullname" . }}-logs
         - mountPath: /usr/share/filebeat/data
           name: aai-filebeat
       volumes:
@@ -154,6 +162,9 @@ spec:
       - name: {{ include "common.fullname" . }}-dynamic-policy
         configMap:
           name: {{ include "common.fullname" . }}-dynamic
+      - name: {{ include "common.fullname" . }}-dynamic-oxm
+        configMap:
+          name: {{ include "common.fullname" . }}-dynamic
       - name: {{ include "common.fullname" . }}-logs
         emptyDir: {}
       - name: {{ include "common.fullname" . }}-logback-config