summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanchez, Gabriel (gs882h) <gabriel.sanchez@amdocs.com>2018-03-06 17:46:21 +0000
committerSanchez, Gabriel (gs882h) <gabriel.sanchez@amdocs.com>2018-03-06 17:46:21 +0000
commit3352e2f1c37b5dadd756aada11ef0d822b2a32ca (patch)
tree2de8258a438a6275765c277cc7dd7f97d1219cf1
parenta8af13e4b4f8e34c2aea30831db2c33125b55a81 (diff)
Add Gizmo (crud-service) in test-config
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>
-rw-r--r--crud-service/appconfig/auth/champ-cert.p12bin0 -> 4357 bytes
-rw-r--r--crud-service/appconfig/auth/crud_policy.json18
-rw-r--r--crud-service/appconfig/auth/tomcat_keystorebin0 -> 2214 bytes
-rw-r--r--crud-service/appconfig/crud-api.properties5
-rw-r--r--crud-service/appconfig/model/edge_properties_v11.json6
-rw-r--r--crud-service/appconfig/model/edge_properties_v12.json6
-rw-r--r--crud-service/dynamic/conf/crud-beans.xml30
-rwxr-xr-xdeploy_vm1.sh12
-rw-r--r--docker-compose-app.yml24
9 files changed, 101 insertions, 0 deletions
diff --git a/crud-service/appconfig/auth/champ-cert.p12 b/crud-service/appconfig/auth/champ-cert.p12
new file mode 100644
index 0000000..ee57120
--- /dev/null
+++ b/crud-service/appconfig/auth/champ-cert.p12
Binary files differ
diff --git a/crud-service/appconfig/auth/crud_policy.json b/crud-service/appconfig/auth/crud_policy.json
new file mode 100644
index 0000000..d60312b
--- /dev/null
+++ b/crud-service/appconfig/auth/crud_policy.json
@@ -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
index 0000000..9eec841
--- /dev/null
+++ b/crud-service/appconfig/auth/tomcat_keystore
Binary files differ
diff --git a/crud-service/appconfig/crud-api.properties b/crud-service/appconfig/crud-api.properties
new file mode 100644
index 0000000..2653302
--- /dev/null
+++ b/crud-service/appconfig/crud-api.properties
@@ -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
index 0000000..8d00636
--- /dev/null
+++ b/crud-service/appconfig/model/edge_properties_v11.json
@@ -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
index 0000000..8d00636
--- /dev/null
+++ b/crud-service/appconfig/model/edge_properties_v12.json
@@ -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
index 0000000..1945050
--- /dev/null
+++ b/crud-service/dynamic/conf/crud-beans.xml
@@ -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>
diff --git a/deploy_vm1.sh b/deploy_vm1.sh
index 2c1376b..fd97fe6 100755
--- a/deploy_vm1.sh
+++ b/deploy_vm1.sh
@@ -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
diff --git a/docker-compose-app.yml b/docker-compose-app.yml
index 912309f..b20d06a 100644
--- a/docker-compose-app.yml
+++ b/docker-compose-app.yml
@@ -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: