From 76c55b6805cb8a6ab274c2e7723be1efbaaeb294 Mon Sep 17 00:00:00 2001 From: Jennie Jia Date: Wed, 8 Aug 2018 17:13:32 +0000 Subject: Add POMBA SDC Context Builder Dockerfile Issue-ID: LOG-598 Change-Id: Ic73e56046a8a9c1e6da3e9ac2fb41ed62d27bf34 Signed-off-by: Jennie Jia --- pom.xml | 543 ++++++++++++++++++++++------------------ src/main/docker/Dockerfile | 19 ++ src/main/docker/startService.sh | 8 + 3 files changed, 323 insertions(+), 247 deletions(-) create mode 100644 src/main/docker/Dockerfile create mode 100644 src/main/docker/startService.sh diff --git a/pom.xml b/pom.xml index 0e17517..dfbaef0 100644 --- a/pom.xml +++ b/pom.xml @@ -1,272 +1,321 @@ - - 4.0.0 + + 4.0.0 - org.onap.logging-analytics.pomba - pomba-sdc-context-builder - 1.3.0-SNAPSHOT + org.onap.logging-analytics.pomba + pomba-sdc-context-builder + 1.3.0-SNAPSHOT - - org.onap.oparent - oparent - 1.1.1 - - + + org.onap.oparent + oparent + 1.1.1 + + - - 1.2.1 - UTF-8 - 1.2.3 - ${project.build.directory}/generated-resources/swagger - + + 1.2.1 + UTF-8 + 1.2.3 + ${project.build.directory}/generated-resources/swagger + - - - - - org.springframework.boot - spring-boot-dependencies - 1.5.12.RELEASE - pom - import - - + + + + + org.springframework.boot + spring-boot-dependencies + 1.5.12.RELEASE + pom + import + + - + - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-jetty - - - org.springframework.boot - spring-boot-starter - - - ch.qos.logback - logback-classic - - - - - org.springframework.boot - spring-boot-starter-jersey - - - org.springframework.boot - spring-boot-starter-actuator - + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-jetty + + + org.springframework.boot + spring-boot-starter + + + ch.qos.logback + logback-classic + + + + + org.springframework.boot + spring-boot-starter-jersey + + + org.springframework.boot + spring-boot-starter-actuator + - - org.springframework.boot - spring-boot-starter-test - test - + + org.springframework.boot + spring-boot-starter-test + test + - - - org.slf4j - slf4j-api - - - org.onap.logging-analytics - logging-slf4j - 1.2.2-SNAPSHOT - - - com.att.eelf - eelf-core - - - + + + org.slf4j + slf4j-api + + + org.onap.logging-analytics + logging-slf4j + 1.2.2-SNAPSHOT + + + com.att.eelf + eelf-core + + + - - ch.qos.logback - logback-core - ${logback.version} - - - ch.qos.logback - logback-classic - ${logback.version} - + + ch.qos.logback + logback-core + ${logback.version} + + + ch.qos.logback + logback-classic + ${logback.version} + - - org.eclipse.jetty - jetty-security - - - au.com.dius - pact-jvm-provider-junit_2.11 - 3.5.11 - + + org.eclipse.jetty + jetty-security + + + au.com.dius + pact-jvm-provider-junit_2.11 + 3.5.11 + - - io.swagger - swagger-core - 1.5.9 - - - io.swagger - swagger-annotations - 1.5.9 - - - org.glassfish.jersey.core - jersey-client - 2.24 - - - org.glassfish.jersey.core - jersey-common - 2.24 - + + io.swagger + swagger-core + 1.5.9 + + + io.swagger + swagger-annotations + 1.5.9 + + + org.glassfish.jersey.core + jersey-client + 2.24 + + + org.glassfish.jersey.core + jersey-common + 2.24 + - - org.onap.aai.logging-service - common-logging - 1.2.2 - + + org.onap.aai.logging-service + common-logging + 1.2.2 + - - org.onap.aai.logging-service - logging-api - 1.2.2 - + + org.onap.aai.logging-service + logging-api + 1.2.2 + - - org.onap.aai - rest-client - ${aai.rest.client.version} - - - org.apache.logging.log4j - log4j-slf4j-impl - - - + + org.onap.aai + rest-client + ${aai.rest.client.version} + + + org.apache.logging.log4j + log4j-slf4j-impl + + + - - org.openecomp.sdc.sdc-distribution-client - sdc-distribution-client - 1.2.3 - - - org.openecomp.sdc.sdc-tosca - sdc-tosca - 1.2.2 - + + org.openecomp.sdc.sdc-distribution-client + sdc-distribution-client + 1.2.3 + + + org.openecomp.sdc.sdc-tosca + sdc-tosca + 1.2.2 + - - org.openecomp.sdc.jtosca - jtosca - 1.2.1 - - - net.sf.flexjson - flexjson - 3.3 - + + org.openecomp.sdc.jtosca + jtosca + 1.2.1 + + + net.sf.flexjson + flexjson + 3.3 + - - org.onap.logging-analytics.pomba - pomba-audit-common - 1.3.0-SNAPSHOT - + + org.onap.logging-analytics.pomba + pomba-audit-common + 1.3.0-SNAPSHOT + - - org.projectlombok - lombok - 1.18.0 - - + + org.projectlombok + lombok + 1.18.0 + + - - ${project.artifactId} - - - maven-resources-plugin - 3.1.0 - - - copy-resources - - prepare-package - - copy-resources - - - ${project.build.outputDirectory} - - - - ${project.build.directory}/generated-resources/swagger - - META-INF/resources/swagger - - - - - - + + ${project.artifactId} + + + maven-resources-plugin + 3.1.0 + + + copy-resources + + prepare-package + + copy-resources + + + ${project.build.outputDirectory} + + + + ${project.build.directory}/generated-resources/swagger + + META-INF/resources/swagger + + + + + + - - com.github.kongchen - swagger-maven-plugin - 3.1.3 - - - - org.onap.pomba.contextbuilder.sdc.service.rs - /sdccontextbuilder - - ${project.artifactId} Service - ${project.version} - - ${swagger.directory} - - - - - - - package - - generate - - - - + + com.github.kongchen + swagger-maven-plugin + 3.1.3 + + + + org.onap.pomba.contextbuilder.sdc.service.rs + /sdccontextbuilder + + ${project.artifactId} Service + ${project.version} + + ${swagger.directory} + + + + + + + package + + generate + + + + - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + - + + org.apache.maven.plugins + maven-resources-plugin + + + copy-docker-file + package + + copy-resources + + + target + true + + + ${basedir}/src/main/docker + true + + **/* + + + + + + + + + com.spotify + docker-maven-plugin + 0.4.11 + + + com.github.jnr + jnr-unixsocket + 0.13 + + + + true + docker-hub + ${docker.push.registry}/onap/${project.artifactId} + ${docker.location} + + latest + + true + + + - - - src/main/resources - true - - **/* - - - - + + + src/main/resources + true + + **/* + + + + diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile new file mode 100644 index 0000000..41f2f1a --- /dev/null +++ b/src/main/docker/Dockerfile @@ -0,0 +1,19 @@ +FROM anapsix/alpine-java:jre8 + +ARG MICROSERVICE_HOME=/opt/app/ + +# Build up the deployment folder structure +RUN mkdir -p $MICROSERVICE_HOME +RUN mkdir -p $MICROSERVICE_HOME/config/ +RUN mkdir -p $MICROSERVICE_HOME/lib/ +RUN mkdir -p $MICROSERVICE_HOME/bin/ + +ADD target/pomba-sdc-context-builder.jar $MICROSERVICE_HOME/lib/ +COPY config/ $MICROSERVICE_HOME/config/ +ADD target/startService.sh $MICROSERVICE_HOME/bin/ + +RUN chmod 755 $MICROSERVICE_HOME/config/* +RUN chmod 755 $MICROSERVICE_HOME/lib/* +RUN chmod 755 $MICROSERVICE_HOME/bin/* + +CMD ["/opt/app/bin/startServer.sh"] \ No newline at end of file diff --git a/src/main/docker/startService.sh b/src/main/docker/startService.sh new file mode 100644 index 0000000..56d4d76 --- /dev/null +++ b/src/main/docker/startService.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +cd /opt/app +if [ -z "${java_runtime_arguments}" ]; then + java -Dlogging.config=config/logback.xml -Xms128m -Xmx512m -jar /opt/app/lib/pomba-sdc-context-builder.jar +else + java -Dlogging.config=config/logback.xml $java_runtime_arguments -jar /opt/app/lib/pomba-sdc-context-builder.jar +fi \ No newline at end of file -- cgit 1.2.3-korg