Add test-config for spike 53/59153/1
authormichaere <michaere@amdocs.com>
Mon, 6 Aug 2018 10:40:10 +0000 (11:40 +0100)
committermichaere <michaere@amdocs.com>
Mon, 6 Aug 2018 10:52:55 +0000 (11:52 +0100)
Including beans.xml and app config and referenced in start shell and
docker compose yaml.

Issue-ID: AAI-1441

Change-Id: I77dfa98f36a6eea710775477c2cf03797c8dd8dd
Signed-off-by: michaere <michaere@amdocs.com>
13 files changed:
deploy_vm1.sh
docker-compose-app.yml
spike-service/appconfig/auth/tomcat_keystore [new file with mode: 0644]
spike-service/appconfig/model/edge_props/edge_properties_v10.json [new file with mode: 0644]
spike-service/appconfig/model/edge_props/edge_properties_v11.json [new file with mode: 0644]
spike-service/appconfig/model/edge_props/edge_properties_v12.json [new file with mode: 0644]
spike-service/appconfig/model/edge_props/edge_properties_v13.json [new file with mode: 0644]
spike-service/appconfig/model/edge_props/edge_properties_v14.json [new file with mode: 0644]
spike-service/appconfig/model/edge_props/edge_properties_v7.json [new file with mode: 0644]
spike-service/appconfig/model/edge_props/edge_properties_v8.json [new file with mode: 0644]
spike-service/appconfig/model/edge_props/edge_properties_v9.json [new file with mode: 0644]
spike-service/appconfig/spike.properties [new file with mode: 0644]
spike-service/dynamic/conf/spike-beans.xml [new file with mode: 0644]

index f643bcb..9cd1cf8 100755 (executable)
@@ -15,6 +15,7 @@ export MODEL_LOADER_LOGS="/opt/aai/logroot/AAI-MODEL-LOADER";
 export UI_LOGS="/opt/aai/logroot/AAI-UI";
 export CHAMP_LOGS="/opt/aai/logroot/AAI-CHAMP-SERVICE";
 export CRUD_LOGS="/opt/aai/logroot/AAI-CRUD-SERVICE";
+export SPIKE_LOGS="/opt/aai/logroot/AAI-SPIKE-SERVICE";
 export BABEL_LOGS="/opt/aai/logroot/AAI-BAS";
 
 if [ ! -d "$RESOURCES_LOGS" ];
@@ -65,6 +66,12 @@ then
     mkdir -p $CRUD_LOGS;
 fi;
 
+if [ ! -d "$SPIKE_LOGS" ];
+then
+    echo "Warning: Unable to find the volume directory $SPIKE_LOGS so creating it as regular directory";
+    mkdir -p $SPIKE_LOGS;
+fi;
+
 if [ ! -d "$BABEL_LOGS" ];
 then
     echo "Warning: Unable to find the volume directory $BABEL_LOGS so creating it as regular directory";
@@ -91,6 +98,7 @@ MODEL_LOADER_DOCKER_IMAGE_VERSION=1.2.1
 SPARKY_BE_DOCKER_IMAGE_VERSION=1.2.1
 CHAMP_DOCKER_IMAGE_VERSION=1.2.3
 GIZMO_DOCKER_IMAGE_VERSION=1.2.0
+SPIKE_DOCKER_IMAGE_VERSION=1.2.0
 BABEL_DOCKER_IMAGE_VERSION=1.2.0
 
 docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
@@ -158,6 +166,9 @@ docker tag $DOCKER_REGISTRY/onap/champ:$CHAMP_DOCKER_IMAGE_VERSION $DOCKER_REGIS
 docker pull ${DOCKER_REGISTRY}/onap/gizmo:${GIZMO_DOCKER_IMAGE_VERSION};
 docker tag $DOCKER_REGISTRY/onap/gizmo:$GIZMO_DOCKER_IMAGE_VERSION $DOCKER_REGISTRY/onap/gizmo:latest;
 
+docker pull ${DOCKER_REGISTRY}/onap/spike:${SPIKE_DOCKER_IMAGE_VERSION};
+docker tag $DOCKER_REGISTRY/onap/spike:$SPIKE_DOCKER_IMAGE_VERSION $DOCKER_REGISTRY/onap/spike:latest;
+
 docker pull ${DOCKER_REGISTRY}/onap/babel:${BABEL_DOCKER_IMAGE_VERSION};
 docker tag $DOCKER_REGISTRY/onap/babel:$BABEL_DOCKER_IMAGE_VERSION $DOCKER_REGISTRY/onap/babel:latest;
 
@@ -199,6 +210,8 @@ $DOCKER_COMPOSE_CMD up -d champ-service
 
 $DOCKER_COMPOSE_CMD up -d crud-service
 
+$DOCKER_COMPOSE_CMD up -d spike-service
+
 $DOCKER_COMPOSE_CMD up -d babel
 
 echo "A&AI Microservices are successfully started";
index 41fc90c..256579c 100644 (file)
@@ -186,6 +186,30 @@ services:
       options:
         max-size: "30m"
         max-file: "5"
+        
+  spike-service:
+    image: ${DOCKER_REGISTRY}/onap/spike
+    hostname: spike-service
+    volumes:
+      - ${SPIKE_LOGS}:/logs
+      - /opt/test-config/spike-service/appconfig:/opt/app/spike-service/config
+      - /opt/test-config/spike-service/dynamic:/opt/app/spike-service/dynamic
+    ports:
+      - 9518:9518
+    environment:
+      - CONFIG_HOME=/opt/app/spike-service/config/
+      - KEY_STORE_PASSWORD=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
+      - KEY_MANAGER_PASSWORD=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10
+      - AJSC_JETTY_ThreadCount_MIN=5
+      - AJSC_JETTY_ThreadCount_MAX=200
+      - AJSC_JETTY_BLOCKING_QUEUE_SIZE=200
+      - MAX_HEAP=1024
+      - SERVICE_BEANS=/opt/app/spike-service/dynamic/conf
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
 
   babel:
     image: ${DOCKER_REGISTRY}/onap/babel
diff --git a/spike-service/appconfig/auth/tomcat_keystore b/spike-service/appconfig/auth/tomcat_keystore
new file mode 100644 (file)
index 0000000..9eec841
Binary files /dev/null and b/spike-service/appconfig/auth/tomcat_keystore differ
diff --git a/spike-service/appconfig/model/edge_props/edge_properties_v10.json b/spike-service/appconfig/model/edge_props/edge_properties_v10.json
new file mode 100644 (file)
index 0000000..7cbddae
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "isParent":"java.lang.Boolean",
+  "isParent-REV":"java.lang.Boolean",
+  "usesResource":"java.lang.Boolean",
+  "usesResource-REV":"java.lang.Boolean",
+  "SVC-INFRA":"java.lang.Boolean",
+  "SVC-INFRA-REV":"java.lang.Boolean",
+  "hasDelTarget":"java.lang.Boolean",
+  "hasDelTarget-REV":"java.lang.Boolean"
+}
diff --git a/spike-service/appconfig/model/edge_props/edge_properties_v11.json b/spike-service/appconfig/model/edge_props/edge_properties_v11.json
new file mode 100644 (file)
index 0000000..8d00636
--- /dev/null
@@ -0,0 +1,6 @@
+{
+        "contains-other-v": "java.lang.String",
+        "delete-other-v": "java.lang.String",
+        "SVC-INFRA": "java.lang.String",
+        "prevent-delete": "java.lang.String"
+}
\ No newline at end of file
diff --git a/spike-service/appconfig/model/edge_props/edge_properties_v12.json b/spike-service/appconfig/model/edge_props/edge_properties_v12.json
new file mode 100644 (file)
index 0000000..8d00636
--- /dev/null
@@ -0,0 +1,6 @@
+{
+        "contains-other-v": "java.lang.String",
+        "delete-other-v": "java.lang.String",
+        "SVC-INFRA": "java.lang.String",
+        "prevent-delete": "java.lang.String"
+}
\ No newline at end of file
diff --git a/spike-service/appconfig/model/edge_props/edge_properties_v13.json b/spike-service/appconfig/model/edge_props/edge_properties_v13.json
new file mode 100644 (file)
index 0000000..8d00636
--- /dev/null
@@ -0,0 +1,6 @@
+{
+        "contains-other-v": "java.lang.String",
+        "delete-other-v": "java.lang.String",
+        "SVC-INFRA": "java.lang.String",
+        "prevent-delete": "java.lang.String"
+}
\ No newline at end of file
diff --git a/spike-service/appconfig/model/edge_props/edge_properties_v14.json b/spike-service/appconfig/model/edge_props/edge_properties_v14.json
new file mode 100644 (file)
index 0000000..8d00636
--- /dev/null
@@ -0,0 +1,6 @@
+{
+        "contains-other-v": "java.lang.String",
+        "delete-other-v": "java.lang.String",
+        "SVC-INFRA": "java.lang.String",
+        "prevent-delete": "java.lang.String"
+}
\ No newline at end of file
diff --git a/spike-service/appconfig/model/edge_props/edge_properties_v7.json b/spike-service/appconfig/model/edge_props/edge_properties_v7.json
new file mode 100644 (file)
index 0000000..7cbddae
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "isParent":"java.lang.Boolean",
+  "isParent-REV":"java.lang.Boolean",
+  "usesResource":"java.lang.Boolean",
+  "usesResource-REV":"java.lang.Boolean",
+  "SVC-INFRA":"java.lang.Boolean",
+  "SVC-INFRA-REV":"java.lang.Boolean",
+  "hasDelTarget":"java.lang.Boolean",
+  "hasDelTarget-REV":"java.lang.Boolean"
+}
diff --git a/spike-service/appconfig/model/edge_props/edge_properties_v8.json b/spike-service/appconfig/model/edge_props/edge_properties_v8.json
new file mode 100644 (file)
index 0000000..7cbddae
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "isParent":"java.lang.Boolean",
+  "isParent-REV":"java.lang.Boolean",
+  "usesResource":"java.lang.Boolean",
+  "usesResource-REV":"java.lang.Boolean",
+  "SVC-INFRA":"java.lang.Boolean",
+  "SVC-INFRA-REV":"java.lang.Boolean",
+  "hasDelTarget":"java.lang.Boolean",
+  "hasDelTarget-REV":"java.lang.Boolean"
+}
diff --git a/spike-service/appconfig/model/edge_props/edge_properties_v9.json b/spike-service/appconfig/model/edge_props/edge_properties_v9.json
new file mode 100644 (file)
index 0000000..7cbddae
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "isParent":"java.lang.Boolean",
+  "isParent-REV":"java.lang.Boolean",
+  "usesResource":"java.lang.Boolean",
+  "usesResource-REV":"java.lang.Boolean",
+  "SVC-INFRA":"java.lang.Boolean",
+  "SVC-INFRA-REV":"java.lang.Boolean",
+  "hasDelTarget":"java.lang.Boolean",
+  "hasDelTarget-REV":"java.lang.Boolean"
+}
diff --git a/spike-service/appconfig/spike.properties b/spike-service/appconfig/spike.properties
new file mode 100644 (file)
index 0000000..00b37b5
--- /dev/null
@@ -0,0 +1,7 @@
+# Spike configuration\r
+\r
+spike.event.poll.interval=30000\r
+spike.event.offset.period= 10000\r
+spike.event.queue.capacity=10000\r
+spike.event.queue.delay=10000\r
+spike.props.reserved=source-of-truth,last-mod-source-of-truth,aai-created-ts,aai-last-mod-ts
\ No newline at end of file
diff --git a/spike-service/dynamic/conf/spike-beans.xml b/spike-service/dynamic/conf/spike-beans.xml
new file mode 100644 (file)
index 0000000..befeac2
--- /dev/null
@@ -0,0 +1,49 @@
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+   xmlns:util="http://www.springframework.org/schema/util"\r
+   xsi:schemaLocation="\r
+              http://www.springframework.org/schema/beans\r
+              http://www.springframework.org/schema/beans/spring-beans.xsd\r
+              http://www.springframework.org/schema/util\r
+              http://www.springframework.org/schema/util/spring-util.xsd\r
+              ">\r
+\r
+   <!-- \r
+   <bean id="eventConsumer" class="com.att.ecomp.event.client.KafkaEventConsumer" > \r
+      <constructor-arg name="topic" value="mytopic" /> \r
+      <constructor-arg name="groupId" value="mygroupId" /> \r
+      <constructor-arg name="hosts" ref="hosts" /> \r
+   </bean> \r
+   -->\r
+\r
+   <bean id="eventPublisher" class="org.onap.aai.event.client.DMaaPEventPublisher">\r
+      <constructor-arg name="host" value="mr.api.simpledemo.openecomp.org:3904" />\r
+      <constructor-arg name="topic" value="SpikeRawEventsOnap" />\r
+      <constructor-arg name="username" value="test" />\r
+      <constructor-arg name="password" value="test" />\r
+      <constructor-arg name="maxBatchSize" value="100" />\r
+      <constructor-arg name="maxAgeMs" value="250" />\r
+      <constructor-arg name="delayBetweenBatchesMs" value="50" />\r
+      <constructor-arg name="transportType" value="HTTPAUTH" />\r
+   </bean>\r
+\r
+   <bean id="eventConsumer" class="org.onap.aai.event.client.DMaaPEventConsumer">\r
+      <constructor-arg name="host" value="mr.api.simpledemo.openecomp.org:3904" />\r
+      <constructor-arg name="topic" value="champRawEventsOnap" />\r
+      <constructor-arg name="username" value="test" />\r
+      <constructor-arg name="password" value="test" />\r
+      <constructor-arg name="consumerGroup" value="spike-onap" />\r
+      <constructor-arg name="consumerId" value="spike-onap" />\r
+      <constructor-arg name="timeoutMs" value="1000" />\r
+      <constructor-arg name="messageLimit" value="100" />\r
+      <constructor-arg name="transportType" value="HTTPAUTH" />\r
+      <constructor-arg name="protocol" value="http" />\r
+      <constructor-arg name="filter">\r
+         <null />\r
+      </constructor-arg>\r
+   </bean>\r
+\r
+   <bean id="spikeService" class="org.onap.aai.spike.service.SpikeService" init-method="startup">\r
+      <constructor-arg ref="eventConsumer" />\r
+      <constructor-arg ref="eventPublisher" />\r
+   </bean>\r
+</beans>
\ No newline at end of file