From 30731ad9b5e8fdd6b9d71b495c811934d400f8d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andris=20Pav=C4=93nis?= Date: Fri, 22 Aug 2025 15:58:11 +0300 Subject: [PATCH 01/13] Add dockerfile for RHEL10 test --- Dockerfile.rhel10 | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Dockerfile.rhel10 diff --git a/Dockerfile.rhel10 b/Dockerfile.rhel10 new file mode 100644 index 0000000..6934e1f --- /dev/null +++ b/Dockerfile.rhel10 @@ -0,0 +1,65 @@ +FROM rockylinux/rockylinux:10 +LABEL maintainer "Mikko Rauhala " +LABEL license "MIT License Copyright (c) 2023 FMI Open Development" + +ENV USER_NAME="smartmet" \ + GOOGLE_FONTS="Montserrat NotoSans OpenSans Roboto" + +RUN dnf -y install https://download.fmi.fi/smartmet-open/rhel/10/x86_64/smartmet-open-release-latest-10.noarch.rpm && \ + dnf -y install smartmet-open-beta && \ + dnf -y install yum-utils && \ + dnf config-manager --set-enabled crb && \ + dnf -y install epel-release && \ + dnf config-manager --setopt="epel.exclude=librsvg2*" --save && \ + dnf config-manager --setopt="baseos.exclude=librsvg2*" --save && \ + dnf config-manager --setopt="epel.exclude=eccodes*" --save && \ + dnf config-manager --set-disabled epel-source && \ + dnf -y update && \ + dnf -y install --setopt=install_weak_deps=False \ + smartmet-plugin-autocomplete \ + smartmet-plugin-backend \ + smartmet-plugin-download \ + smartmet-plugin-edr \ + smartmet-plugin-timeseries \ + smartmet-plugin-wms \ + smartmet-engine-grid \ + smartmet-library-tron \ + smartmet-plugin-q3 \ + lua-newcairo-q3 \ + unzip \ + glibc-langpack-en && \ + dnf -y reinstall --setopt=override_install_langs='' --setopt=tsflags='' glibc-common eccodes && \ + dnf clean all + +# Install Google Fonts +RUN \ + for FONT in $GOOGLE_FONTS; \ + do \ + mkdir -p /usr/share/fonts/truetype/${FONT} && \ + curl -s -S --output-dir /usr/share/fonts/truetype/${FONT} "https://github.com/google/fonts/raw/main/ofl/${FONT,,}/${FONT}%5Bwdth,wght%5D.ttf" && \ + curl -s -S --output-dir /usr/share/fonts/truetype/${FONT} "https://github.com/google/fonts/raw/main/ofl/${FONT,,}/${FONT}-italic%5Bwdth,wght%5D.ttf" ; \ + done + +HEALTHCHECK --interval=30s --timeout=10s \ + CMD curl -f http://localhost:8080/admin?what=qengine || exit 1 + +# Expose SmartMet Server's default port +EXPOSE 8080 + +RUN mkdir -p /smartmet/data/{meps,hirlam,gfs,meteor,nam,icon,gem,gens-avg,gens-ctrl,hbm,wam,aws}/{surface,pressure} \ + /smartmet/share/wms + +RUN install -m 775 -g 0 -d /var/smartmet +RUN install -m 775 -g 0 -d /var/smartmet/archivecache + +RUN chmod -R g=u /etc/passwd + +COPY smartmetconf /etc/smartmet +COPY wms /smartmet/share/wms +COPY docker-entrypoint.sh / + +### Containers should NOT run as root as a good practice +USER 101010 + +ENTRYPOINT ["/docker-entrypoint.sh"] +CMD ["smartmetd"] From 9df32947c79aa1fdb230a68c6dd02c86b8f8fe52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andris=20Pav=C4=93nis?= Date: Fri, 22 Aug 2025 16:16:13 +0300 Subject: [PATCH 02/13] Add Makefile for running tests locally --- Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c46aecd --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ + +build: + $(MAKE) clean + docker build . --file Dockerfile --tag fmidev/smartmetserver:latest + +test: + docker run --name test --rm -p 127.0.0.1:8080:8080 fmidev/smartmetserver:latest &> debug.log & + # Wait for the server to start + sleep 45s + # Check if the server is running + curl -f "http://localhost:8080/wms?request=getCapabilities&service=WMS" || exit 1 + docker stop test + +clean: + -docker image rm -f fmidev/smartmetserver + -docker image prune -f + rm -f debug.log + +build-rhel10: + $(MAKE) clean-rhel10 + docker build . --file Dockerfile.rh10 --tag fmidev/smartmetserver-rhel10:latest + +test-rhel10: + docker run --name test10 --rm -p 127.0.0.1:8080:8080 fmidev/smartmetserver-rhel10:latest &> debug10.log & + # Wait for the server to start + sleep 45s + # Check if the server is running + curl -f "http://localhost:8080/wms?request=getCapabilities&service=WMS" || exit 1 + docker stop test10 + +clean-rhel10: + -docker image rm -f fmidev/smartmetserver-rhel10 + -docker image prune -f + rm -f debug10.log + + docker build -t fmidev/smartmetserver:rhel10 -f Dockerfile.rhel10 . From f824df540f481081c62c4dcd92c89895f5062642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andris=20Pav=C4=93nis?= Date: Fri, 22 Aug 2025 16:19:57 +0300 Subject: [PATCH 03/13] .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b30897 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/debug.log +/debug10.log From 4677d603f227594238eb0280cea6d0a9bc5ceaa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andris=20Pav=C4=93nis?= Date: Fri, 5 Sep 2025 11:01:55 +0300 Subject: [PATCH 04/13] Dockerfile*: install jemalloc --- Dockerfile | 1 + Dockerfile.rhel10 | 1 + 2 files changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index eca3013..923b013 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,7 @@ RUN dnf -y install https://download.fmi.fi/smartmet-open/rhel/9/x86_64/smartmet- dnf -y module disable postgresql:15 && \ dnf -y update && \ dnf -y install --setopt=install_weak_deps=False \ + dnf -y install jemalloc \ smartmet-plugin-admin \ smartmet-plugin-autocomplete \ smartmet-plugin-backend \ diff --git a/Dockerfile.rhel10 b/Dockerfile.rhel10 index 6934e1f..524cb14 100644 --- a/Dockerfile.rhel10 +++ b/Dockerfile.rhel10 @@ -16,6 +16,7 @@ RUN dnf -y install https://download.fmi.fi/smartmet-open/rhel/10/x86_64/smartmet dnf config-manager --set-disabled epel-source && \ dnf -y update && \ dnf -y install --setopt=install_weak_deps=False \ + dnf -y install jemalloc \ smartmet-plugin-autocomplete \ smartmet-plugin-backend \ smartmet-plugin-download \ From 222fe99ee2a9628d3f9bcc18cceef44467266ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andris=20Pav=C4=93nis?= Date: Fri, 5 Sep 2025 11:05:29 +0300 Subject: [PATCH 05/13] [rhel10] Add YAML file for RHEL10 build and test --- .github/workflows/docker-image-rhel10.yml | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/docker-image-rhel10.yml diff --git a/.github/workflows/docker-image-rhel10.yml b/.github/workflows/docker-image-rhel10.yml new file mode 100644 index 0000000..19eb8fd --- /dev/null +++ b/.github/workflows/docker-image-rhel10.yml @@ -0,0 +1,34 @@ +name: Docker Image CI + +on: + schedule: + - cron: '0 6 * * *' + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Docker login + run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin + - name: Docker build + run: docker build . --file Dockerfile.rhel10 --tag fmidev/smartmetserver-rhel10:latest + - name: Docker test + run: | + docker run --name test --rm -p 127.0.0.1:8080:8080 fmidev/smartmetserver-rhel10:latest &> debug.log & + sleep 45 + cat debug.log + docker logs test + curl -f "http://localhost:8080/wms?request=getCapabilities&service=WMS" || exit 1 + docker stop test + - name: Docker tag + run: docker image tag fmidev/smartmetserver-rhel10:latest fmidev/smartmetserver-rhel10:$(date +%y.%m.%d -d @$(docker run --rm fmidev/smartmetserver-rhel10:latest rpm -qa --queryformat %'{buildtime}\n' smartmet-*|sort -n|tail -1)) +# - name: Docker push +# run: docker push --all-tags fmidev/smartmetserver-rhel10 From 8e6b20eb7e0100136c41528f7ef2dc6ddb259ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andris=20Pav=C4=93nis?= Date: Fri, 5 Sep 2025 11:30:30 +0300 Subject: [PATCH 06/13] Fix error from latest Docketfile* change --- Dockerfile | 2 +- Dockerfile.rhel10 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 923b013..aa594e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,8 @@ RUN dnf -y install https://download.fmi.fi/smartmet-open/rhel/9/x86_64/smartmet- dnf config-manager --set-disabled epel-source && \ dnf -y module disable postgresql:15 && \ dnf -y update && \ + dnf -y install jemalloc && \ dnf -y install --setopt=install_weak_deps=False \ - dnf -y install jemalloc \ smartmet-plugin-admin \ smartmet-plugin-autocomplete \ smartmet-plugin-backend \ diff --git a/Dockerfile.rhel10 b/Dockerfile.rhel10 index 524cb14..f1ada98 100644 --- a/Dockerfile.rhel10 +++ b/Dockerfile.rhel10 @@ -15,8 +15,8 @@ RUN dnf -y install https://download.fmi.fi/smartmet-open/rhel/10/x86_64/smartmet dnf config-manager --setopt="epel.exclude=eccodes*" --save && \ dnf config-manager --set-disabled epel-source && \ dnf -y update && \ + dnf -y install jemalloc && \ dnf -y install --setopt=install_weak_deps=False \ - dnf -y install jemalloc \ smartmet-plugin-autocomplete \ smartmet-plugin-backend \ smartmet-plugin-download \ From 77155086d93f2a80f80a50f5cfa98874c7dc171c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andris=20Pav=C4=93nis?= Date: Fri, 5 Sep 2025 11:31:10 +0300 Subject: [PATCH 07/13] Makefile: update --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c46aecd..a56c70d 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ clean: build-rhel10: $(MAKE) clean-rhel10 - docker build . --file Dockerfile.rh10 --tag fmidev/smartmetserver-rhel10:latest + docker build . --file Dockerfile.rhel10 --tag fmidev/smartmetserver-rhel10:latest test-rhel10: docker run --name test10 --rm -p 127.0.0.1:8080:8080 fmidev/smartmetserver-rhel10:latest &> debug10.log & @@ -32,5 +32,3 @@ clean-rhel10: -docker image rm -f fmidev/smartmetserver-rhel10 -docker image prune -f rm -f debug10.log - - docker build -t fmidev/smartmetserver:rhel10 -f Dockerfile.rhel10 . From e7c8bd3a34a9fd2da48090f37ac2cf731b8198d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andris=20Pav=C4=93nis?= Date: Fri, 5 Sep 2025 15:01:49 +0300 Subject: [PATCH 08/13] docker-entrypoint.sh: full path required for LD_PRELOAD in docker-entrypoint.sh --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 7cff3b6..b12ef0b 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -10,7 +10,7 @@ fi if [ "$1" = 'smartmetd' ]; then id whoami - LD_PRELOAD=libjemalloc.so.2 exec /usr/sbin/smartmetd + LD_PRELOAD=/usr/lib64/libjemalloc.so.2 exec /usr/sbin/smartmetd fi exec "$@" From 95f847c79e108d5853d5e41da634e63a470712bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andris=20Pav=C4=93nis?= Date: Tue, 25 Nov 2025 13:59:38 +0200 Subject: [PATCH 09/13] Revert "Update observation.conf" This reverts commit bed4164b11b6fcdfc5bde4127b60cbe53127492a. --- smartmetconf/engines/observation.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smartmetconf/engines/observation.conf b/smartmetconf/engines/observation.conf index 5401344..39db680 100644 --- a/smartmetconf/engines/observation.conf +++ b/smartmetconf/engines/observation.conf @@ -1 +1 @@ -disabled = true; +smartmet.engine.observation.enabled = false; From 6bd34d0b83705924b88fade36c8fd6a629e95003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andris=20Pav=C4=93nis?= Date: Tue, 10 Feb 2026 15:13:06 +0200 Subject: [PATCH 10/13] Dockerfile.rhel10: update --- Dockerfile.rhel10 | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Dockerfile.rhel10 b/Dockerfile.rhel10 index f1ada98..3150f72 100644 --- a/Dockerfile.rhel10 +++ b/Dockerfile.rhel10 @@ -24,6 +24,7 @@ RUN dnf -y install https://download.fmi.fi/smartmet-open/rhel/10/x86_64/smartmet smartmet-plugin-timeseries \ smartmet-plugin-wms \ smartmet-engine-grid \ + smartmet-engine-observation \ smartmet-library-tron \ smartmet-plugin-q3 \ lua-newcairo-q3 \ @@ -32,15 +33,6 @@ RUN dnf -y install https://download.fmi.fi/smartmet-open/rhel/10/x86_64/smartmet dnf -y reinstall --setopt=override_install_langs='' --setopt=tsflags='' glibc-common eccodes && \ dnf clean all -# Install Google Fonts -RUN \ - for FONT in $GOOGLE_FONTS; \ - do \ - mkdir -p /usr/share/fonts/truetype/${FONT} && \ - curl -s -S --output-dir /usr/share/fonts/truetype/${FONT} "https://github.com/google/fonts/raw/main/ofl/${FONT,,}/${FONT}%5Bwdth,wght%5D.ttf" && \ - curl -s -S --output-dir /usr/share/fonts/truetype/${FONT} "https://github.com/google/fonts/raw/main/ofl/${FONT,,}/${FONT}-italic%5Bwdth,wght%5D.ttf" ; \ - done - HEALTHCHECK --interval=30s --timeout=10s \ CMD curl -f http://localhost:8080/admin?what=qengine || exit 1 @@ -56,6 +48,7 @@ RUN install -m 775 -g 0 -d /var/smartmet/archivecache RUN chmod -R g=u /etc/passwd COPY smartmetconf /etc/smartmet +COPY share/edr /usr/share/smartmet/edr COPY wms /smartmet/share/wms COPY docker-entrypoint.sh / From 03a6c52714129d4f129d0ff38dbaec366e7c2e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andris=20Pav=C4=93nis?= Date: Tue, 10 Feb 2026 15:14:40 +0200 Subject: [PATCH 11/13] Makefile: cleanup before running tests --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index a56c70d..8ad9fcd 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ build: docker build . --file Dockerfile --tag fmidev/smartmetserver:latest test: + docker rm -f test 2>/dev/null || true docker run --name test --rm -p 127.0.0.1:8080:8080 fmidev/smartmetserver:latest &> debug.log & # Wait for the server to start sleep 45s @@ -21,6 +22,7 @@ build-rhel10: docker build . --file Dockerfile.rhel10 --tag fmidev/smartmetserver-rhel10:latest test-rhel10: + docker rm -f test10 2>/dev/null || true docker run --name test10 --rm -p 127.0.0.1:8080:8080 fmidev/smartmetserver-rhel10:latest &> debug10.log & # Wait for the server to start sleep 45s From 84992162af08e894281ad72f0a5cf2909b1a71f0 Mon Sep 17 00:00:00 2001 From: Mikko Rauhala Date: Mon, 24 Nov 2025 23:38:59 +0200 Subject: [PATCH 12/13] Update observation.conf --- smartmetconf/engines/observation.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smartmetconf/engines/observation.conf b/smartmetconf/engines/observation.conf index 39db680..5401344 100644 --- a/smartmetconf/engines/observation.conf +++ b/smartmetconf/engines/observation.conf @@ -1 +1 @@ -smartmet.engine.observation.enabled = false; +disabled = true; From 67f982ee35c3eb2130e2ebfc82d5f9f0a297b276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andris=20Pav=C4=93nis?= Date: Tue, 10 Feb 2026 15:29:39 +0200 Subject: [PATCH 13/13] Makefile: do not use cache when building docker images --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8ad9fcd..f1c1e86 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ build: $(MAKE) clean - docker build . --file Dockerfile --tag fmidev/smartmetserver:latest + docker build . --file Dockerfile --tag fmidev/smartmetserver:latest --no-cache test: docker rm -f test 2>/dev/null || true @@ -19,7 +19,7 @@ clean: build-rhel10: $(MAKE) clean-rhel10 - docker build . --file Dockerfile.rhel10 --tag fmidev/smartmetserver-rhel10:latest + docker build . --file Dockerfile.rhel10 --tag fmidev/smartmetserver-rhel10:latest --no-cache test-rhel10: docker rm -f test10 2>/dev/null || true