From 3352e2f1c37b5dadd756aada11ef0d822b2a32ca Mon Sep 17 00:00:00 2001 From: "Sanchez, Gabriel (gs882h)" Date: Tue, 6 Mar 2018 17:46:21 +0000 Subject: 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 --- crud-service/appconfig/auth/champ-cert.p12 | Bin 0 -> 4357 bytes crud-service/appconfig/auth/crud_policy.json | 18 +++++++++++++ crud-service/appconfig/auth/tomcat_keystore | Bin 0 -> 2214 bytes crud-service/appconfig/crud-api.properties | 5 ++++ .../appconfig/model/edge_properties_v11.json | 6 +++++ .../appconfig/model/edge_properties_v12.json | 6 +++++ crud-service/dynamic/conf/crud-beans.xml | 30 +++++++++++++++++++++ deploy_vm1.sh | 12 +++++++++ docker-compose-app.yml | 24 +++++++++++++++++ 9 files changed, 101 insertions(+) create mode 100644 crud-service/appconfig/auth/champ-cert.p12 create mode 100644 crud-service/appconfig/auth/crud_policy.json create mode 100644 crud-service/appconfig/auth/tomcat_keystore create mode 100644 crud-service/appconfig/crud-api.properties create mode 100644 crud-service/appconfig/model/edge_properties_v11.json create mode 100644 crud-service/appconfig/model/edge_properties_v12.json create mode 100644 crud-service/dynamic/conf/crud-beans.xml 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 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 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 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 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 @@ + + + + + + + + + + + + + + + + + + + + + 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: -- cgit 1.2.3-korg