summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Mazuruk <a.mazuruk@samsung.com>2021-02-18 17:04:21 +0100
committerAlexander Mazuruk <a.mazuruk@samsung.com>2021-04-30 04:51:42 +0200
commit015b548eb858a7a71a5e8b9a22a26d84289c9dd1 (patch)
tree7024ddefec3aba436d765132c9293fa5c0e9e67d
parentf400340aa75bebf8d1a0df9550acfafaf06c4cfb (diff)
Change openjdk baseOS img to integration-java11
Since 7.2.0 integration images switched over to alpine, adjusted Dockerfile to accomodate the switch. Removed vim & curl as they didn't seem to be used. Same with .ssh directory. Chowned config files and adjusted file permissions to u+rw (I assume configs dont need exec permissions) Benefits from switching over: * minimal {java11,python} images maintained by integration team * using currently "blessed by seccom" versions (:latest tag used) * should limit spread of legal issues across layers * integration images will be the first to have automated compliance documentation * should limit spread of base layers (contributing to deployment footprint - more base layers = more to download, more to store etc...) Issue-ID: INT-1864 Issue-ID: DCAEGEN2-2420 Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com> Change-Id: Ic2d55ef33785fa048ee755d34eef94120124a7eb
-rw-r--r--Changelog.md6
-rw-r--r--datafile-app-server/pom.xml3
-rwxr-xr-xdatafile-app-server/src/main/docker/Dockerfile30
-rw-r--r--pom.xml3
-rw-r--r--version.properties4
5 files changed, 28 insertions, 18 deletions
diff --git a/Changelog.md b/Changelog.md
index 79097808..0dc2c456 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+## [1.6.0] - 25/02/2021
+### Changed
+- docker base image to integration (from debian based to alpine based)
+- java version bump from 11.0.8 to 11.0.9
+- remove exec file permission for config file
+
## [1.5.5] - 09/03/2021
### Fixed
- make hostname verification configurable
diff --git a/datafile-app-server/pom.xml b/datafile-app-server/pom.xml
index 9c895861..4b84f6ed 100644
--- a/datafile-app-server/pom.xml
+++ b/datafile-app-server/pom.xml
@@ -4,6 +4,7 @@
~ Copyright (C) 2018-2021 NOKIA Intellectual Property. All rights reserved.
~ Copyright (C) 2018-2021 Nordix Foundation. All rights reserved.
~ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ~ Copyright (c) 2021 Samsung Electronics. 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.
@@ -26,7 +27,7 @@
<parent>
<groupId>org.onap.dcaegen2.collectors</groupId>
<artifactId>datafile</artifactId>
- <version>1.5.5-SNAPSHOT</version>
+ <version>1.6.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.collectors.datafile</groupId>
diff --git a/datafile-app-server/src/main/docker/Dockerfile b/datafile-app-server/src/main/docker/Dockerfile
index 73d09bfe..26a2ca4d 100755
--- a/datafile-app-server/src/main/docker/Dockerfile
+++ b/datafile-app-server/src/main/docker/Dockerfile
@@ -2,6 +2,7 @@
# ============LICENSE_START=======================================================
# Copyright (C) 2019 Nordix Foundation.
# Copyright (C) 2020 Nokia.
+# Copyright (C) 2021 Samsung Electronics.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,28 +19,29 @@
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
#
-FROM openjdk:11.0.8-jre-slim
+FROM nexus3.onap.org:10001/onap/integration-java11:8.0.0
EXPOSE 8100 8433
-RUN apt-get update && apt-get install -y \
- vim \
- curl
+ARG user=datafile
+ARG group=datafile
+USER root
WORKDIR /opt/app/datafile
-RUN mkdir -p /var/log/ONAP
-RUN mkdir -p /opt/app/datafile/etc/cert/
-
-RUN groupadd -r onap && useradd -ms /bin/bash datafile -g onap
-RUN chown -R datafile:onap /var/log/ONAP
ADD /config/application.yaml /opt/app/datafile/config/
-RUN chmod -R 777 /opt/app/datafile/config/
-USER datafile
+RUN mkdir -p /var/log/ONAP /opt/app/datafile/etc/cert/ && \
+ addgroup $group && adduser --system --disabled-password --no-create-home --ingroup $group $user && \
+ chown -R $user:$group /var/log/ONAP /opt/app/datafile/config && \
+ chmod -R u+rw /opt/app/datafile/config/
-RUN mkdir -p /home/datafile/.ssh
+# required for CSIT tests
+RUN apk add --no-cache openssh && \
+ mkdir -p /home/$user/.ssh && \
+ chown -R $user:$group /home/$user
-ADD /target/datafile-app-server.jar /opt/app/datafile/
+USER $user
-ENTRYPOINT ["/usr/local/openjdk-11/bin/java", "-jar", "/opt/app/datafile/datafile-app-server.jar"]
+COPY --chown=$user:$group /target/datafile-app-server.jar /opt/app/datafile/
+ENTRYPOINT ["java", "-jar", "/opt/app/datafile/datafile-app-server.jar"]
diff --git a/pom.xml b/pom.xml
index 08f5fbf9..e9aa77b6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,6 +3,7 @@
~ ============LICENSE_START=====================================================================
~ Copyright (C) 2018-2021 NOKIA Intellectual Property. All rights reserved.
~ Copyright (C) 2018-2021 Nordix Foundation. All rights reserved.
+ ~ Copyright (C) 2021 Samsung Electronics. 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.
@@ -31,7 +32,7 @@
<groupId>org.onap.dcaegen2.collectors</groupId>
<artifactId>datafile</artifactId>
- <version>1.5.5-SNAPSHOT</version>
+ <version>1.6.0-SNAPSHOT</version>
<name>dcaegen2-collectors.datafile</name>
<description>datafile collector</description>
diff --git a/version.properties b/version.properties
index 1daaf2de..d76ac729 100644
--- a/version.properties
+++ b/version.properties
@@ -1,6 +1,6 @@
major=1
-minor=5
-patch=5
+minor=6
+patch=0
base_version=${major}.${minor}.${patch}
release_version=${base_version}
snapshot_version=${base_version}-SNAPSHOT