Add Gizmo (crud-service) in test-config 25/34325/1
authorSanchez, Gabriel (gs882h) <gabriel.sanchez@amdocs.com>
Tue, 6 Mar 2018 17:46:21 +0000 (17:46 +0000)
committerSanchez, Gabriel (gs882h) <gabriel.sanchez@amdocs.com>
Tue, 6 Mar 2018 17:46:21 +0000 (17:46 +0000)
Certs, drop pre-v11 and rename cert to champ

Issue-ID: AAI-836

Change-Id: I859ded7728bf206bc4cdde7ee02f93b942258b4e
Signed-off-by: gabriel.sanchez <gabriel.sanchez@amdocs.com>
crud-service/appconfig/auth/champ-cert.p12 [new file with mode: 0644]
crud-service/appconfig/auth/crud_policy.json [new file with mode: 0644]
crud-service/appconfig/auth/tomcat_keystore [new file with mode: 0644]
crud-service/appconfig/crud-api.properties [new file with mode: 0644]
crud-service/appconfig/model/edge_properties_v11.json [new file with mode: 0644]
crud-service/appconfig/model/edge_properties_v12.json [new file with mode: 0644]
crud-service/dynamic/conf/crud-beans.xml [new file with mode: 0644]
deploy_vm1.sh
docker-compose-app.yml

diff --git a/crud-service/appconfig/auth/champ-cert.p12 b/crud-service/appconfig/auth/champ-cert.p12
new file mode 100644 (file)
index 0000000..ee57120
Binary files /dev/null and b/crud-service/appconfig/auth/champ-cert.p12 differ
diff --git a/crud-service/appconfig/auth/crud_policy.json b/crud-service/appconfig/auth/crud_policy.json
new file mode 100644 (file)
index 0000000..d60312b
--- /dev/null
@@ -0,0 +1,18 @@
+{
+       "roles": [
+               {
+                       "name": "admin",
+                       "functions": [
+                               {
+                                       "name": "crud", "methods": [ { "name": "GET" },{ "name": "DELETE" }, { "name": "PUT" }, { "name": "POST" }, { "name": "PATCH" } ]
+                               }
+                       ],
+
+                       "users": [
+                               {
+                                       "username": "CN=ONAP, OU=ONAP, O=ONAP, L=Ottawa, ST=Ontario, C=CA"
+                               }
+                       ]
+               }
+       ]
+}
diff --git a/crud-service/appconfig/auth/tomcat_keystore b/crud-service/appconfig/auth/tomcat_keystore
new file mode 100644 (file)
index 0000000..9eec841
Binary files /dev/null and b/crud-service/appconfig/auth/tomcat_keystore differ
diff --git a/crud-service/appconfig/crud-api.properties b/crud-service/appconfig/crud-api.properties
new file mode 100644 (file)
index 0000000..2653302
--- /dev/null
@@ -0,0 +1,5 @@
+# CRUD-API configuration
+
+crud.async.request.timeout=60000
+crud.async.response.process.poll.interval=1000
+crud.collection.properties.key=properties
\ No newline at end of file
diff --git a/crud-service/appconfig/model/edge_properties_v11.json b/crud-service/appconfig/model/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/crud-service/appconfig/model/edge_properties_v12.json b/crud-service/appconfig/model/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/crud-service/dynamic/conf/crud-beans.xml b/crud-service/dynamic/conf/crud-beans.xml
new file mode 100644 (file)
index 0000000..1945050
--- /dev/null
@@ -0,0 +1,30 @@
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:util="http://www.springframework.org/schema/util"
+    xsi:schemaLocation="
+    http://www.springframework.org/schema/beans
+    http://www.springframework.org/schema/beans/spring-beans.xsd
+    http://www.springframework.org/schema/util
+    http://www.springframework.org/schema/util/spring-util.xsd
+    ">
+
+    <bean id="champDao" class="org.onap.crud.dao.champ.ChampDao">
+        <constructor-arg name="champUrl" value="https://localhost:9522/services/champ-service/v1/"/>
+        <constructor-arg name="certPassword" value="OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10"/>
+    </bean>
+    
+    <bean id="graphDataService" class="org.onap.crud.service.CrudGraphDataService">
+        <constructor-arg name="dao" ref="champDao"/>
+        <constructor-arg name="daoForGet" ref="champDao"/>
+    </bean>
+
+    <bean id="crudRestService" class="org.onap.crud.service.CrudRestService" init-method="startup">
+        <constructor-arg name="graphDataService" ref="graphDataService"/>
+    </bean>
+
+    <bean id="aaiResourceService" class="org.onap.crud.service.AaiResourceService"
+        init-method="startup">
+        <constructor-arg name="graphDataService" ref="graphDataService"/>
+    </bean>
+
+</beans>
index 2c1376b..fd97fe6 100755 (executable)
@@ -14,6 +14,7 @@ export DATA_ROUTER_LOGS="/opt/aai/logroot/AAI-DATA-ROUTER";
 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";
 
 if [ ! -d "$RESOURCES_LOGS" ];
 then
@@ -57,6 +58,12 @@ then
     mkdir -p $CHAMP_LOGS;
 fi;
 
+if [ ! -d "$CRUD_LOGS" ];
+then
+    echo "Warning: Unable to find the volume directory $CRUD_LOGS so creating it as regular directory";
+    mkdir -p $CRUD_LOGS;
+fi;
+
 export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1);
 export DOCKER_REGISTRY="${DOCKER_REGISTRY:-localhost:5000}";
 export AAI_HAPROXY_IMAGE="${AAI_HAPROXY_IMAGE:-aaionap/haproxy}";
@@ -131,6 +138,9 @@ docker tag $DOCKER_REGISTRY/onap/sparky-be:$DOCKER_IMAGE_VERSION $DOCKER_REGISTR
 docker pull ${DOCKER_REGISTRY}/onap/champ-service:${DOCKER_IMAGE_VERSION};
 docker tag $DOCKER_REGISTRY/onap/champ-service:$DOCKER_IMAGE_VERSION $DOCKER_REGISTRY/onap/champ-service:latest;
 
+docker pull ${DOCKER_REGISTRY}/onap/crud-service:${DOCKER_IMAGE_VERSION};
+docker tag $DOCKER_REGISTRY/onap/crud-service:$DOCKER_IMAGE_VERSION $DOCKER_REGISTRY/onap/crud-service:latest;
+
 # cleanup
 $DOCKER_COMPOSE_CMD stop
 $DOCKER_COMPOSE_CMD rm -f -v
@@ -161,6 +171,8 @@ $DOCKER_COMPOSE_CMD up -d model-loader datarouter aai.searchservice.simpledemo.o
 
 $DOCKER_COMPOSE_CMD up -d champ-service
 
+$DOCKER_COMPOSE_CMD up -d crud-service
+
 echo "A&AI Microservices are successfully started";
 
 crontab < /opt/test-config/aaicrontab
index 912309f..b20d06a 100644 (file)
@@ -149,6 +149,30 @@ services:
       options:
         max-size: "30m"
         max-file: "5"
+        
+  crud-service:
+    image: ${DOCKER_REGISTRY}/onap/crud-service
+    hostname: crud-service
+    volumes:
+      - ${CRUD_LOGS}:/logs
+      - /opt/test-config/crud-service/appconfig:/opt/app/crud-service/config
+      - /opt/test-config/crud-service/dynamic:/opt/app/crud-service/dynamic
+    ports:
+      - 9520:9520
+    environment:
+      - CONFIG_HOME=/opt/app/crud-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/crud-service/dynamic/conf
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
 
 networks:
   default: