From ea760a2596e594c18b80e6baafcb93ab6e38db7c Mon Sep 17 00:00:00 2001 From: Simon Hoenscheid Date: Tue, 20 Aug 2024 23:06:41 +0200 Subject: [PATCH] add jdk17 option --- manifests/init.pp | 2 +- templates/setenv.sh.erb | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index df47b93..d83d25c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -6,7 +6,7 @@ # JVM Settings $javahome = undef, - Enum['openjdk-11', 'oracle-jdk-1.8', 'custom'] $jvm_type = 'openjdk-11', + Enum['openjdk-17', 'openjdk-11', 'oracle-jdk-1.8', 'custom'] $jvm_type = 'openjdk-11', $jvm_xms = '256m', $jvm_xmx = '1024m', $jvm_permgen = '256m', diff --git a/templates/setenv.sh.erb b/templates/setenv.sh.erb index 5647baa..0c1ee05 100644 --- a/templates/setenv.sh.erb +++ b/templates/setenv.sh.erb @@ -88,12 +88,16 @@ CATALINA_OPTS="-XX:+IgnoreUnrecognizedVMOptions ${CATALINA_OPTS}" CATALINA_OPTS="-Xlog:gc+age=debug:file=$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log::filecount=5,filesize=2M ${CATALINA_OPTS}" <%- end -%> <%- end -%> -<%- if scope.lookupvar('confluence::jvm_type') == 'openjdk-11' -%> +<%- if scope.lookupvar('confluence::jvm_type') == 'openjdk-17' -%> +CATALINA_OPTS="-XX:+ExplicitGCInvokesConcurrent ${CATALINA_OPTS}" +CATALINA_OPTS="-Xlog:gc*:file=$LOGBASEABS/logs/gc-%t.log:tags,time,uptime,level:filecount=5,filesize=2M ${CATALINA_OPTS}" +<%- elsif scope.lookupvar('confluence::jvm_type') == 'openjdk-11' -%> CATALINA_OPTS="-XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDateStamps ${CATALINA_OPTS}" +CATALINA_OPTS="-Xloggc:$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M ${CATALINA_OPTS}" <%- elsif scope.lookupvar('confluence::jvm_type') == 'oracle-jdk-1.8' -%> CATALINA_OPTS="-XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution ${CATALINA_OPTS}" -<%- end -%> CATALINA_OPTS="-Xloggc:$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M ${CATALINA_OPTS}" +<%- end -%> CATALINA_OPTS="-XX:G1ReservePercent=20 ${CATALINA_OPTS}" CATALINA_OPTS="-Djava.awt.headless=true ${CATALINA_OPTS}" CATALINA_OPTS="-Datlassian.plugins.enable.wait=300 ${CATALINA_OPTS}"