From 234a998a34c44e97533827076a32f8d972fc93da Mon Sep 17 00:00:00 2001 From: Michael Arrastia Date: Mon, 5 Mar 2018 13:33:35 +0000 Subject: Add champ-service configuration Define environment specific configuration in champ-beans.xml (test-config/champ-service/dynamic/conf/champ-beans.xml): Graph host: key="storage.hostname" value="aai.hbase.simpledemo.onap.org" Graph port: key="storage.hbase.ext.hbase.zookeeper.property.clientPort" value="2181" key="storage.port" value="2181" Event bus host: name="host" value="mr.api.simpledemo.openecomp.org:3904" Change-Id: I7c9c029047dd402dcd4a9d4023c33c532cf07e10 Issue-ID: AAI-815 Signed-off-by: Michael Arrastia --- champ-service/appconfig/auth/champ_policy.json | 18 ++++++ champ-service/appconfig/auth/tomcat_keystore | Bin 0 -> 2214 bytes champ-service/appconfig/champ-api.properties | 7 +++ champ-service/dynamic/conf/champ-beans.xml | 80 +++++++++++++++++++++++++ deploy_vm1.sh | 12 ++++ docker-compose-app.yml | 27 ++++++++- 6 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 champ-service/appconfig/auth/champ_policy.json create mode 100644 champ-service/appconfig/auth/tomcat_keystore create mode 100644 champ-service/appconfig/champ-api.properties create mode 100644 champ-service/dynamic/conf/champ-beans.xml diff --git a/champ-service/appconfig/auth/champ_policy.json b/champ-service/appconfig/auth/champ_policy.json new file mode 100644 index 0000000..a39a146 --- /dev/null +++ b/champ-service/appconfig/auth/champ_policy.json @@ -0,0 +1,18 @@ +{ + "roles": [ + { + "name": "admin", + "functions": [ + { + "name": "champ", "methods": [ { "name": "GET" },{ "name": "DELETE" }, { "name": "PUT" }, { "name": "POST" } ] + } + ], + + "users": [ + { + "username": "CN=ONAP, OU=ONAP, O=ONAP, L=Ottawa, ST=Ontario, C=CA" + } + ] + } + ] +} diff --git a/champ-service/appconfig/auth/tomcat_keystore b/champ-service/appconfig/auth/tomcat_keystore new file mode 100644 index 0000000..9eec841 Binary files /dev/null and b/champ-service/appconfig/auth/tomcat_keystore differ diff --git a/champ-service/appconfig/champ-api.properties b/champ-service/appconfig/champ-api.properties new file mode 100644 index 0000000..9ad9b33 --- /dev/null +++ b/champ-service/appconfig/champ-api.properties @@ -0,0 +1,7 @@ +Replace with your actual properties file. Should contain something like: + +keyName=aai-uuid +sourceOfTruthName=source-of-truth +createdTsName=aai-created-ts +lastModTsName=aai-last-mod-ts +collectionPropertiesKey=properties \ No newline at end of file diff --git a/champ-service/dynamic/conf/champ-beans.xml b/champ-service/dynamic/conf/champ-beans.xml new file mode 100644 index 0000000..28b4d8c --- /dev/null +++ b/champ-service/dynamic/conf/champ-beans.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/deploy_vm1.sh b/deploy_vm1.sh index a5a25d2..2c1376b 100755 --- a/deploy_vm1.sh +++ b/deploy_vm1.sh @@ -13,6 +13,7 @@ export SEARCH_LOGS="/opt/aai/logroot/AAI-SEARCH"; 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"; if [ ! -d "$RESOURCES_LOGS" ]; then @@ -50,6 +51,12 @@ then mkdir -p $UI_LOGS; fi; +if [ ! -d "$CHAMP_LOGS" ]; +then + echo "Warning: Unable to find the volume directory $CHAMP_LOGS so creating it as regular directory"; + mkdir -p $CHAMP_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}"; @@ -121,6 +128,9 @@ docker tag $DOCKER_REGISTRY/onap/model-loader:$DOCKER_IMAGE_VERSION $DOCKER_REGI docker pull ${DOCKER_REGISTRY}/onap/sparky-be:${DOCKER_IMAGE_VERSION}; docker tag $DOCKER_REGISTRY/onap/sparky-be:$DOCKER_IMAGE_VERSION $DOCKER_REGISTRY/onap/sparky-be:latest; +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; + # cleanup $DOCKER_COMPOSE_CMD stop $DOCKER_COMPOSE_CMD rm -f -v @@ -149,6 +159,8 @@ $DOCKER_COMPOSE_CMD up -d sparky-be $DOCKER_COMPOSE_CMD up -d model-loader datarouter aai.searchservice.simpledemo.openecomp.org +$DOCKER_COMPOSE_CMD up -d champ-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 6a6ccff..912309f 100644 --- a/docker-compose-app.yml +++ b/docker-compose-app.yml @@ -124,7 +124,32 @@ services: options: max-size: "30m" max-file: "5" - + + champ-service: + image: ${DOCKER_REGISTRY}/onap/champ-service + hostname: champ-service + volumes: + - ${CHAMP_LOGS}:/logs + - /opt/test-config/champ-service/appconfig:/opt/app/champ-service/config + - /opt/test-config/champ-service/dynamic:/opt/app/champ-service/dynamic + ports: + - 9522:9522 + environment: + - CONFIG_HOME=/opt/app/champ-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/champ-service/dynamic/conf + - GRAPHIMPL=titan-deps + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + networks: default: driver: bridge -- cgit 1.2.3-korg