From: Henrik Andersson Date: Mon, 16 Dec 2019 14:10:37 +0000 (+0000) Subject: Merge "Dashboard using policy agent NBI" X-Git-Tag: 1.0.1~71 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=9de32bd6e23b01413d1319e668235568068b3699;hp=8831a02bce715562f3cacce1691bf4d9d3af206b;p=nonrtric.git Merge "Dashboard using policy agent NBI" --- diff --git a/policy-agent/Dockerfile b/policy-agent/Dockerfile new file mode 100644 index 00000000..7119f071 --- /dev/null +++ b/policy-agent/Dockerfile @@ -0,0 +1,35 @@ +# +# ============LICENSE_START======================================================= +# Copyright (C) 2019 Nordix Foundation. +# ================================================================================ +# 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +# +FROM adoptopenjdk/openjdk11:latest + +WORKDIR /opt/app/policy-agent +RUN mkdir -p /var/log/policy-agent +RUN mkdir -p /opt/app/policy-agent/etc/cert/ + + +ADD /config/application.yaml /opt/app/policy-agent/config/ +ADD /target/policy-agent-1.0.0-SNAPSHOT.jar /opt/app/policy-agent/ + + +RUN chmod -R 777 /opt/app/policy-agent/config/ + +ENTRYPOINT ["/usr/bin/java", "-jar", "/opt/app/policy-agent/policy-agent-1.0.0-SNAPSHOT.jar"] + + diff --git a/policy-agent/config/application.yaml b/policy-agent/config/application.yaml index b3df5f10..e373ac65 100644 --- a/policy-agent/config/application.yaml +++ b/policy-agent/config/application.yaml @@ -16,7 +16,7 @@ logging: org.springframework.data: ERROR org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR org.onap.dcaegen2.collectors.datafile: WARN - file: /var/log/ONAP/application.log + file: /var/log/policy-agent/application.log app: filepath: /opt/app/policy-agent/config/application_configuration.json server: diff --git a/policy-agent/pom.xml b/policy-agent/pom.xml index 26245964..a4388706 100644 --- a/policy-agent/pom.xml +++ b/policy-agent/pom.xml @@ -23,9 +23,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.springframework + org.oransc policy-agent - 0.0.0 + 1.0.0-SNAPSHOT The Apache Software License, Version 2.0 @@ -174,6 +174,35 @@ false + + com.spotify + dockerfile-maven-plugin + + oransc/policy-agent + ${project.version} + + ${project.build.finalName}.jar + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-source + generate-sources + + add-source + + + + ${project.build.directory}/generated-sources/annotations/ + + + + +