From 3401e80ba7c6d1990bb71111a631d46cd74b2a3b Mon Sep 17 00:00:00 2001 From: mazano Date: Mon, 24 Oct 2022 09:55:57 +0200 Subject: [PATCH] V2.21.2 (#453) * Upgrade to v2.21.2 --- .env | 4 ++-- Dockerfile | 2 +- README.md | 24 ++++++++++++------------ build_data/community_plugins.txt | 1 - build_data/s3.properties | 3 --- clustering/docker-compose.yml | 4 ++-- scripts/entrypoint.sh | 1 - scripts/functions.sh | 14 ++------------ scripts/start.sh | 19 ++++--------------- 9 files changed, 23 insertions(+), 49 deletions(-) delete mode 100644 build_data/s3.properties diff --git a/.env b/.env index 99dbeebd..15a50b87 100644 --- a/.env +++ b/.env @@ -1,11 +1,11 @@ COMPOSE_PROJECT_NAME=kartozageoserver IMAGE_VERSION=9.0.65-jdk11-openjdk-slim-buster -GS_VERSION=2.21.1 +GS_VERSION=2.21.2 GEOSERVER_PORT=8600 # Build Arguments JAVA_HOME=/usr/local/openjdk-11 -WAR_URL=http://downloads.sourceforge.net/project/geoserver/GeoServer/2.21.1/geoserver-2.21.1-war.zip +WAR_URL=http://downloads.sourceforge.net/project/geoserver/GeoServer/2.21.2/geoserver-2.21.2-war.zip STABLE_PLUGIN_BASE_URL=https://sonik.dl.sourceforge.net DOWNLOAD_ALL_STABLE_EXTENSIONS=1 DOWNLOAD_ALL_COMMUNITY_EXTENSIONS=1 diff --git a/Dockerfile b/Dockerfile index 7d31048b..62a6aa38 100755 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG JAVA_HOME=/usr/local/openjdk-11 FROM tomcat:$IMAGE_VERSION LABEL maintainer="Tim Sutton" -ARG GS_VERSION=2.21.1 +ARG GS_VERSION=2.21.2 ARG WAR_URL=https://downloads.sourceforge.net/project/geoserver/GeoServer/${GS_VERSION}/geoserver-${GS_VERSION}-war.zip ARG STABLE_PLUGIN_BASE_URL=https://sonik.dl.sourceforge.net ARG DOWNLOAD_ALL_STABLE_EXTENSIONS=1 diff --git a/README.md b/README.md index 421a22d8..68d68460 100755 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ The preferred way (but using most bandwidth for the initial image) is to get our docker trusted build like this: ```shell -VERSION=2.21.1 +VERSION=2.21.2 docker pull kartoza/geoserver:$VERSION ``` ### Building the image @@ -98,13 +98,13 @@ To build using a specific tagged release for tomcat image set the to choose which tag you need to build against. ``` -ie VERSION=2.21.1 -docker build --build-arg IMAGE_VERSION=8-jre8 --build-arg GS_VERSION=2.21.1 -t kartoza/geoserver:${VERSION} . +ie VERSION=2.21.2 +docker build --build-arg IMAGE_VERSION=8-jre8 --build-arg GS_VERSION=2.21.2 -t kartoza/geoserver:${VERSION} . ``` For some recent builds it is necessary to set the JAVA_PATH as well (e.g. Apache Tomcat/9.0.36) ``` -docker build --build-arg IMAGE_VERSION=9-jdk11-openjdk-slim --build-arg JAVA_HOME=/usr/local/openjdk-11/bin/java --build-arg GS_VERSION=2.21.1 -t kartoza/geoserver:2.21.1 . +docker build --build-arg IMAGE_VERSION=9-jdk11-openjdk-slim --build-arg JAVA_HOME=/usr/local/openjdk-11/bin/java --build-arg GS_VERSION=2.21.2 -t kartoza/geoserver:2.21.2 . ``` **Note:** Please check the [GeoServer documentation](https://docs.geoserver.org/stable/en/user/production/index.html) to see which tomcat versions @@ -167,7 +167,7 @@ The image ships with the following stable plugins: * csw-plugin **Note:** The plugins listed above are omitted from [Stable_plugins.txt](https://github.com/kartoza/docker-geoserver/blob/master/build_data/stable_plugins.txt) -even though they are considered [stable plugins](https://sourceforge.net/projects/geoserver/files/GeoServer/2.21.1/extensions/) +even though they are considered [stable plugins](https://sourceforge.net/projects/geoserver/files/GeoServer/2.21.2/extensions/) The image activates them on startup. The image provides the necessary plugin zip files which are used when activating the @@ -185,7 +185,7 @@ The environment variable `STABLE_EXTENSIONS` can be used to activate plugins lis Example ``` -ie VERSION=2.21.1 +ie VERSION=2.21.2 docker run -d -p 8600:8080 --name geoserver -e STABLE_EXTENSIONS=charts-plugin,db2-plugin kartoza/geoserver:${VERSION} ``` @@ -206,7 +206,7 @@ The environment variable `COMMUNITY_EXTENSIONS` can be used to activate plugins Example ``` -ie VERSION=2.21.1 +ie VERSION=2.21.2 docker run -d -p 8600:8080 --name geoserver -e COMMUNITY_EXTENSIONS=gwc-sqlite-plugin,ogr-datastore-plugin kartoza/geoserver:${VERSION} ``` @@ -224,7 +224,7 @@ Geoserver ships with sample data which can be used by users to familiarize them This is not activated by default. You can activate it using the environment variable `SAMPLE_DATA=true` ``` -ie VERSION=2.21.1 +ie VERSION=2.21.2 docker run -d -p 8600:8080 --name geoserver -e SAMPLE_DATA=true kartoza/geoserver:${VERSION} ``` @@ -299,14 +299,14 @@ If you set the environment variable `SSL=true` but do not provide the pem files the container will generate a self-signed SSL certificates. ``` -ie VERSION=2.21.1 +ie VERSION=2.21.2 docker run -it --name geoserver -e PKCS12_PASSWORD=geoserver -e JKS_KEY_PASSWORD=geoserver -e JKS_STORE_PASSWORD=geoserver -e SSL=true -p 8443:8443 -p 8600:8080 kartoza/geoserver:${VERSION} ``` If you already have your perm files (fullchain.pem and privkey.pem) you can mount the directory containing your keys as: ``` -ie VERSION=2.21.1 +ie VERSION=2.21.2 docker run -it --name geo -v /etc/certs:/etc/certs -e PKCS12_PASSWORD=geoserver -e JKS_KEY_PASSWORD=geoserver -e JKS_STORE_PASSWORD=geoserver -e SSL=true -p 8443:8443 -p 8600:8080 kartoza/geoserver:${VERSION} ``` @@ -382,7 +382,7 @@ To include Tomcat extras including docs, examples, and the manager webapp, set t to use a strong password otherwise the default one is set up. ``` -ie VERSION=2.21.1 +ie VERSION=2.21.2 docker run -it --name geoserver -e TOMCAT_EXTRAS=true -p 8600:8080 kartoza/geoserver:${VERSION} ``` @@ -404,7 +404,7 @@ If you have downloaded extra fonts you can mount the folder to the path path during initialisation. ``` -ie VERSION=2.21.1 +ie VERSION=2.21.2 docker run -v fonts:/opt/fonts -p 8080:8080 -t kartoza/geoserver:${VERSION} ``` diff --git a/build_data/community_plugins.txt b/build_data/community_plugins.txt index f994dd47..fc29a61f 100644 --- a/build_data/community_plugins.txt +++ b/build_data/community_plugins.txt @@ -39,7 +39,6 @@ ogr-datastore-plugin opensearch-eo-plugin ows-simulate-plugin pgraster-plugin -s3-geotiff-plugin saml-plugin sec-keycloak-plugin sec-oauth2-geonode-plugin diff --git a/build_data/s3.properties b/build_data/s3.properties deleted file mode 100644 index 545738a9..00000000 --- a/build_data/s3.properties +++ /dev/null @@ -1,3 +0,0 @@ -alias.s3.endpoint=${S3_SERVER_URL} -alias.s3.user=${S3_USERNAME} -alias.s3.password=${S3_PASSWORD} \ No newline at end of file diff --git a/clustering/docker-compose.yml b/clustering/docker-compose.yml index c0831277..3db53354 100644 --- a/clustering/docker-compose.yml +++ b/clustering/docker-compose.yml @@ -19,7 +19,7 @@ services: healthcheck: test: "PGPASSWORD=docker pg_isready -h 127.0.0.1 -U docker -d gis" master: - image: kartoza/geoserver:2.21.1 + image: kartoza/geoserver:2.21.2 volumes: - geoserver-cluster-data:/opt/geoserver/data_dir ports: @@ -48,7 +48,7 @@ services: timeout: 10s retries: 3 node: - image: kartoza/geoserver:2.21.1 + image: kartoza/geoserver:2.21.2 volumes: - geoserver-cluster-data:/opt/geoserver/data_dir ports: diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index e9f791d4..7c14e99c 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -66,7 +66,6 @@ export GEOSERVER_OPTS="-Djava.awt.headless=true -server -Xms${INITIAL_MEMORY} -X -DGEOSERVER_AUDIT_PATH=${MONITOR_AUDIT_PATH} \ -Dorg.geotools.shapefile.datetime=${USE_DATETIME_IN_SHAPEFILE} \ -Dorg.geotools.localDateTimeHandling=true \ - -Ds3.properties.location=${GEOSERVER_DATA_DIR}/s3.properties \ -Dsun.java2d.renderer.useThreadLocal=false \ -Dsun.java2d.renderer.pixelsize=8192 -server -XX:NewSize=300m \ -Dlog4j.configuration=${CATALINA_HOME}/log4j.properties \ diff --git a/scripts/functions.sh b/scripts/functions.sh index 5b7b0b99..36fed918 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -124,7 +124,7 @@ function validate_geo_install() { DATA_PATH=$1 # Check if geoserver is installed early so that we can fail early on if [[ $(ls -A ${DATA_PATH}) ]]; then - echo "GeoServer install dir exist proceed with install" + echo -e "\e[32m GeoServer install dir exist proceed with install \033[0m" else exit 1 fi @@ -237,17 +237,7 @@ function broker_xml_config() { # Helper function to configure s3 bucket # https://docs.geoserver.org/latest/en/user/community/s3-geotiff/index.html -function s3_config() { - if [[ ! -f "${GEOSERVER_DATA_DIR}"/s3.properties ]]; then - # If it doesn't exists, copy from /settings directory if exists - if [[ -f ${EXTRA_CONFIG_DIR}/s3.properties ]]; then - envsubst < "${EXTRA_CONFIG_DIR}"/s3.properties > "${GEOSERVER_DATA_DIR}"/s3.properties - else - # default value - envsubst < /build_data/s3.properties > "${GEOSERVER_DATA_DIR}"/s3.properties - fi - fi -} +# Remove this based on https://www.mail-archive.com/geoserver-users@lists.sourceforge.net/msg34214.html # Helper function to install plugin in proper path diff --git a/scripts/start.sh b/scripts/start.sh index 4b30e520..aa36b6c7 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -98,19 +98,8 @@ fi export S3_SERVER_URL S3_USERNAME S3_PASSWORD function community_config() { - if [[ ${ext} == 's3-geotiff-plugin' ]]; then - s3_config - echo "Installing ${ext} " - install_plugin /community_plugins "${ext}" - if [[ ! -f ${CATALINA_HOME}/webapps/geoserver/WEB-INF/lib/ehcache-3.4.0.jar ]];then - validate_url https://repo1.maven.org/maven2/org/ehcache/ehcache/3.4.0/ehcache-3.4.0.jar && \ - mv ehcache-3.4.0.jar ${CATALINA_HOME}/webapps/geoserver/WEB-INF/lib/ - fi - - elif [[ ${ext} != 's3-geotiff-plugin' ]]; then - echo "Installing ${ext} " - install_plugin /community_plugins "${ext}" - fi + echo -e "\e[32m Installing ${ext} \033[0m" + install_plugin /community_plugins "${ext}" } # Install community modules plugins @@ -146,7 +135,7 @@ if [[ ${ACTIVATE_ALL_COMMUNITY_EXTENSIONS} =~ [Tt][Rr][Uu][Ee] ]];then pushd /community_plugins/ || exit for val in *.zip; do ext=${val%.*} - echo "Enabling ${ext} for GeoServer ${GS_VERSION}" + echo -e "\e[32m Enabling ${ext} for GeoServer ${GS_VERSION} \033[0m" community_config done pushd "${GEOSERVER_HOME}" || exit @@ -242,7 +231,7 @@ else fi fi - +# Enable SSL if [[ ${SSL} =~ [Tt][Rr][Uu][Ee] ]]; then # convert LetsEncrypt certificates