From 86690cd541f2aadabb8659e3ce87eec5de8acdc4 Mon Sep 17 00:00:00 2001 From: wasala Date: Tue, 3 Apr 2018 14:41:23 +0200 Subject: Added pushing docker image to nexus Extended appConf loading Change-Id: Ibc3640cf4a66e40ce5dc585818c077534d09141c Issue-ID: DCAEGEN2-407 Signed-off-by: wasala --- prh-app-server/config/application.yaml | 30 ++++++++++++++ prh-app-server/docker/Dockerfile | 15 ------- prh-app-server/pom.xml | 48 ++++++++++++++++++---- .../services/prh/config/ApplicationProperties.java | 27 ++++++++++++ prh-app-server/src/main/resources/application.yaml | 2 - 5 files changed, 98 insertions(+), 24 deletions(-) create mode 100644 prh-app-server/config/application.yaml delete mode 100644 prh-app-server/docker/Dockerfile create mode 100644 prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/config/ApplicationProperties.java delete mode 100644 prh-app-server/src/main/resources/application.yaml (limited to 'prh-app-server') diff --git a/prh-app-server/config/application.yaml b/prh-app-server/config/application.yaml new file mode 100644 index 00000000..efdaa9cf --- /dev/null +++ b/prh-app-server/config/application.yaml @@ -0,0 +1,30 @@ +server: + port: 8100 +app: + AAIHttpClientConfiguration: + aaiHost: "localhost" + aaiHostPortNumber: 8080 + aaiProtocol: "http" + aaiUserName: "admin" + aaiUserPassword: "admin" + aaiIgnoreSSLCertificateErrors: true +# dmaap-consumer-configuration: +# dmmaphost-name: "localhost" +# dmmapport-number: 2222 +# dmmaptopic-name: "temp" +# dmmapprotocol: "http" +# dmmapuserName: "admin" +# dmmapuserPassword: "admin" +# dmmapcontentType: "application/json" +# consumerId: "1" +# consumerGroup: "other" +# timeoutMS: 1000 +# message-limit: 1000 +# dmaap-producer-configuration: +# dmmaphostName: "localhost" +# dmmapportNumber: 2223 +# dmmaptopicName: "temp" +# dmmapprotocol: "http" +# dmmapuserName: "admin" +# dmmapuserPassword: "admin" +# dmmapcontentType: "application/json" diff --git a/prh-app-server/docker/Dockerfile b/prh-app-server/docker/Dockerfile deleted file mode 100644 index 0f71760a..00000000 --- a/prh-app-server/docker/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -#This image is sample template only. -FROM azul/zulu-openjdk:8u152 - -MAINTAINER Przemysław Wąsala "przemyslaw.wasala@nokia.com" - -ADD /target/prh-app-server.jar /opt/app/Prh/ -WORKDIR /opt/app/Prh - -ENV HOME /opt/app/Prh -ENV JAVA_HOME /usr -#RUN apt-get update && apt-get install -y curl vim - -EXPOSE 8100 - -RUN [ "java", "-jar", "prh-app-server.jar" ] \ No newline at end of file diff --git a/prh-app-server/pom.xml b/prh-app-server/pom.xml index 8d07fdd6..7da9ac16 100644 --- a/prh-app-server/pom.xml +++ b/prh-app-server/pom.xml @@ -33,8 +33,7 @@ jar yyyyMMdd'T'HHmmss - ${env.MVN_DOCKERREGISTRY_DAILY} - + prh-app-server @@ -53,7 +52,7 @@ - prh-app-server + ${project.fatJar.finalName} org.onap.dcaegen2.services.prh.MainApp @@ -62,25 +61,50 @@ com.spotify docker-maven-plugin 1.0.0 + + + + build + + package + + ${onap.nexus.dockerregistry.daily}/onap/${project.groupId}.${project.artifactId} - docker + openjdk:8-jre-alpine + ["java", "-jar", "/opt/${project.fatJar.finalName}.jar"] - / + /opt ${project.build.directory} - ${project.build.finalName}.jar + ${project.fatJar.finalName}.jar + + 8100 + - ${project.version}-${maven.build.timestamp} + ${project.version}-SNAPSHOT-${maven.build.timestamp}Z + ${project.version} latest ${onap.nexus.dockerregistry.daily} + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ecomp-staging + ${nexusproxy} + 176c31dfe190a + + + @@ -159,6 +183,16 @@ org.testng testng + + org.onap.dcaegen2.services.prh + prh-aai-client + ${parent.version} + + + org.onap.dcaegen2.services.prh + prh-dmaap-client + ${parent.version} + diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/config/ApplicationProperties.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/config/ApplicationProperties.java new file mode 100644 index 00000000..67d1c370 --- /dev/null +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/config/ApplicationProperties.java @@ -0,0 +1,27 @@ +/*- + * ============LICENSE_START======================================================= + * PNF-REGISTRATION-HANDLER + * ================================================================================ + * Copyright (C) 2018 NOKIA Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.onap.dcaegen2.services.prh.config; + +/** + * @author Przemysław Wąsala on 4/3/18 + */ +public class ApplicationProperties { + +} diff --git a/prh-app-server/src/main/resources/application.yaml b/prh-app-server/src/main/resources/application.yaml deleted file mode 100644 index 4d372c26..00000000 --- a/prh-app-server/src/main/resources/application.yaml +++ /dev/null @@ -1,2 +0,0 @@ -server: - port: 8100 \ No newline at end of file -- cgit 1.2.3-korg