aboutsummaryrefslogtreecommitdiffstats
path: root/models-sim
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-01-17 10:14:40 -0500
committerJim Hahn <jrh3@att.com>2020-01-17 14:47:28 -0500
commitf77d0a91298e4e4ec14991366b5e439824919d5d (patch)
treed9bc2c5e324b2587bbccecc0be46225fc0d7ed4b /models-sim
parentd9e125c8ffc5578fadcef112a2ae8f0aec25cba0 (diff)
Update Dockerfiles for java11 in policy-models
Also modified docker build scripts so they work with SNAPSHOT or release versions of the tarballs. Issue-ID: POLICY-1586 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ib5b8c0b83d7736180ab213b0b67d457eab7ee48e
Diffstat (limited to 'models-sim')
-rw-r--r--models-sim/models-sim-dmaap/src/main/package/docker/Dockerfile19
-rw-r--r--models-sim/models-sim-dmaap/src/main/package/docker/dmaap-sim.sh2
-rwxr-xr-xmodels-sim/models-sim-dmaap/src/main/package/docker/docker_build.sh4
-rw-r--r--models-sim/policy-models-sim-pdp/src/main/package/docker/Dockerfile19
-rw-r--r--models-sim/policy-models-sim-pdp/src/main/package/docker/docker_build.sh4
-rw-r--r--models-sim/policy-models-sim-pdp/src/main/package/docker/pdp-sim.sh2
6 files changed, 8 insertions, 42 deletions
diff --git a/models-sim/models-sim-dmaap/src/main/package/docker/Dockerfile b/models-sim/models-sim-dmaap/src/main/package/docker/Dockerfile
index 75f08a1f9..495924d5b 100644
--- a/models-sim/models-sim-dmaap/src/main/package/docker/Dockerfile
+++ b/models-sim/models-sim-dmaap/src/main/package/docker/Dockerfile
@@ -23,7 +23,7 @@
# Docker file to build an image that runs the DMaaP simulator on Java 8 in alpine
#
-FROM onap/policy-common-alpine:1.4.0
+FROM onap/policy-jre-alpine
LABEL maintainer="Policy Team"
@@ -32,23 +32,6 @@ ARG POLICY_LOGS=/var/log/onap/policy/dmaap-sim
ENV POLICY_HOME=/opt/app/policy
ENV POLICY_LOGS=${POLICY_LOGS}
-RUN apk add --no-cache --update \
- bash \
- nss \
- procps \
- coreutils \
- findutils \
- grep \
- zip \
- unzip \
- curl \
- wget \
- openssh \
- iproute2 \
- iputils \
- vim \
- openjdk8
-
# Create DMaaP simulator user and group
# Add simulator-specific directories and set ownership as the simulator user
RUN mkdir -p ${POLICY_HOME}/dmaap-sim \
diff --git a/models-sim/models-sim-dmaap/src/main/package/docker/dmaap-sim.sh b/models-sim/models-sim-dmaap/src/main/package/docker/dmaap-sim.sh
index ec02d3fc1..0d152e1db 100644
--- a/models-sim/models-sim-dmaap/src/main/package/docker/dmaap-sim.sh
+++ b/models-sim/models-sim-dmaap/src/main/package/docker/dmaap-sim.sh
@@ -24,7 +24,7 @@ then
DMAAP_SIM_HOME=/opt/app/policy/dmaap-sim
fi
-JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
+JAVA_HOME=/usr/lib/jvm/java-11-openjdk
KEYSTORE="${DMAAP_SIM_HOME}/etc/ssl/policy-keystore"
KEYSTORE_PASSWD="Pol1cy_0nap"
TRUSTSTORE="${DMAAP_SIM_HOME}/etc/ssl/policy-truststore"
diff --git a/models-sim/models-sim-dmaap/src/main/package/docker/docker_build.sh b/models-sim/models-sim-dmaap/src/main/package/docker/docker_build.sh
index cd0148660..3ec907b8e 100755
--- a/models-sim/models-sim-dmaap/src/main/package/docker/docker_build.sh
+++ b/models-sim/models-sim-dmaap/src/main/package/docker/docker_build.sh
@@ -45,7 +45,7 @@ then
fi
# Check for the tarball
-tarball_count=`ls $DMAAP_SIM_HOME/target/policy-models-sim-dmaap-*-SNAPSHOT-tarball.tar.gz 2> /dev/null | wc | awk '{print $1}'`
+tarball_count=`ls $DMAAP_SIM_HOME/target/policy-models-sim-dmaap-*tarball.tar.gz 2> /dev/null | wc | awk '{print $1}'`
if [ "$tarball_count" -ne "1" ]
then
echo one and only one tarball should exist in the target directory
@@ -57,7 +57,7 @@ rm -fr $DMAAP_SIM_HOME/target/docker
mkdir $DMAAP_SIM_HOME/target/docker
cp $DMAAP_SIM_HOME/src/main/package/docker/Dockerfile $DMAAP_SIM_HOME/target/docker
cp $DMAAP_SIM_HOME/src/main/package/docker/dmaap-sim.sh $DMAAP_SIM_HOME/target/docker
-cp $DMAAP_SIM_HOME/target/policy-models-sim-dmaap-*-SNAPSHOT-tarball.tar.gz $DMAAP_SIM_HOME/target/docker/policy-models-sim-dmaap-tarball.tar.gz
+cp $DMAAP_SIM_HOME/target/policy-models-sim-dmaap-*tarball.tar.gz $DMAAP_SIM_HOME/target/docker/policy-models-sim-dmaap-tarball.tar.gz
# Run the docker build
cd $DMAAP_SIM_HOME/target
diff --git a/models-sim/policy-models-sim-pdp/src/main/package/docker/Dockerfile b/models-sim/policy-models-sim-pdp/src/main/package/docker/Dockerfile
index 51e7eaa6f..b70844e65 100644
--- a/models-sim/policy-models-sim-pdp/src/main/package/docker/Dockerfile
+++ b/models-sim/policy-models-sim-pdp/src/main/package/docker/Dockerfile
@@ -23,7 +23,7 @@
# Docker file to build an image that runs the PDP simulator on Java 8 in alpine
#
-FROM onap/policy-common-alpine:1.4.0
+FROM onap/policy-jre-alpine
LABEL maintainer="Policy Team"
@@ -32,23 +32,6 @@ ARG POLICY_LOGS=/var/log/onap/policy/pdp-sim
ENV POLICY_HOME=/opt/app/policy
ENV POLICY_LOGS=${POLICY_LOGS}
-RUN apk add --no-cache --update \
- bash \
- nss \
- procps \
- coreutils \
- findutils \
- grep \
- zip \
- unzip \
- curl \
- wget \
- openssh \
- iproute2 \
- iputils \
- vim \
- openjdk8
-
# Create PDP simulator user and group
# Add simulator-specific directories and set ownership as the simulator user
RUN mkdir -p ${POLICY_HOME}/pdp-sim \
diff --git a/models-sim/policy-models-sim-pdp/src/main/package/docker/docker_build.sh b/models-sim/policy-models-sim-pdp/src/main/package/docker/docker_build.sh
index eca68cb17..db33cefd0 100644
--- a/models-sim/policy-models-sim-pdp/src/main/package/docker/docker_build.sh
+++ b/models-sim/policy-models-sim-pdp/src/main/package/docker/docker_build.sh
@@ -44,7 +44,7 @@ then
fi
# Check for the tarball
-tarball_count=`ls $PDP_SIM_HOME/target/policy-models-sim-pdp-*-SNAPSHOT-tarball.tar.gz 2> /dev/null | wc | awk '{print $1}'`
+tarball_count=`ls $PDP_SIM_HOME/target/policy-models-sim-pdp-*tarball.tar.gz 2> /dev/null | wc | awk '{print $1}'`
if [ "$tarball_count" -ne "1" ]
then
echo one and only one tarball should exist in the target directory
@@ -56,7 +56,7 @@ rm -fr $PDP_SIM_HOME/target/docker
mkdir $PDP_SIM_HOME/target/docker
cp $PDP_SIM_HOME/src/main/package/docker/Dockerfile $PDP_SIM_HOME/target/docker
cp $PDP_SIM_HOME/src/main/package/docker/pdp-sim.sh $PDP_SIM_HOME/target/docker
-cp $PDP_SIM_HOME/target/policy-models-sim-pdp-*-SNAPSHOT-tarball.tar.gz $PDP_SIM_HOME/target/docker/policy-models-sim-pdp-tarball.tar.gz
+cp $PDP_SIM_HOME/target/policy-models-sim-pdp-*tarball.tar.gz $PDP_SIM_HOME/target/docker/policy-models-sim-pdp-tarball.tar.gz
# Run the docker build
cd $PDP_SIM_HOME/target
diff --git a/models-sim/policy-models-sim-pdp/src/main/package/docker/pdp-sim.sh b/models-sim/policy-models-sim-pdp/src/main/package/docker/pdp-sim.sh
index 2316ccecf..0f7a7b315 100644
--- a/models-sim/policy-models-sim-pdp/src/main/package/docker/pdp-sim.sh
+++ b/models-sim/policy-models-sim-pdp/src/main/package/docker/pdp-sim.sh
@@ -24,7 +24,7 @@ then
PDP_SIM_HOME=/opt/app/policy/pdp-sim
fi
-JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
+JAVA_HOME=/usr/lib/jvm/java-11-openjdk
KEYSTORE="${PDP_SIM_HOME}/etc/ssl/policy-keystore"
KEYSTORE_PASSWD="Pol1cy_0nap"
TRUSTSTORE="${PDP_SIM_HOME}/etc/ssl/policy-truststore"