From f03243352bf984bc2ecdf3238ee8e50fc8aaeea9 Mon Sep 17 00:00:00 2001 From: "Schmalzried, Terry (ts862m)" Date: Mon, 13 Jul 2020 13:35:14 -0400 Subject: upgrade to java 11 Issue-ID: DCAEGEN2-2330 Change-Id: I91d4cd75f1f70645d7fca6fb9555da48be8300ef Signed-off-by: Schmalzried, Terry (ts862m) --- README.md | 2 +- pom.xml | 22 +++++++++------------- resources/sch.sh | 2 +- startSCH.sh | 4 ++-- version.properties | 4 ++-- 5 files changed, 15 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 4128632..75f33a7 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ java -jar dcae-service-change-handler-0.1.0.jar prod http://consul:8500/v1/kv/se #### Use script -[`sch.sh`](resources/sch.sh) is a script to run service change handler that connects with inventory using HTTPS. The script attempts to add a custom CA cert to the OS's key store `/etc/ssl/certs/java/cacerts` and then launches service change handler. The custom CA cert is used to validate the server-side cert provided by inventory at runtime. +[`sch.sh`](resources/sch.sh) is a script to run service change handler that connects with inventory using HTTPS. The script attempts to add a custom CA cert to the OS's key store `/usr/local/openjdk-11/lib/security/cacerts` and then launches service change handler. The custom CA cert is used to validate the server-side cert provided by inventory at runtime. The script uses the following environment variables: diff --git a/pom.xml b/pom.xml index ad73931..de016e3 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ jar @@ -144,10 +144,9 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. org.apache.maven.plugins maven-compiler-plugin - 3.5 + 3.8.0 - 1.8 - 1.8 + 11 @@ -214,24 +213,21 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. docker-maven-plugin 1.0.0 - Michael Hwang + Terry Schmalzried ${onap.nexus.dockerregistry.daily}/onap/${project.groupId}.${project.artifactId} ${project.version}-${maven.build.timestamp}Z ${project.version} latest - openjdk:8-jre-alpine - sch + openjdk:11-jre-slim + onap - apk update - apk add bash - chmod 666 /etc/ssl/certs/java/cacerts - addgroup -S sch - adduser -S -G sch sch + chmod 666 /usr/local/openjdk-11/lib/security/cacerts + ["/opt/sch.sh"] diff --git a/resources/sch.sh b/resources/sch.sh index 0a68858..05c8e97 100755 --- a/resources/sch.sh +++ b/resources/sch.sh @@ -40,7 +40,7 @@ fi # Add the cacert to validate inventory's cert to support TLS. This command is # allowed to fail when there is no need for https. # NOTE: This user must have permission to write to /etc/ssl/certs/java/cacerts -keytool -importcert -file $PATH_TO_CACERT -keystore /etc/ssl/certs/java/cacerts -alias "inventory" -noprompt -storepass changeit +keytool -importcert -file $PATH_TO_CACERT -keystore /usr/local/openjdk-11/lib/security/cacerts -alias "inventory" -noprompt -storepass changeit # Now launch SCH java -jar /opt/servicechange-handler.jar $SCH_ARGS diff --git a/startSCH.sh b/startSCH.sh index 951b1eb..3e74b3c 100644 --- a/startSCH.sh +++ b/startSCH.sh @@ -1,8 +1,8 @@ #!/bin/bash -grep "^nameserver" /opt/sch/etc/resolv.conf >> /etc/resolv.conf +grep "^nameserver" /opt/onap/etc/resolv.conf >> /etc/resolv.conf service sendmail start -java -Dlogback.configurationFile=logback.xml -jar /opt/sch/target/dcae-service-change-handler.jar prod http://consul:8500/v1/kv/service-change-handler?raw=true +java -Dlogback.configurationFile=logback.xml -jar /opt/onap/target/dcae-service-change-handler.jar prod http://consul:8500/v1/kv/service-change-handler?raw=true diff --git a/version.properties b/version.properties index ef20baa..9e0d73d 100644 --- a/version.properties +++ b/version.properties @@ -1,6 +1,6 @@ major=1 -minor=3 -patch=2 +minor=4 +patch=0 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg