summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler
diff options
context:
space:
mode:
authorAlexander Mazuruk <a.mazuruk@samsung.com>2021-04-12 18:48:00 +0200
committerVijay Venkatesh Kumar <vv770d@att.com>2021-04-13 20:49:44 +0000
commit835ad818323544acb8b030a4f274de14496d7b02 (patch)
treef06af6124945a838a333f1309aceea024aabe48c /components/pm-subscription-handler
parent7d58f3fcbb69a5415b6d33ee6b30520a358342b9 (diff)
Change pmsh baseOS img to integration-
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: I876dd5d2294e7944d2785b98885dc990cc492635
Diffstat (limited to 'components/pm-subscription-handler')
-rw-r--r--components/pm-subscription-handler/Dockerfile21
-rw-r--r--components/pm-subscription-handler/pom.xml2
-rw-r--r--components/pm-subscription-handler/tox.ini2
-rw-r--r--components/pm-subscription-handler/version.properties2
4 files changed, 15 insertions, 12 deletions
diff --git a/components/pm-subscription-handler/Dockerfile b/components/pm-subscription-handler/Dockerfile
index f1545440..9e3ebfe8 100644
--- a/components/pm-subscription-handler/Dockerfile
+++ b/components/pm-subscription-handler/Dockerfile
@@ -17,9 +17,10 @@
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=====================================================
-FROM python:3.8.2-alpine3.11 as build
-MAINTAINER lego@est.tech
+FROM nexus3.onap.org:10001/onap/integration-python:8.0.0 as build
+LABEL maintainer="lego@est.tech"
+USER root
RUN set -eux; \
apk add \
build-base \
@@ -31,17 +32,18 @@ COPY requirements.txt ./
RUN pip install --prefix /opt -r requirements.txt --no-cache-dir
# Second stage
-FROM python:3.8.2-alpine3.11
+FROM nexus3.onap.org:10001/onap/integration-python:8.0.0
COPY --from=build /opt /opt
+USER root
ARG user=onap
ARG group=onap
# set PATH & PYTHONPATH vars
ENV APPDIR="/opt/app/pmsh" \
- LD_LIBRARY_PATH=/opt/lib:/opt/lib64 \
- PYTHONPATH=${APPDIR}/mod:/opt/lib/python3.8/site-packages \
+ LD_LIBRARY_PATH=/opt/lib \
+ PYTHONPATH=${APPDIR}/mod:/opt/lib/python3.9/site-packages \
PATH=$PATH:${APPDIR}/bin \
LOGS_PATH="/var/log/ONAP/dcaegen2/services/pmsh" \
LOGGER_CONFIG="/opt/app/pmsh/log_config.yaml"
@@ -50,13 +52,14 @@ WORKDIR $APPDIR
RUN mkdir -p $APPDIR
RUN set -eux; \
- apk add --no-cache postgresql-libs nano
+ apk add --no-cache postgresql-libs
COPY ./pmsh_service ./bin
COPY log_config.yaml ./
-# Create a group and user
-RUN addgroup -S $group && adduser -S -D -h /home/$user $user $group && \
+# onap user & group already avaliable, create home dir
+RUN mkdir -p /home/$user && \
+ chown -R $user:$group /home/$user && \
mkdir -p ${LOGS_PATH} && \
chown -R $user:$group ${LOGS_PATH} && \
chown -R $user:$group ${APPDIR}
@@ -64,4 +67,4 @@ RUN addgroup -S $group && adduser -S -D -h /home/$user $user $group && \
# Tell docker that all future commands should be run as the onap user
USER $user
-ENTRYPOINT ["python", "/opt/app/pmsh/bin/pmsh_service_main.py"] \ No newline at end of file
+ENTRYPOINT ["python", "/opt/app/pmsh/bin/pmsh_service_main.py"]
diff --git a/components/pm-subscription-handler/pom.xml b/components/pm-subscription-handler/pom.xml
index fa341a3d..d4f7eaf1 100644
--- a/components/pm-subscription-handler/pom.xml
+++ b/components/pm-subscription-handler/pom.xml
@@ -32,7 +32,7 @@
<groupId>org.onap.dcaegen2.services</groupId>
<artifactId>pmsh</artifactId>
<name>dcaegen2-services-pm-subscription-handler</name>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.3.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.sources>.</sonar.sources>
diff --git a/components/pm-subscription-handler/tox.ini b/components/pm-subscription-handler/tox.ini
index 4ee06e08..6f0cb630 100644
--- a/components/pm-subscription-handler/tox.ini
+++ b/components/pm-subscription-handler/tox.ini
@@ -17,7 +17,7 @@
# ============LICENSE_END=========================================================
[tox]
-envlist = flake8,py38
+envlist = flake8,py39
skip_missing_interpreters = true
[testenv]
diff --git a/components/pm-subscription-handler/version.properties b/components/pm-subscription-handler/version.properties
index 00ef5645..7d6815b1 100644
--- a/components/pm-subscription-handler/version.properties
+++ b/components/pm-subscription-handler/version.properties
@@ -1,5 +1,5 @@
major=1
-minor=2
+minor=3
patch=0
base_version=${major}.${minor}.${patch}
release_version=${base_version}