Merge "Dashboard using policy agent NBI"
authorHenrik Andersson <henrik.b.andersson@est.tech>
Mon, 16 Dec 2019 14:10:37 +0000 (14:10 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Mon, 16 Dec 2019 14:10:37 +0000 (14:10 +0000)
policy-agent/Dockerfile [new file with mode: 0644]
policy-agent/config/application.yaml
policy-agent/pom.xml

diff --git a/policy-agent/Dockerfile b/policy-agent/Dockerfile
new file mode 100644 (file)
index 0000000..7119f07
--- /dev/null
@@ -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"]
+
+
index b3df5f1..e373ac6 100644 (file)
@@ -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:
index 2624596..a438870 100644 (file)
@@ -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">
     <modelVersion>4.0.0</modelVersion>
-    <groupId>org.springframework</groupId>
+    <groupId>org.oransc</groupId>
     <artifactId>policy-agent</artifactId>
-    <version>0.0.0</version>
+    <version>1.0.0-SNAPSHOT</version>
     <licenses>
         <license>
             <name>The Apache Software License, Version 2.0</name>
                     <skipTests>false</skipTests>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <configuration>
+                    <repository>oransc/policy-agent</repository>
+                    <tag>${project.version}</tag>
+                    <buildArgs>
+                        <JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
+                    </buildArgs>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>${project.build.directory}/generated-sources/annotations/</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>