From 8ff4f944df28f3adb28c2a305cd45fffa79fc4c5 Mon Sep 17 00:00:00 2001 From: Phillip Leigh Date: Mon, 6 Jan 2020 10:48:47 -0500 Subject: [PATCH] Update AAI Search-data-service from AEE develop branch to ONAP master Issue-ID: AAI-2741 Signed-off-by: Phillip Leigh Change-Id: I93c8c8c224884340d65ad00bfc5d61b2196b0a71 --- pom.xml | 6 +- search-data-service-app/pom.xml | 93 +++++++++++++++++++++- search-data-service-app/src/main/bin/start.sh | 7 +- search-data-service-app/src/main/docker/Dockerfile | 11 ++- 4 files changed, 109 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index ed2455e..41ea623 100644 --- a/pom.xml +++ b/pom.xml @@ -3,8 +3,8 @@ ============LICENSE_START======================================================= org.onap.aai ================================================================================ - Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - Copyright © 2017-2018 Amdocs + Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. + Copyright © 2017-2018 Amdocs ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -84,6 +84,7 @@ maven-deploy-plugin + @@ -100,3 +101,4 @@ + diff --git a/search-data-service-app/pom.xml b/search-data-service-app/pom.xml index 0cf8043..a7099b1 100644 --- a/search-data-service-app/pom.xml +++ b/search-data-service-app/pom.xml @@ -37,6 +37,8 @@ search-data-service + ${basedir}/../target + https://nexus.onap.org 1.8 ${basedir}/src/main/java-gen google_checks.xml @@ -66,26 +68,29 @@ - com.google.code.gson gson + 2.8.2 org.hamcrest hamcrest-library + 1.3 test com.jayway.jsonpath json-path + 2.2.0 com.googlecode.json-simple json-simple + 1.1.1 @@ -131,6 +136,7 @@ com.fasterxml.jackson.core jackson-databind + 2.7.8 @@ -215,11 +221,13 @@ ch.qos.logback logback-classic + 1.2.1 ch.qos.logback logback-core + 1.2.1 @@ -406,6 +414,7 @@ org.apache.maven.plugins maven-compiler-plugin + 3.1 groovy-eclipse-compiler true @@ -425,6 +434,7 @@ + @@ -446,6 +456,44 @@ + + org.apache.maven.plugins + maven-resources-plugin + 2.7 + + + copy-docker-file + package + + copy-resources + + + ${basedir}/../target + true + + + ${basedir}/src/main/docker + true + + **/* + + + + ${basedir} + true + + bundleconfig-local/** + + + + ${basedir}/src/main/bin/ + + + + + + + com.mycila @@ -472,6 +520,9 @@ org.apache.maven.plugins maven-deploy-plugin + + true + org.codehaus.mojo @@ -482,6 +533,7 @@ org.jacoco jacoco-maven-plugin + 0.7.7.201606060606 @@ -494,6 +546,7 @@ ${sonar.jacoco.reportPath} surefireArgLine + true + + maven-clean-plugin + 3.0.0 @@ -578,6 +644,31 @@ + + + maven-resources-plugin + 3.0.2 + + + copy-files-on-build + install + + copy-resources + + + ${basedir}/../target + + + ${basedir}/target + *.jar + false + + + + + + + diff --git a/search-data-service-app/src/main/bin/start.sh b/search-data-service-app/src/main/bin/start.sh index 7f81ee9..ec7788d 100644 --- a/search-data-service-app/src/main/bin/start.sh +++ b/search-data-service-app/src/main/bin/start.sh @@ -14,6 +14,7 @@ if [ -z "$KEY_STORE_PASSWORD" ]; then exit 1 fi + # Changes related to:AAI-2179 # Change aai search-data container processes to run as non-root on the host USER_ID=${LOCAL_USER_ID:-9001} @@ -32,13 +33,14 @@ if [ $(cat /etc/passwd | grep aaiadmin | wc -l) -eq 0 ]; then } fi; +chmod -R 0755 ${MICRO_HOME} chown -R aaiadmin:aaiadmin ${MICRO_HOME} chown -R aaiadmin:aaiadmin ${AJSC_HOME} chown -R aaiadmin:aaiadmin ${SD_LOGS} find ${MICRO_HOME} -name "*.sh" -exec chmod +x {} + -gosu aaiadmin ln -s /logs $MICRO_HOME/logs +gosu aaiadmin ln -snf /logs $MICRO_HOME/logs JAVA_CMD="exec gosu aaiadmin java"; ### PROPS="-DAJSC_HOME=$AJSC_HOME" @@ -56,5 +58,6 @@ if [ ! -z "$TRUST_STORE_LOCATION" ]; then fi JVM_MAX_HEAP=${MAX_HEAP:-1024} +JVM_MIN_HEAP=${JVM_MAX_HEAP} -${JAVA_CMD} $PROPS -jar $BASEDIR/search-data-service-package.jar +${JAVA_CMD} -Xms${JVM_MIN_HEAP}m -Xmx${JVM_MAX_HEAP}m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/onap $PROPS -jar $BASEDIR/search-data-service-app.jar diff --git a/search-data-service-app/src/main/docker/Dockerfile b/search-data-service-app/src/main/docker/Dockerfile index d5cda35..5284e5b 100644 --- a/search-data-service-app/src/main/docker/Dockerfile +++ b/search-data-service-app/src/main/docker/Dockerfile @@ -33,9 +33,14 @@ fi # Build up the deployment folder structure RUN mkdir -p $MICRO_HOME $USERS_HOME /logs WORKDIR $MICRO_HOME -COPY /maven/@project.artifactId@/ . -RUN chmod 755 $BIN_HOME/* \ - && ln -snf /logs $MICRO_HOME/logs +RUN mkdir -p $MICRO_HOME/bundleconfig/etc +ADD search-data-service* $MICRO_HOME/ +RUN mkdir -p $BIN_HOME +COPY *.sh $BIN_HOME +COPY bundleconfig-local $MICRO_HOME/bundleconfig +COPY bundleconfig-local/etc/logback.xml $MICRO_HOME/bundleconfig/etc +RUN chmod -R 755 $BIN_HOME/* $MICRO_HOME/* +RUN ln -snf /logs $MICRO_HOME/logs EXPOSE 9509 9509 -- 2.16.6