From 077eb9a7dccf2ea38137665c1695112ae8ed961f Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Wed, 15 Mar 2023 10:43:24 +0100 Subject: [PATCH 01/18] Modification de la compilation d'image du serveur Prise en compte du fonctionnement via librok4-dev --- .github/workflows/server-docker.yaml | 12 ++++--- build/README.md | 4 +-- build/server/docker-entrypoint.sh | 2 +- build/server/ubuntu-2004.Dockerfile | 49 ++++++++++++++++++++++++++++ build/server/ubuntu-2204.Dockerfile | 49 ++++++++++++++++++++++++++++ run/server/README.md | 17 ++++++---- 6 files changed, 119 insertions(+), 14 deletions(-) create mode 100644 build/server/ubuntu-2004.Dockerfile create mode 100644 build/server/ubuntu-2204.Dockerfile diff --git a/.github/workflows/server-docker.yaml b/.github/workflows/server-docker.yaml index 293acf5..fff8668 100644 --- a/.github/workflows/server-docker.yaml +++ b/.github/workflows/server-docker.yaml @@ -4,14 +4,17 @@ on: workflow_dispatch: inputs: server_tag: - description: 'Server tagged version' + description: 'Server version' + required: true + corecpp_tag: + description: 'C++ library version' required: true styles_tag: - description: 'Styles tagged version' + description: 'Styles version' required: true default: '4.0' tilematrixsets_tag: - description: 'Tile matrix sets tagged version' + description: 'Tile matrix sets version' required: true default: '4.0' @@ -37,13 +40,14 @@ jobs: with: context: build/server/ push: true - file: build/server/debian11.Dockerfile + file: build/server/ubuntu-2004.Dockerfile tags: | rok4/server:${{ github.event.inputs.server_tag }} build-args: | ROK4STYLES_VERSION=${{ github.event.inputs.styles_tag }} ROK4TILEMATRIXSETS_VERSION=${{ github.event.inputs.tilematrixsets_tag }} ROK4SERVER_VERSION=${{ github.event.inputs.server_tag }} + ROK4CORECPP_VERSION=${{ github.event.inputs.corecpp_tag }} - name: Docker Hub Description uses: peter-evans/dockerhub-description@v3 diff --git a/build/README.md b/build/README.md index 6fa9e62..5157f71 100644 --- a/build/README.md +++ b/build/README.md @@ -33,6 +33,6 @@ Versions applicatives disponibles : https://github.com/rok4/tools/releases ## Compilation de l'image du serveur de diffusion -Versions applicatives disponibles : https://github.com/rok4/server/releases +Versions applicatives disponibles : https://github.com/rok4/server/releases et https://github.com/rok4/core-cpp/releases -`docker build -t rok4/server:TAG --build-arg ROK4SERVER_VERSION=TAG -f server/debian11.Dockerfile server/` +`docker build -t rok4/server:TAG --build-arg ROK4SERVER_VERSION=TAG --build-arg ROK4CORECPP_VERSION=tag -f server/ubuntu-2004.Dockerfile server/` diff --git a/build/server/docker-entrypoint.sh b/build/server/docker-entrypoint.sh index bfa6c3c..d8f86c8 100644 --- a/build/server/docker-entrypoint.sh +++ b/build/server/docker-entrypoint.sh @@ -12,7 +12,7 @@ envsubst < /etc/rok4/server.template.json > /etc/rok4/server.json # Setup services.json envsubst < /etc/rok4/services.template.json > /etc/rok4/services.json -# Centralisation des descripteurs de couches +# Centralisation des descripteurs de couches (serveur version 4) if [[ ! -z $IMPORT_LAYERS_FROM_PYRAMIDS ]] ; then for lay in $(find /pyramids/ -maxdepth 2 -name "*.lay.json"); do bn=$(basename -s ".lay.json" $lay) diff --git a/build/server/ubuntu-2004.Dockerfile b/build/server/ubuntu-2004.Dockerfile new file mode 100644 index 0000000..0c29496 --- /dev/null +++ b/build/server/ubuntu-2004.Dockerfile @@ -0,0 +1,49 @@ +FROM ubuntu:20.04 + +RUN apt update && apt -y install curl gettext + +ARG ROK4TILEMATRIXSETS_VERSION=4.0 +ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION +RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb + +ARG ROK4STYLES_VERSION=4.0 +ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION +RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb + +ARG ROK4CORECPP_VERSION +ENV ROK4CORECPP_VERSION=$ROK4CORECPP_VERSION +RUN curl -L -o librok4-dev.deb https://github.com/rok4/core-cpp/releases/download/${ROK4CORECPP_VERSION}/librok4-ceph-${ROK4CORECPP_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./librok4-dev.deb + +ARG ROK4SERVER_VERSION +ENV ROK4SERVER_VERSION=$ROK4SERVER_VERSION +RUN curl -L -o rok4-server.deb https://github.com/rok4/server/releases/download/${ROK4SERVER_VERSION}/rok4-server-${ROK4SERVER_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./rok4-server.deb + +# Configuration par variables d'environnement par défaut +ENV IMPORT_LAYERS_FROM_PYRAMIDS="" +ENV SERVER_LOGLEVEL="error" SERVER_LOGOUTPUT="standard_output" SERVER_NBTHREAD="4" SERVER_CACHE_SIZE="1000" SERVER_CACHE_VALIDITY="10" SERVER_BACKLOG="0" +ENV SERVER_LAYERS="/etc/rok4/layers.txt" SERVER_STYLES="/usr/share/rok4/styles" SERVER_TMS="/usr/share/rok4/tilematrixsets" +ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide WMS, WMTS and TMS raster and vector data broadcast" SERVICE_PROVIDERNAME="ROK4 Team" SERVICE_PROVIDERSITE="https://github.com/rok4/documentation" SERVICE_KEYWORDS="WMS,WMTS,TMS,Docker" +ENV SERVICE_FEE="none" SERVICE_ACCESSCONSTRAINT="none" +ENV SERVICE_WMS="WMS service" SERVICE_MAXWIDTH="10000" SERVICE_MAXHEIGHT="10000" SERVICE_LAYERLIMIT="2" SERVICE_MAXTILEX="256" SERVICE_MAXTILEY="256" SERVICE_FORMATLIST="image/jpeg,image/png,image/tiff,image/geotiff,image/x-bil;bits=32" +ENV SERVICE_GLOBALCRSLIST="CRS:84,EPSG:3857" SERVICE_FULLYSTYLING="true" SERVICE_INSPIRE="false" +ENV SERVICE_WMTSSUPPORT="true" SERVICE_TMSSUPPORT="true" SERVICE_WMSSUPPORT="true" +ENV SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" + +WORKDIR / + +# Déploiement des configurations +COPY ./server.template.json /etc/rok4/server.template.json +COPY ./services.template.json /etc/rok4/services.template.json + +COPY ./docker-entrypoint.sh / +RUN chmod +x /docker-entrypoint.sh + +RUN mkdir /etc/rok4/layers /pyramids + +VOLUME /etc/rok4/layers +VOLUME /pyramids + +EXPOSE 9000 + +ENTRYPOINT ["/docker-entrypoint.sh"] +CMD ["/usr/bin/rok4", "-f", "/etc/rok4/server.json"] diff --git a/build/server/ubuntu-2204.Dockerfile b/build/server/ubuntu-2204.Dockerfile new file mode 100644 index 0000000..f687335 --- /dev/null +++ b/build/server/ubuntu-2204.Dockerfile @@ -0,0 +1,49 @@ +FROM ubuntu:22.04 + +RUN apt update && apt -y install curl gettext + +ARG ROK4TILEMATRIXSETS_VERSION=4.0 +ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION +RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb + +ARG ROK4STYLES_VERSION=4.0 +ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION +RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb + +ARG ROK4CORECPP_VERSION +ENV ROK4CORECPP_VERSION=$ROK4CORECPP_VERSION +RUN curl -L -o librok4-dev.deb https://github.com/rok4/core-cpp/releases/download/${ROK4CORECPP_VERSION}/librok4-ceph-${ROK4CORECPP_VERSION}-ubuntu-22.04-amd64.deb && apt install -y ./librok4-dev.deb + +ARG ROK4SERVER_VERSION +ENV ROK4SERVER_VERSION=$ROK4SERVER_VERSION +RUN curl -L -o rok4-server.deb https://github.com/rok4/server/releases/download/${ROK4SERVER_VERSION}/rok4-server-${ROK4SERVER_VERSION}-ubuntu-22.04-amd64.deb && apt install -y ./rok4-server.deb + +# Configuration par variables d'environnement par défaut +ENV IMPORT_LAYERS_FROM_PYRAMIDS="" +ENV SERVER_LOGLEVEL="error" SERVER_LOGOUTPUT="standard_output" SERVER_NBTHREAD="4" SERVER_CACHE_SIZE="1000" SERVER_CACHE_VALIDITY="10" SERVER_BACKLOG="0" +ENV SERVER_LAYERS="/etc/rok4/layers.txt" SERVER_STYLES="/usr/share/rok4/styles" SERVER_TMS="/usr/share/rok4/tilematrixsets" +ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide WMS, WMTS and TMS raster and vector data broadcast" SERVICE_PROVIDERNAME="ROK4 Team" SERVICE_PROVIDERSITE="https://github.com/rok4/documentation" SERVICE_KEYWORDS="WMS,WMTS,TMS,Docker" +ENV SERVICE_FEE="none" SERVICE_ACCESSCONSTRAINT="none" +ENV SERVICE_WMS="WMS service" SERVICE_MAXWIDTH="10000" SERVICE_MAXHEIGHT="10000" SERVICE_LAYERLIMIT="2" SERVICE_MAXTILEX="256" SERVICE_MAXTILEY="256" SERVICE_FORMATLIST="image/jpeg,image/png,image/tiff,image/geotiff,image/x-bil;bits=32" +ENV SERVICE_GLOBALCRSLIST="CRS:84,EPSG:3857" SERVICE_FULLYSTYLING="true" SERVICE_INSPIRE="false" +ENV SERVICE_WMTSSUPPORT="true" SERVICE_TMSSUPPORT="true" SERVICE_WMSSUPPORT="true" +ENV SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" + +WORKDIR / + +# Déploiement des configurations +COPY ./server.template.json /etc/rok4/server.template.json +COPY ./services.template.json /etc/rok4/services.template.json + +COPY ./docker-entrypoint.sh / +RUN chmod +x /docker-entrypoint.sh + +RUN mkdir /etc/rok4/layers /pyramids + +VOLUME /etc/rok4/layers +VOLUME /pyramids + +EXPOSE 9000 + +ENTRYPOINT ["/docker-entrypoint.sh"] +CMD ["/usr/bin/rok4", "-f", "/etc/rok4/server.json"] diff --git a/run/server/README.md b/run/server/README.md index e20aaad..6c22d26 100644 --- a/run/server/README.md +++ b/run/server/README.md @@ -26,19 +26,19 @@ Liste des variables d'environnement injectées dans les fichiers de configuratio * `server.json` * SERVER_LOGLEVEL (`error`) - * SERVER_LOGOUTPUT (`standard_output_stream_for_errors`, valide pour la version 4, surcharger avec `standard_output` pour la version 5) + * SERVER_LOGOUTPUT (`standard_output`, valide pour la version 5, surcharger avec `standard_output_stream_for_errors` pour la version 4) * SERVER_NBTHREAD (`4`) * SERVER_CACHE_SIZE (`1000`) * SERVER_CACHE_VALIDITY (`10`) - * SERVER_LAYERS (`/etc/rok4/layers`) - * SERVER_STYLES (`/etc/rok4/styles`) - * SERVER_TMS (`/etc/rok4/tilematrixsets`) + * SERVER_LAYERS (`/etc/rok4/layers.txt`, valide pour la version 5, surcharger avec `/etc/rok4/layers/` pour la version 4) + * SERVER_STYLES (`/usr/share/rok4/styles`, valide pour la version 5, surcharger avec `/etc/rok4/layers/` pour la version 4)) + * SERVER_TMS (`/usr/share/rok4/tilematrixsets`, valide pour la version 5, surcharger avec `/etc/rok4/layers/` pour la version 4)) * SERVER_BACKLOG (`0`) * `services.json` * SERVICE_TITLE (`WMS/WMTS/TMS server`) * SERVICE_ABSTRACT (`This server provide WMS, WMTS and TMS raster and vector data broadcast`) * SERVICE_PROVIDERNAME (`ROK4 Team`) - * SERVICE_PROVIDERSITE (`https://github.com/rok4/documentation`) + * SERVICE_PROVIDERSITE (`https://rok4.github.io/`) * SERVICE_KEYWORDS (`WMS,WMTS,TMS,Docker`) * SERVICE_FEE (`none`) * SERVICE_ACCESSCONSTRAINT (`none`) @@ -85,7 +85,7 @@ Il est aussi possible de définir toutes les variables d'environnement dans un f `docker run --publish 9000:9000 --env-file=custom_env rok4/server` -En définissant la variable d'environnement `IMPORT_LAYERS_FROM_PYRAMIDS` à une valeur non nulle, le script de lancement du serveur copie les fichiers avec l'extension `.lay.json` trouvés dans le dossier `/pyramids` dans le dossier `/layers` (en supprimant le .lay du nom). +En définissant la variable d'environnement `IMPORT_LAYERS_FROM_PYRAMIDS` à une valeur non nulle (version 4), le script de lancement du serveur copie les fichiers avec l'extension `.lay.json` trouvés dans le dossier `/pyramids` dans le dossier `/etc/rok4/layers` (en supprimant le .lay du nom). ## Lancement au sein d'une stack avec stockage fichier (version 4) @@ -204,9 +204,12 @@ services: - ./nginx.conf:/etc/nginx/conf.d/default.conf middle: - image: rok4/server:5.0.1 + image: rok4/server:5.0.4 depends_on: - storage + deploy: + mode: replicated + replicas: 2 environment: - SERVER_LOGLEVEL=info - IMPORT_LAYERS_FROM_PYRAMIDS=non From c46bf36b151c5c1aa88220adfa06e3995ad72fc9 Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Tue, 4 Apr 2023 14:48:15 +0200 Subject: [PATCH 02/18] Uniformisation ubuntu2X.04 -> ubuntu-2X.04 --- build/fullgeneration/debian11.Dockerfile | 8 ++++---- build/generation/debian11.Dockerfile | 2 +- build/generation/debian12.Dockerfile | 2 +- build/pregeneration/debian11.Dockerfile | 4 ++-- build/pregeneration/debian12.Dockerfile | 4 ++-- build/tools/debian11.Dockerfile | 4 ++-- run/server/README.md | 5 ++--- run/server/docker-compose-s3.yaml | 2 +- 8 files changed, 15 insertions(+), 16 deletions(-) diff --git a/build/fullgeneration/debian11.Dockerfile b/build/fullgeneration/debian11.Dockerfile index 671ded8..ad57d8e 100644 --- a/build/fullgeneration/debian11.Dockerfile +++ b/build/fullgeneration/debian11.Dockerfile @@ -13,19 +13,19 @@ RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download ARG ROK4GENERATION_VERSION ENV ROK4GENERATION_VERSION=$ROK4GENERATION_VERSION -RUN curl -L -o rok4-generation.deb https://github.com/rok4/generation/releases/download/${ROK4GENERATION_VERSION}/rok4-generation-${ROK4GENERATION_VERSION}-ubuntu20.04-amd64.deb && apt install -y ./rok4-generation.deb +RUN curl -L -o rok4-generation.deb https://github.com/rok4/generation/releases/download/${ROK4GENERATION_VERSION}/rok4-generation-${ROK4GENERATION_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./rok4-generation.deb ARG ROK4COREPERL_VERSION ENV ROK4COREPERL_VERSION=$ROK4COREPERL_VERSION -RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb +RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu-20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb ARG ROK4PREGENERATION_VERSION ENV ROK4PREGENERATION_VERSION=$ROK4PREGENERATION_VERSION -RUN curl -L -o rok4-pregeneration.deb https://github.com/rok4/pregeneration/releases/download/${ROK4PREGENERATION_VERSION}/rok4-pregeneration-${ROK4PREGENERATION_VERSION}-ubuntu20.04-all.deb && apt install -y ./rok4-pregeneration.deb +RUN curl -L -o rok4-pregeneration.deb https://github.com/rok4/pregeneration/releases/download/${ROK4PREGENERATION_VERSION}/rok4-pregeneration-${ROK4PREGENERATION_VERSION}-ubuntu-20.04-all.deb && apt install -y ./rok4-pregeneration.deb ARG ROK4TOOLS_VERSION ENV ROK4TOOLS_VERSION=$ROK4TOOLS_VERSION -RUN curl -L -o rok4-tools.deb https://github.com/rok4/tools/releases/download/${ROK4TOOLS_VERSION}/rok4-tools-${ROK4TOOLS_VERSION}-ubuntu20.04-all.deb && apt install -y ./rok4-tools.deb +RUN curl -L -o rok4-tools.deb https://github.com/rok4/tools/releases/download/${ROK4TOOLS_VERSION}/rok4-tools-${ROK4TOOLS_VERSION}-ubuntu-20.04-all.deb && apt install -y ./rok4-tools.deb COPY --from=metacollin/tippecanoe:latest /usr/local/bin/tippecanoe /usr/bin/tippecanoe ENV TIPPECANOE_VERSION=v1.36.0 diff --git a/build/generation/debian11.Dockerfile b/build/generation/debian11.Dockerfile index 2939fef..53073f6 100644 --- a/build/generation/debian11.Dockerfile +++ b/build/generation/debian11.Dockerfile @@ -8,7 +8,7 @@ RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download ARG ROK4GENERATION_VERSION ENV ROK4GENERATION_VERSION=$ROK4GENERATION_VERSION -RUN curl -L -o rok4-generation.deb https://github.com/rok4/generation/releases/download/${ROK4GENERATION_VERSION}/rok4-generation-${ROK4GENERATION_VERSION}-ubuntu20.04-amd64.deb && apt install -y ./rok4-generation.deb +RUN curl -L -o rok4-generation.deb https://github.com/rok4/generation/releases/download/${ROK4GENERATION_VERSION}/rok4-generation-${ROK4GENERATION_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./rok4-generation.deb COPY --from=metacollin/tippecanoe:latest /usr/local/bin/tippecanoe /usr/bin/tippecanoe ENV TIPPECANOE_VERSION=v1.36.0 diff --git a/build/generation/debian12.Dockerfile b/build/generation/debian12.Dockerfile index c43dec7..bc77ee4 100644 --- a/build/generation/debian12.Dockerfile +++ b/build/generation/debian12.Dockerfile @@ -8,7 +8,7 @@ RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download ARG ROK4GENERATION_VERSION ENV ROK4GENERATION_VERSION=$ROK4GENERATION_VERSION -RUN curl -L -o rok4-generation.deb https://github.com/rok4/generation/releases/download/${ROK4GENERATION_VERSION}/rok4-generation-${ROK4GENERATION_VERSION}-ubuntu22.04-amd64.deb && apt install -y ./rok4-generation.deb +RUN curl -L -o rok4-generation.deb https://github.com/rok4/generation/releases/download/${ROK4GENERATION_VERSION}/rok4-generation-${ROK4GENERATION_VERSION}-ubuntu-22.04-amd64.deb && apt install -y ./rok4-generation.deb COPY --from=metacollin/tippecanoe:latest /usr/local/bin/tippecanoe /usr/bin/tippecanoe ENV TIPPECANOE_VERSION=v1.36.0 diff --git a/build/pregeneration/debian11.Dockerfile b/build/pregeneration/debian11.Dockerfile index 5d5b628..0e10b82 100644 --- a/build/pregeneration/debian11.Dockerfile +++ b/build/pregeneration/debian11.Dockerfile @@ -9,10 +9,10 @@ ENV ROK4_TMS_DIRECTORY=/etc/rok4/tilematrixsets ARG ROK4COREPERL_VERSION ENV ROK4COREPERL_VERSION=$ROK4COREPERL_VERSION -RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb +RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu-20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb ARG ROK4PREGENERATION_VERSION ENV ROK4PREGENERATION_VERSION=$ROK4PREGENERATION_VERSION -RUN curl -L -o rok4-pregeneration.deb https://github.com/rok4/pregeneration/releases/download/${ROK4PREGENERATION_VERSION}/rok4-pregeneration-${ROK4PREGENERATION_VERSION}-ubuntu20.04-all.deb && apt install -y ./rok4-pregeneration.deb +RUN curl -L -o rok4-pregeneration.deb https://github.com/rok4/pregeneration/releases/download/${ROK4PREGENERATION_VERSION}/rok4-pregeneration-${ROK4PREGENERATION_VERSION}-ubuntu-20.04-all.deb && apt install -y ./rok4-pregeneration.deb CMD echo "ROK4:\n\t- pregeneration: $ROK4PREGENERATION_VERSION\n\t- core Perl: $ROK4COREPERL_VERSION\n\t- tile matrix sets: $ROK4TILEMATRIXSETS_VERSION" diff --git a/build/pregeneration/debian12.Dockerfile b/build/pregeneration/debian12.Dockerfile index 8061917..e469df6 100644 --- a/build/pregeneration/debian12.Dockerfile +++ b/build/pregeneration/debian12.Dockerfile @@ -9,10 +9,10 @@ ENV ROK4_TMS_DIRECTORY=/etc/rok4/tilematrixsets ARG ROK4COREPERL_VERSION ENV ROK4COREPERL_VERSION=$ROK4COREPERL_VERSION -RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb +RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu-20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb ARG ROK4PREGENERATION_VERSION ENV ROK4PREGENERATION_VERSION=$ROK4PREGENERATION_VERSION -RUN curl -L -o rok4-pregeneration.deb https://github.com/rok4/pregeneration/releases/download/${ROK4PREGENERATION_VERSION}/rok4-pregeneration-${ROK4PREGENERATION_VERSION}-ubuntu20.04-all.deb && apt install -y ./rok4-pregeneration.deb +RUN curl -L -o rok4-pregeneration.deb https://github.com/rok4/pregeneration/releases/download/${ROK4PREGENERATION_VERSION}/rok4-pregeneration-${ROK4PREGENERATION_VERSION}-ubuntu-20.04-all.deb && apt install -y ./rok4-pregeneration.deb CMD echo "ROK4:\n\t- pregeneration: $ROK4PREGENERATION_VERSION\n\t- core Perl: $ROK4COREPERL_VERSION\n\t- tile matrix sets: $ROK4TILEMATRIXSETS_VERSION" diff --git a/build/tools/debian11.Dockerfile b/build/tools/debian11.Dockerfile index 461ec0b..ed080b4 100644 --- a/build/tools/debian11.Dockerfile +++ b/build/tools/debian11.Dockerfile @@ -9,10 +9,10 @@ ENV ROK4_TMS_DIRECTORY=/etc/rok4/tilematrixsets ARG ROK4COREPERL_VERSION ENV ROK4COREPERL_VERSION=$ROK4COREPERL_VERSION -RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb +RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu-20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb ARG ROK4TOOLS_VERSION ENV ROK4TOOLS_VERSION=$ROK4TOOLS_VERSION -RUN curl -L -o rok4-tools.deb https://github.com/rok4/tools/releases/download/${ROK4TOOLS_VERSION}/rok4-tools-${ROK4TOOLS_VERSION}-ubuntu20.04-all.deb && apt install -y ./rok4-tools.deb +RUN curl -L -o rok4-tools.deb https://github.com/rok4/tools/releases/download/${ROK4TOOLS_VERSION}/rok4-tools-${ROK4TOOLS_VERSION}-ubuntu-20.04-all.deb && apt install -y ./rok4-tools.deb CMD echo "ROK4:\n\t- tools: $ROK4TOOLS_VERSION\n\t- core Perl: $ROK4COREPERL_VERSION\n\t- tile matrix sets: $ROK4TILEMATRIXSETS_VERSION" diff --git a/run/server/README.md b/run/server/README.md index 6c22d26..67f48d6 100644 --- a/run/server/README.md +++ b/run/server/README.md @@ -207,9 +207,6 @@ services: image: rok4/server:5.0.4 depends_on: - storage - deploy: - mode: replicated - replicas: 2 environment: - SERVER_LOGLEVEL=info - IMPORT_LAYERS_FROM_PYRAMIDS=non @@ -253,6 +250,8 @@ Cette stack comprend : * Des serveurs ROK4 * Un stockage S3, disponible sous forme d'[image](https://hub.docker.com/r/rok4/dataset), tag `minio` +Cette centralisation du stockage permet plus facilement de déployer plusieurs middle : `docker-compose -f docker-compose.yaml up --scale middle=2` + Les capacités des 3 services rendus (WMS, WMTS et TMS) sont disponibles aux URL : * WMS : http://localhost/wms?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0 diff --git a/run/server/docker-compose-s3.yaml b/run/server/docker-compose-s3.yaml index 9989e95..aa9dbd9 100644 --- a/run/server/docker-compose-s3.yaml +++ b/run/server/docker-compose-s3.yaml @@ -13,7 +13,7 @@ services: - ./viewer:/usr/share/nginx/html/viewer middle: - image: rok4/server:5.0.1 + image: rok4/server:5.0.4 depends_on: - storage environment: From bb21ac911962b76ec8a94b73bc687ca15f6da952 Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Tue, 4 Apr 2023 14:57:14 +0200 Subject: [PATCH 03/18] Ajout de l'installation de la lib c++ rok4 --- .github/workflows/fullgeneration-docker.yaml | 4 ++++ .github/workflows/generation-docker.yaml | 4 ++++ build/fullgeneration/debian11.Dockerfile | 4 ++++ build/generation/debian11.Dockerfile | 4 ++++ build/generation/debian12.Dockerfile | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/.github/workflows/fullgeneration-docker.yaml b/.github/workflows/fullgeneration-docker.yaml index 10f6cb5..26b3bfa 100644 --- a/.github/workflows/fullgeneration-docker.yaml +++ b/.github/workflows/fullgeneration-docker.yaml @@ -3,6 +3,9 @@ name: Build and publish full generation Docker image on: workflow_dispatch: inputs: + corecpp_tag: + description: 'C++ library version' + required: true generation_tag: description: 'Generation tools tagged version' required: true @@ -56,6 +59,7 @@ jobs: ROK4STYLES_VERSION=${{ github.event.inputs.styles_tag }} ROK4GENERATION_VERSION=${{ github.event.inputs.generation_tag }} ROK4TOOLS_VERSION=${{ github.event.inputs.tools_tag }} + ROK4CORECPP_VERSION=${{ github.event.inputs.corecpp_tag }} - name: Docker Hub Description uses: peter-evans/dockerhub-description@v3 diff --git a/.github/workflows/generation-docker.yaml b/.github/workflows/generation-docker.yaml index c457200..01202d3 100644 --- a/.github/workflows/generation-docker.yaml +++ b/.github/workflows/generation-docker.yaml @@ -3,6 +3,9 @@ name: Build and publish generation Docker image on: workflow_dispatch: inputs: + corecpp_tag: + description: 'C++ library version' + required: true generation_tag: description: 'Generation tools tagged version' required: true @@ -39,6 +42,7 @@ jobs: build-args: | ROK4STYLES_VERSION=${{ github.event.inputs.styles_tag }} ROK4GENERATION_VERSION=${{ github.event.inputs.generation_tag }} + ROK4CORECPP_VERSION=${{ github.event.inputs.corecpp_tag }} - name: Docker Hub Description uses: peter-evans/dockerhub-description@v3 diff --git a/build/fullgeneration/debian11.Dockerfile b/build/fullgeneration/debian11.Dockerfile index ad57d8e..c96159e 100644 --- a/build/fullgeneration/debian11.Dockerfile +++ b/build/fullgeneration/debian11.Dockerfile @@ -11,6 +11,10 @@ ARG ROK4STYLES_VERSION=4.0 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb +ARG ROK4CORECPP_VERSION +ENV ROK4CORECPP_VERSION=$ROK4CORECPP_VERSION +RUN curl -L -o librok4-dev.deb https://github.com/rok4/core-cpp/releases/download/${ROK4CORECPP_VERSION}/librok4-ceph-${ROK4CORECPP_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./librok4-dev.deb + ARG ROK4GENERATION_VERSION ENV ROK4GENERATION_VERSION=$ROK4GENERATION_VERSION RUN curl -L -o rok4-generation.deb https://github.com/rok4/generation/releases/download/${ROK4GENERATION_VERSION}/rok4-generation-${ROK4GENERATION_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./rok4-generation.deb diff --git a/build/generation/debian11.Dockerfile b/build/generation/debian11.Dockerfile index 53073f6..74b79de 100644 --- a/build/generation/debian11.Dockerfile +++ b/build/generation/debian11.Dockerfile @@ -6,6 +6,10 @@ ARG ROK4STYLES_VERSION=4.0 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb +ARG ROK4CORECPP_VERSION +ENV ROK4CORECPP_VERSION=$ROK4CORECPP_VERSION +RUN curl -L -o librok4-dev.deb https://github.com/rok4/core-cpp/releases/download/${ROK4CORECPP_VERSION}/librok4-ceph-${ROK4CORECPP_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./librok4-dev.deb + ARG ROK4GENERATION_VERSION ENV ROK4GENERATION_VERSION=$ROK4GENERATION_VERSION RUN curl -L -o rok4-generation.deb https://github.com/rok4/generation/releases/download/${ROK4GENERATION_VERSION}/rok4-generation-${ROK4GENERATION_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./rok4-generation.deb diff --git a/build/generation/debian12.Dockerfile b/build/generation/debian12.Dockerfile index bc77ee4..3dc6823 100644 --- a/build/generation/debian12.Dockerfile +++ b/build/generation/debian12.Dockerfile @@ -6,6 +6,10 @@ ARG ROK4STYLES_VERSION=4.0 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb +ARG ROK4CORECPP_VERSION +ENV ROK4CORECPP_VERSION=$ROK4CORECPP_VERSION +RUN curl -L -o librok4-dev.deb https://github.com/rok4/core-cpp/releases/download/${ROK4CORECPP_VERSION}/librok4-ceph-${ROK4CORECPP_VERSION}-ubuntu-22.04-amd64.deb && apt install -y ./librok4-dev.deb + ARG ROK4GENERATION_VERSION ENV ROK4GENERATION_VERSION=$ROK4GENERATION_VERSION RUN curl -L -o rok4-generation.deb https://github.com/rok4/generation/releases/download/${ROK4GENERATION_VERSION}/rok4-generation-${ROK4GENERATION_VERSION}-ubuntu-22.04-amd64.deb && apt install -y ./rok4-generation.deb From 48260d9b4e52c5eedaa61426c32d9c6cc8f4a111 Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Fri, 21 Jul 2023 17:03:48 +0200 Subject: [PATCH 04/18] =?UTF-8?q?Pr=C3=A9cision=20de=20la=20version=20de?= =?UTF-8?q?=20l'image=20finale=20pour=20fullgeneration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fullgeneration-docker.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fullgeneration-docker.yaml b/.github/workflows/fullgeneration-docker.yaml index 26b3bfa..916205d 100644 --- a/.github/workflows/fullgeneration-docker.yaml +++ b/.github/workflows/fullgeneration-docker.yaml @@ -3,6 +3,9 @@ name: Build and publish full generation Docker image on: workflow_dispatch: inputs: + output_image_tag: + description: 'Output docker image tag' + required: true corecpp_tag: description: 'C++ library version' required: true @@ -51,7 +54,7 @@ jobs: push: true file: build/fullgeneration/debian11.Dockerfile tags: | - rok4/fullgeneration:${{ github.event.inputs.pregeneration_tag }} + rok4/fullgeneration:${{ github.event.inputs.output_image_tag }} build-args: | ROK4TILEMATRIXSETS_VERSION=${{ github.event.inputs.tilematrixsets_tag }} ROK4COREPERL_VERSION=${{ github.event.inputs.coreperl_tag }} From 7539a242dfd247cc15b8f5eb46e5ce9f0a6298d4 Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Fri, 21 Jul 2023 17:12:01 +0200 Subject: [PATCH 05/18] Passage des styles et TMS dans /usr/share/rok4 --- .github/workflows/fullgeneration-docker.yaml | 4 +- .github/workflows/generation-docker.yaml | 2 +- .github/workflows/pregeneration-docker.yaml | 2 +- .github/workflows/server-docker.yaml | 4 +- .github/workflows/tools-docker.yaml | 2 +- build/README.md | 6 +++ build/builder/build-artefact.sh | 4 +- build/fullgeneration/debian11.Dockerfile | 6 +-- build/generation/debian11.Dockerfile | 2 +- build/generation/debian12.Dockerfile | 2 +- build/pregeneration/debian11.Dockerfile | 4 +- build/pregeneration/debian12.Dockerfile | 4 +- build/pytools/debian11.Dockerfile | 15 +++++++ build/server/debian11.Dockerfile | 45 -------------------- build/server/debian12.Dockerfile | 45 -------------------- build/server/ubuntu-2004.Dockerfile | 4 +- build/server/ubuntu-2204.Dockerfile | 4 +- build/tools/debian11.Dockerfile | 4 +- 18 files changed, 45 insertions(+), 114 deletions(-) create mode 100644 build/pytools/debian11.Dockerfile delete mode 100644 build/server/debian11.Dockerfile delete mode 100644 build/server/debian12.Dockerfile diff --git a/.github/workflows/fullgeneration-docker.yaml b/.github/workflows/fullgeneration-docker.yaml index 916205d..94bd895 100644 --- a/.github/workflows/fullgeneration-docker.yaml +++ b/.github/workflows/fullgeneration-docker.yaml @@ -24,11 +24,11 @@ on: tilematrixsets_tag: description: 'Tile matrix sets tagged version' required: true - default: '4.0' + default: '4.1' styles_tag: description: 'Styles tagged version' required: true - default: '4.0' + default: '4.1' jobs: push_to_registry: diff --git a/.github/workflows/generation-docker.yaml b/.github/workflows/generation-docker.yaml index 01202d3..031bde7 100644 --- a/.github/workflows/generation-docker.yaml +++ b/.github/workflows/generation-docker.yaml @@ -12,7 +12,7 @@ on: styles_tag: description: 'Styles tagged version' required: true - default: '4.0' + default: '4.1' jobs: push_to_registry: diff --git a/.github/workflows/pregeneration-docker.yaml b/.github/workflows/pregeneration-docker.yaml index c8de358..1098213 100644 --- a/.github/workflows/pregeneration-docker.yaml +++ b/.github/workflows/pregeneration-docker.yaml @@ -12,7 +12,7 @@ on: tilematrixsets_tag: description: 'Tile matrix sets tagged version' required: true - default: '4.0' + default: '4.1' jobs: push_to_registry: diff --git a/.github/workflows/server-docker.yaml b/.github/workflows/server-docker.yaml index fff8668..2eaed4d 100644 --- a/.github/workflows/server-docker.yaml +++ b/.github/workflows/server-docker.yaml @@ -12,11 +12,11 @@ on: styles_tag: description: 'Styles version' required: true - default: '4.0' + default: '4.1' tilematrixsets_tag: description: 'Tile matrix sets version' required: true - default: '4.0' + default: '4.1' jobs: push_to_registry: diff --git a/.github/workflows/tools-docker.yaml b/.github/workflows/tools-docker.yaml index 67e2899..cdefb54 100644 --- a/.github/workflows/tools-docker.yaml +++ b/.github/workflows/tools-docker.yaml @@ -12,7 +12,7 @@ on: tilematrixsets_tag: description: 'Tile matrix sets tagged version' required: true - default: '4.0' + default: '4.1' jobs: push_to_registry: diff --git a/build/README.md b/build/README.md index 5157f71..a67ce3c 100644 --- a/build/README.md +++ b/build/README.md @@ -31,6 +31,12 @@ Versions applicatives disponibles : https://github.com/rok4/tools/releases `docker build -t rok4/fullgeneration:TAG --build-arg ROK4PREGENERATION_VERSION=TAG --build-arg ROK4COREPERL_VERSION=TAG --build-arg ROK4GENERATION_VERSION=TAG --build-arg ROK4TOOLS_VERSION=TAG -f fullgeneration/debian11.Dockerfile fullgeneration/` +## Compilation de l'image des outils python + +Versions applicatives disponibles : https://github.com/rok4/pytools/releases + +`docker build -t rok4/pytools:TAG --build-arg ROK4PYTOOLS_VERSION=TAG -f pytools/debian11.Dockerfile pytools/` + ## Compilation de l'image du serveur de diffusion Versions applicatives disponibles : https://github.com/rok4/server/releases et https://github.com/rok4/core-cpp/releases diff --git a/build/builder/build-artefact.sh b/build/builder/build-artefact.sh index 67d3cef..4c74e58 100644 --- a/build/builder/build-artefact.sh +++ b/build/builder/build-artefact.sh @@ -141,8 +141,8 @@ elif [[ $COMPONENT == "tilematrixsets" ]]; then git clone --branch $VERSION --depth 1 --recursive https://github.com/rok4/tilematrixsets fi - mkdir -p /rok4-tilematrixsets-$VERSION-linux-all/etc/rok4/tilematrixsets - cp /sources/tilematrixsets/*.json /rok4-tilematrixsets-$VERSION-linux-all/etc/rok4/tilematrixsets/ + mkdir -p /rok4-tilematrixsets-$VERSION-linux-all/usr/share/rok4/tilematrixsets + cp /sources/tilematrixsets/*.json /rok4-tilematrixsets-$VERSION-linux-all/usr/share/rok4/tilematrixsets/ tar cvfz /artefacts/rok4-tilematrixsets-$VERSION-linux-all.tar.gz -C / rok4-tilematrixsets-$VERSION-linux-all diff --git a/build/fullgeneration/debian11.Dockerfile b/build/fullgeneration/debian11.Dockerfile index c96159e..5a302da 100644 --- a/build/fullgeneration/debian11.Dockerfile +++ b/build/fullgeneration/debian11.Dockerfile @@ -2,12 +2,12 @@ FROM ubuntu:20.04 RUN apt update && apt -y install curl procps wget gdal-bin -ARG ROK4TILEMATRIXSETS_VERSION=4.0 +ARG ROK4TILEMATRIXSETS_VERSION=4.1 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb -ENV ROK4_TMS_DIRECTORY=/etc/rok4/tilematrixsets +ENV ROK4_TMS_DIRECTORY=/usr/share/rok4/tilematrixsets -ARG ROK4STYLES_VERSION=4.0 +ARG ROK4STYLES_VERSION=4.1 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb diff --git a/build/generation/debian11.Dockerfile b/build/generation/debian11.Dockerfile index 74b79de..107c145 100644 --- a/build/generation/debian11.Dockerfile +++ b/build/generation/debian11.Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:20.04 RUN apt update && apt -y install curl procps wget gdal-bin -ARG ROK4STYLES_VERSION=4.0 +ARG ROK4STYLES_VERSION=4.1 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb diff --git a/build/generation/debian12.Dockerfile b/build/generation/debian12.Dockerfile index 3dc6823..c8d776c 100644 --- a/build/generation/debian12.Dockerfile +++ b/build/generation/debian12.Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:22.04 RUN apt update && apt -y install curl procps wget gdal-bin -ARG ROK4STYLES_VERSION=4.0 +ARG ROK4STYLES_VERSION=4.1 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb diff --git a/build/pregeneration/debian11.Dockerfile b/build/pregeneration/debian11.Dockerfile index 0e10b82..c61ac6f 100644 --- a/build/pregeneration/debian11.Dockerfile +++ b/build/pregeneration/debian11.Dockerfile @@ -2,10 +2,10 @@ FROM ubuntu:20.04 RUN apt update && apt -y install curl procps wget gdal-bin -ARG ROK4TILEMATRIXSETS_VERSION=4.0 +ARG ROK4TILEMATRIXSETS_VERSION=4.1 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb -ENV ROK4_TMS_DIRECTORY=/etc/rok4/tilematrixsets +ENV ROK4_TMS_DIRECTORY=/usr/share/rok4/tilematrixsets ARG ROK4COREPERL_VERSION ENV ROK4COREPERL_VERSION=$ROK4COREPERL_VERSION diff --git a/build/pregeneration/debian12.Dockerfile b/build/pregeneration/debian12.Dockerfile index e469df6..333f0f1 100644 --- a/build/pregeneration/debian12.Dockerfile +++ b/build/pregeneration/debian12.Dockerfile @@ -2,10 +2,10 @@ FROM ubuntu:22.04 RUN apt update && apt -y install curl procps wget gdal-bin -ARG ROK4TILEMATRIXSETS_VERSION=4.0 +ARG ROK4TILEMATRIXSETS_VERSION=4.1 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb -ENV ROK4_TMS_DIRECTORY=/etc/rok4/tilematrixsets +ENV ROK4_TMS_DIRECTORY=/usr/share/rok4/tilematrixsets ARG ROK4COREPERL_VERSION ENV ROK4COREPERL_VERSION=$ROK4COREPERL_VERSION diff --git a/build/pytools/debian11.Dockerfile b/build/pytools/debian11.Dockerfile new file mode 100644 index 0000000..3cc99f6 --- /dev/null +++ b/build/pytools/debian11.Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.10-slim-bullseye + +RUN apt update && apt -y install python3-gdal python3-rados curl + +ARG ROK4TILEMATRIXSETS_VERSION=4.1 +ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION +RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb +ENV ROK4_TMS_DIRECTORY=/usr/share/rok4/tilematrixsets + +ARG ROK4PYTOOLS_VERSION +ENV ROK4PYTOOLS_VERSION=$ROK4PYTOOLS_VERSION +RUN pip install rok4-tools==$ROK4PYTOOLS_VERSION && pip install numpy --upgrade +RUN echo "/usr/lib/python3/dist-packages/" >/usr/local/lib/python3.10/site-packages/system.pth + +CMD echo "ROK4:\n\t- pytools: $ROK4PYTOOLS_VERSION\n\t- tile matrix sets: $ROK4TILEMATRIXSETS_VERSION" diff --git a/build/server/debian11.Dockerfile b/build/server/debian11.Dockerfile deleted file mode 100644 index 715c614..0000000 --- a/build/server/debian11.Dockerfile +++ /dev/null @@ -1,45 +0,0 @@ -FROM ubuntu:20.04 - -RUN apt update && apt -y install curl gettext - -ARG ROK4TILEMATRIXSETS_VERSION=4.0 -ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION -RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb - -ARG ROK4STYLES_VERSION=4.0 -ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION -RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb - -ARG ROK4SERVER_VERSION -ENV ROK4SERVER_VERSION=$ROK4SERVER_VERSION -RUN curl -L -o rok4-server.deb https://github.com/rok4/server/releases/download/${ROK4SERVER_VERSION}/rok4-server-${ROK4SERVER_VERSION}-ubuntu20.04-amd64.deb && apt install -y ./rok4-server.deb - -# Configuration par variables d'environnement par défaut -ENV IMPORT_LAYERS_FROM_PYRAMIDS="" -ENV SERVER_LOGLEVEL="error" SERVER_LOGOUTPUT="standard_output_stream_for_errors" SERVER_NBTHREAD="4" SERVER_CACHE_SIZE="1000" SERVER_CACHE_VALIDITY="10" SERVER_BACKLOG="0" -ENV SERVER_LAYERS="/etc/rok4/layers" SERVER_STYLES="/etc/rok4/styles" SERVER_TMS="/etc/rok4/tilematrixsets" -ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide WMS, WMTS and TMS raster and vector data broadcast" SERVICE_PROVIDERNAME="ROK4 Team" SERVICE_PROVIDERSITE="https://github.com/rok4/documentation" SERVICE_KEYWORDS="WMS,WMTS,TMS,Docker" -ENV SERVICE_FEE="none" SERVICE_ACCESSCONSTRAINT="none" -ENV SERVICE_WMS="WMS service" SERVICE_MAXWIDTH="10000" SERVICE_MAXHEIGHT="10000" SERVICE_LAYERLIMIT="2" SERVICE_MAXTILEX="256" SERVICE_MAXTILEY="256" SERVICE_FORMATLIST="image/jpeg,image/png,image/tiff,image/geotiff,image/x-bil;bits=32" -ENV SERVICE_GLOBALCRSLIST="CRS:84,EPSG:3857" SERVICE_FULLYSTYLING="true" SERVICE_INSPIRE="false" -ENV SERVICE_WMTSSUPPORT="true" SERVICE_TMSSUPPORT="true" SERVICE_WMSSUPPORT="true" -ENV SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" - -WORKDIR / - -# Déploiement des configurations -COPY ./server.template.json /etc/rok4/server.template.json -COPY ./services.template.json /etc/rok4/services.template.json - -COPY ./docker-entrypoint.sh / -RUN chmod +x /docker-entrypoint.sh - -RUN mkdir /etc/rok4/layers /pyramids - -VOLUME /etc/rok4/layers -VOLUME /pyramids - -EXPOSE 9000 - -ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["/usr/bin/rok4", "-f", "/etc/rok4/server.json"] diff --git a/build/server/debian12.Dockerfile b/build/server/debian12.Dockerfile deleted file mode 100644 index 46e20be..0000000 --- a/build/server/debian12.Dockerfile +++ /dev/null @@ -1,45 +0,0 @@ -FROM ubuntu:22.04 - -RUN apt update && apt -y install curl gettext - -ARG ROK4TILEMATRIXSETS_VERSION=4.0 -ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION -RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb - -ARG ROK4STYLES_VERSION=4.0 -ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION -RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles_${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb - -ARG ROK4SERVER_VERSION -ENV ROK4SERVER_VERSION=$ROK4SERVER_VERSION -RUN curl -L -o rok4-server.deb https://github.com/rok4/server/releases/download/${ROK4SERVER_VERSION}/rok4-server-${ROK4SERVER_VERSION}-ubuntu22.04-amd64.deb && apt install -y ./rok4-server.deb - -# Configuration par variables d'environnement par défaut -ENV IMPORT_LAYERS_FROM_PYRAMIDS="" -ENV SERVER_LOGLEVEL="error" SERVER_LOGOUTPUT="standard_output_stream_for_errors" SERVER_NBTHREAD="4" SERVER_CACHE_SIZE="1000" SERVER_CACHE_VALIDITY="10" SERVER_BACKLOG="0" -ENV SERVER_LAYERS="/etc/rok4/layers" SERVER_STYLES="/etc/rok4/styles" SERVER_TMS="/etc/rok4/tilematrixsets" -ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide WMS, WMTS and TMS raster and vector data broadcast" SERVICE_PROVIDERNAME="ROK4 Team" SERVICE_PROVIDERSITE="https://github.com/rok4/documentation" SERVICE_KEYWORDS="WMS,WMTS,TMS,Docker" -ENV SERVICE_FEE="none" SERVICE_ACCESSCONSTRAINT="none" -ENV SERVICE_WMS="WMS service" SERVICE_MAXWIDTH="10000" SERVICE_MAXHEIGHT="10000" SERVICE_LAYERLIMIT="2" SERVICE_MAXTILEX="256" SERVICE_MAXTILEY="256" SERVICE_FORMATLIST="image/jpeg,image/png,image/tiff,image/geotiff,image/x-bil;bits=32" -ENV SERVICE_GLOBALCRSLIST="CRS:84,EPSG:3857" SERVICE_FULLYSTYLING="true" SERVICE_INSPIRE="false" -ENV SERVICE_WMTSSUPPORT="true" SERVICE_TMSSUPPORT="true" SERVICE_WMSSUPPORT="true" -ENV SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" - -WORKDIR / - -# Déploiement des configurations -COPY ./server.template.json /etc/rok4/server.template.json -COPY ./services.template.json /etc/rok4/services.template.json - -COPY ./docker-entrypoint.sh / -RUN chmod +x /docker-entrypoint.sh - -RUN mkdir /etc/rok4/layers /pyramids - -VOLUME /etc/rok4/layers -VOLUME /pyramids - -EXPOSE 9000 - -ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["/usr/bin/rok4", "-f", "/etc/rok4/server.json"] diff --git a/build/server/ubuntu-2004.Dockerfile b/build/server/ubuntu-2004.Dockerfile index 0c29496..36aa777 100644 --- a/build/server/ubuntu-2004.Dockerfile +++ b/build/server/ubuntu-2004.Dockerfile @@ -2,11 +2,11 @@ FROM ubuntu:20.04 RUN apt update && apt -y install curl gettext -ARG ROK4TILEMATRIXSETS_VERSION=4.0 +ARG ROK4TILEMATRIXSETS_VERSION=4.1 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb -ARG ROK4STYLES_VERSION=4.0 +ARG ROK4STYLES_VERSION=4.1 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb diff --git a/build/server/ubuntu-2204.Dockerfile b/build/server/ubuntu-2204.Dockerfile index f687335..01c1a19 100644 --- a/build/server/ubuntu-2204.Dockerfile +++ b/build/server/ubuntu-2204.Dockerfile @@ -2,11 +2,11 @@ FROM ubuntu:22.04 RUN apt update && apt -y install curl gettext -ARG ROK4TILEMATRIXSETS_VERSION=4.0 +ARG ROK4TILEMATRIXSETS_VERSION=4.1 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb -ARG ROK4STYLES_VERSION=4.0 +ARG ROK4STYLES_VERSION=4.1 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb diff --git a/build/tools/debian11.Dockerfile b/build/tools/debian11.Dockerfile index ed080b4..38bd219 100644 --- a/build/tools/debian11.Dockerfile +++ b/build/tools/debian11.Dockerfile @@ -2,10 +2,10 @@ FROM ubuntu:20.04 RUN apt update && apt -y install curl procps wget gdal-bin -ARG ROK4TILEMATRIXSETS_VERSION=4.0 +ARG ROK4TILEMATRIXSETS_VERSION=4.1 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb -ENV ROK4_TMS_DIRECTORY=/etc/rok4/tilematrixsets +ENV ROK4_TMS_DIRECTORY=/usr/share/rok4/tilematrixsets ARG ROK4COREPERL_VERSION ENV ROK4COREPERL_VERSION=$ROK4COREPERL_VERSION From 9969770974c888e77dd2294e4fb27d6fe1d8720f Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Fri, 29 Sep 2023 11:34:18 +0200 Subject: [PATCH 06/18] =?UTF-8?q?Installation=20de=20la=20d=C3=A9pendance?= =?UTF-8?q?=20perl=20=C3=A0=20Net::Amazon::S3::Vendor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/fullgeneration/debian11.Dockerfile | 3 +++ build/pregeneration/debian11.Dockerfile | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/build/fullgeneration/debian11.Dockerfile b/build/fullgeneration/debian11.Dockerfile index 5a302da..cf2db20 100644 --- a/build/fullgeneration/debian11.Dockerfile +++ b/build/fullgeneration/debian11.Dockerfile @@ -23,6 +23,9 @@ ARG ROK4COREPERL_VERSION ENV ROK4COREPERL_VERSION=$ROK4COREPERL_VERSION RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu-20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb +COPY libnet-amazon-s3-perl_0.991-1_all.deb /libnet-amazon-s3-perl_0.991-1_all.deb +RUN curl -L -o libnet-amazon-s3-perl_0.991-1_all.deb http://snapshot.debian.org/archive/debian/20220718T213229Z/pool/main/libn/libnet-amazon-s3-perl/libnet-amazon-s3-perl_0.991-1_all.deb && apt install -y ./libnet-amazon-s3-perl_0.991-1_all.deb && rm ./libnet-amazon-s3-perl_0.991-1_all.deb + ARG ROK4PREGENERATION_VERSION ENV ROK4PREGENERATION_VERSION=$ROK4PREGENERATION_VERSION RUN curl -L -o rok4-pregeneration.deb https://github.com/rok4/pregeneration/releases/download/${ROK4PREGENERATION_VERSION}/rok4-pregeneration-${ROK4PREGENERATION_VERSION}-ubuntu-20.04-all.deb && apt install -y ./rok4-pregeneration.deb diff --git a/build/pregeneration/debian11.Dockerfile b/build/pregeneration/debian11.Dockerfile index c61ac6f..193ea56 100644 --- a/build/pregeneration/debian11.Dockerfile +++ b/build/pregeneration/debian11.Dockerfile @@ -4,15 +4,18 @@ RUN apt update && apt -y install curl procps wget gdal-bin ARG ROK4TILEMATRIXSETS_VERSION=4.1 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION -RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb +RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb && rm ./rok4-tilematrixsets.deb ENV ROK4_TMS_DIRECTORY=/usr/share/rok4/tilematrixsets ARG ROK4COREPERL_VERSION ENV ROK4COREPERL_VERSION=$ROK4COREPERL_VERSION -RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu-20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb +RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu-20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb && rm ./librok4-core-perl.deb + +COPY libnet-amazon-s3-perl_0.991-1_all.deb /libnet-amazon-s3-perl_0.991-1_all.deb +RUN curl -L -o libnet-amazon-s3-perl_0.991-1_all.deb http://snapshot.debian.org/archive/debian/20220718T213229Z/pool/main/libn/libnet-amazon-s3-perl/libnet-amazon-s3-perl_0.991-1_all.deb && apt install -y ./libnet-amazon-s3-perl_0.991-1_all.deb && rm ./libnet-amazon-s3-perl_0.991-1_all.deb ARG ROK4PREGENERATION_VERSION ENV ROK4PREGENERATION_VERSION=$ROK4PREGENERATION_VERSION -RUN curl -L -o rok4-pregeneration.deb https://github.com/rok4/pregeneration/releases/download/${ROK4PREGENERATION_VERSION}/rok4-pregeneration-${ROK4PREGENERATION_VERSION}-ubuntu-20.04-all.deb && apt install -y ./rok4-pregeneration.deb +RUN curl -L -o rok4-pregeneration.deb https://github.com/rok4/pregeneration/releases/download/${ROK4PREGENERATION_VERSION}/rok4-pregeneration-${ROK4PREGENERATION_VERSION}-ubuntu-20.04-all.deb && apt install -y ./rok4-pregeneration.deb && rm ./rok4-pregeneration.deb CMD echo "ROK4:\n\t- pregeneration: $ROK4PREGENERATION_VERSION\n\t- core Perl: $ROK4COREPERL_VERSION\n\t- tile matrix sets: $ROK4TILEMATRIXSETS_VERSION" From e8905330d858bae59251d8668bdb2f53489bbc2b Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Fri, 29 Sep 2023 11:38:36 +0200 Subject: [PATCH 07/18] =?UTF-8?q?Passage=20des=20TMS=20en=204.2=20par=20d?= =?UTF-8?q?=C3=A9faut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fullgeneration-docker.yaml | 2 +- .github/workflows/pregeneration-docker.yaml | 2 +- .github/workflows/server-docker.yaml | 2 +- .github/workflows/tools-docker.yaml | 2 +- build/fullgeneration/debian11.Dockerfile | 1 - build/pregeneration/debian11.Dockerfile | 1 - 6 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/fullgeneration-docker.yaml b/.github/workflows/fullgeneration-docker.yaml index 94bd895..d9df176 100644 --- a/.github/workflows/fullgeneration-docker.yaml +++ b/.github/workflows/fullgeneration-docker.yaml @@ -24,7 +24,7 @@ on: tilematrixsets_tag: description: 'Tile matrix sets tagged version' required: true - default: '4.1' + default: '4.2' styles_tag: description: 'Styles tagged version' required: true diff --git a/.github/workflows/pregeneration-docker.yaml b/.github/workflows/pregeneration-docker.yaml index 1098213..25715ce 100644 --- a/.github/workflows/pregeneration-docker.yaml +++ b/.github/workflows/pregeneration-docker.yaml @@ -12,7 +12,7 @@ on: tilematrixsets_tag: description: 'Tile matrix sets tagged version' required: true - default: '4.1' + default: '4.2' jobs: push_to_registry: diff --git a/.github/workflows/server-docker.yaml b/.github/workflows/server-docker.yaml index 2eaed4d..be35fd8 100644 --- a/.github/workflows/server-docker.yaml +++ b/.github/workflows/server-docker.yaml @@ -16,7 +16,7 @@ on: tilematrixsets_tag: description: 'Tile matrix sets version' required: true - default: '4.1' + default: '4.2' jobs: push_to_registry: diff --git a/.github/workflows/tools-docker.yaml b/.github/workflows/tools-docker.yaml index cdefb54..5a841a7 100644 --- a/.github/workflows/tools-docker.yaml +++ b/.github/workflows/tools-docker.yaml @@ -12,7 +12,7 @@ on: tilematrixsets_tag: description: 'Tile matrix sets tagged version' required: true - default: '4.1' + default: '4.2' jobs: push_to_registry: diff --git a/build/fullgeneration/debian11.Dockerfile b/build/fullgeneration/debian11.Dockerfile index cf2db20..f5a5b26 100644 --- a/build/fullgeneration/debian11.Dockerfile +++ b/build/fullgeneration/debian11.Dockerfile @@ -23,7 +23,6 @@ ARG ROK4COREPERL_VERSION ENV ROK4COREPERL_VERSION=$ROK4COREPERL_VERSION RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu-20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb -COPY libnet-amazon-s3-perl_0.991-1_all.deb /libnet-amazon-s3-perl_0.991-1_all.deb RUN curl -L -o libnet-amazon-s3-perl_0.991-1_all.deb http://snapshot.debian.org/archive/debian/20220718T213229Z/pool/main/libn/libnet-amazon-s3-perl/libnet-amazon-s3-perl_0.991-1_all.deb && apt install -y ./libnet-amazon-s3-perl_0.991-1_all.deb && rm ./libnet-amazon-s3-perl_0.991-1_all.deb ARG ROK4PREGENERATION_VERSION diff --git a/build/pregeneration/debian11.Dockerfile b/build/pregeneration/debian11.Dockerfile index 193ea56..e8fb982 100644 --- a/build/pregeneration/debian11.Dockerfile +++ b/build/pregeneration/debian11.Dockerfile @@ -11,7 +11,6 @@ ARG ROK4COREPERL_VERSION ENV ROK4COREPERL_VERSION=$ROK4COREPERL_VERSION RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu-20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb && rm ./librok4-core-perl.deb -COPY libnet-amazon-s3-perl_0.991-1_all.deb /libnet-amazon-s3-perl_0.991-1_all.deb RUN curl -L -o libnet-amazon-s3-perl_0.991-1_all.deb http://snapshot.debian.org/archive/debian/20220718T213229Z/pool/main/libn/libnet-amazon-s3-perl/libnet-amazon-s3-perl_0.991-1_all.deb && apt install -y ./libnet-amazon-s3-perl_0.991-1_all.deb && rm ./libnet-amazon-s3-perl_0.991-1_all.deb ARG ROK4PREGENERATION_VERSION From ea148c4843800c2776516a4969750c18e1b55410 Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Mon, 2 Oct 2023 21:24:54 +0200 Subject: [PATCH 08/18] Ajout de la configuration de l'API Tiles sur le serveur --- build/server/services.template.json | 4 ++++ build/server/ubuntu-2004.Dockerfile | 4 ++-- build/server/ubuntu-2204.Dockerfile | 4 ++-- run/server/README.md | 8 ++++++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/build/server/services.template.json b/build/server/services.template.json index 68cb82e..640e089 100644 --- a/build/server/services.template.json +++ b/build/server/services.template.json @@ -67,5 +67,9 @@ "tms": { "active": ${SERVICE_TMSSUPPORT}, "endpoint_uri": "${SERVICE_TMS_ENDPOINT}" + }, + "ogctiles": { + "active": ${SERVICE_OGCTILESSUPPORT}, + "endpoint_uri": "${SERVICE_OGCTILES_ENDPOINT}" } } \ No newline at end of file diff --git a/build/server/ubuntu-2004.Dockerfile b/build/server/ubuntu-2004.Dockerfile index 36aa777..dacf876 100644 --- a/build/server/ubuntu-2004.Dockerfile +++ b/build/server/ubuntu-2004.Dockerfile @@ -26,8 +26,8 @@ ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide W ENV SERVICE_FEE="none" SERVICE_ACCESSCONSTRAINT="none" ENV SERVICE_WMS="WMS service" SERVICE_MAXWIDTH="10000" SERVICE_MAXHEIGHT="10000" SERVICE_LAYERLIMIT="2" SERVICE_MAXTILEX="256" SERVICE_MAXTILEY="256" SERVICE_FORMATLIST="image/jpeg,image/png,image/tiff,image/geotiff,image/x-bil;bits=32" ENV SERVICE_GLOBALCRSLIST="CRS:84,EPSG:3857" SERVICE_FULLYSTYLING="true" SERVICE_INSPIRE="false" -ENV SERVICE_WMTSSUPPORT="true" SERVICE_TMSSUPPORT="true" SERVICE_WMSSUPPORT="true" -ENV SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" +ENV SERVICE_WMTSSUPPORT="true" SERVICE_TMSSUPPORT="true" SERVICE_WMSSUPPORT="true" SERVICE_OGCTILESSUPPORT="true" +ENV SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" SERVICE_OGCTILES_ENDPOINT="http://localhost/ogcapitiles" WORKDIR / diff --git a/build/server/ubuntu-2204.Dockerfile b/build/server/ubuntu-2204.Dockerfile index 01c1a19..1aafe9d 100644 --- a/build/server/ubuntu-2204.Dockerfile +++ b/build/server/ubuntu-2204.Dockerfile @@ -26,8 +26,8 @@ ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide W ENV SERVICE_FEE="none" SERVICE_ACCESSCONSTRAINT="none" ENV SERVICE_WMS="WMS service" SERVICE_MAXWIDTH="10000" SERVICE_MAXHEIGHT="10000" SERVICE_LAYERLIMIT="2" SERVICE_MAXTILEX="256" SERVICE_MAXTILEY="256" SERVICE_FORMATLIST="image/jpeg,image/png,image/tiff,image/geotiff,image/x-bil;bits=32" ENV SERVICE_GLOBALCRSLIST="CRS:84,EPSG:3857" SERVICE_FULLYSTYLING="true" SERVICE_INSPIRE="false" -ENV SERVICE_WMTSSUPPORT="true" SERVICE_TMSSUPPORT="true" SERVICE_WMSSUPPORT="true" -ENV SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" +ENV SERVICE_WMTSSUPPORT="true" SERVICE_TMSSUPPORT="true" SERVICE_WMSSUPPORT="true" SERVICE_OGCTILESSUPPORT="true" +ENV SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" SERVICE_OGCTILES_ENDPOINT="http://localhost/ogcapitiles" WORKDIR / diff --git a/run/server/README.md b/run/server/README.md index 67f48d6..eae4180 100644 --- a/run/server/README.md +++ b/run/server/README.md @@ -70,9 +70,11 @@ Liste des variables d'environnement injectées dans les fichiers de configuratio * SERVICE_WMTSSUPPORT (`true`) * SERVICE_TMSSUPPORT (`true`) * SERVICE_WMSSUPPORT (`true`) + * SERVICE_OGCTILESSUPPORT (`true`) * SERVICE_WMTS_ENDPOINT (`http://localhost/wmts`) * SERVICE_TMS_ENDPOINT (`http://localhost/tms`) * SERVICE_WMS_ENDPOINT (`http://localhost/wms`) + * SERVICE_OGCTILES_ENDPOINT (`http://localhost/ogcapitiles`) Il est possible de surcharger chacune de ces valeurs de configuration via des variables d'environnement. Exemple : @@ -171,11 +173,12 @@ Cette stack comprend : * Un serveur ROK4 * Des jeux de données, disponible sous forme d'[images](https://hub.docker.com/r/rok4/dataset) -Les capacités des 3 services rendus (WMS, WMTS et TMS) sont disponibles aux URL : +Les capacités des 4 services rendus (WMS, WMTS, OGC API Tiles et TMS) sont disponibles aux URL : * WMS : http://localhost/wms?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0 * WMTS : http://localhost/wmts?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0 * TMS : http://localhost/tms/1.0.0 +* OGC API Tiles : http://localhost/ogcapitiles/collections * Routes de santé (à partir de la version `4.1.0`) : * http://localhost/healthcheck * http://localhost/healthcheck/info @@ -252,11 +255,12 @@ Cette stack comprend : Cette centralisation du stockage permet plus facilement de déployer plusieurs middle : `docker-compose -f docker-compose.yaml up --scale middle=2` -Les capacités des 3 services rendus (WMS, WMTS et TMS) sont disponibles aux URL : +Les capacités des 4 services rendus (WMS, WMTS, OGC API Tiles et TMS) sont disponibles aux URL : * WMS : http://localhost/wms?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0 * WMTS : http://localhost/wmts?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0 * TMS : http://localhost/tms/1.0.0 +* OGC API Tiles : http://localhost/ogcapitiles/collections * Routes de santé : * http://localhost/healthcheck * http://localhost/healthcheck/info From b3a09bc6d211df13ff34ac277a095ccd7b1e322d Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Thu, 12 Oct 2023 09:43:20 +0200 Subject: [PATCH 09/18] Correction de l'URL de la lib perl amazon s3 --- build/fullgeneration/debian11.Dockerfile | 4 ++-- build/generation/debian11.Dockerfile | 2 +- build/generation/debian12.Dockerfile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/fullgeneration/debian11.Dockerfile b/build/fullgeneration/debian11.Dockerfile index f5a5b26..bbeaec3 100644 --- a/build/fullgeneration/debian11.Dockerfile +++ b/build/fullgeneration/debian11.Dockerfile @@ -23,7 +23,7 @@ ARG ROK4COREPERL_VERSION ENV ROK4COREPERL_VERSION=$ROK4COREPERL_VERSION RUN curl -L -o librok4-core-perl.deb https://github.com/rok4/core-perl/releases/download/${ROK4COREPERL_VERSION}/librok4-core-perl-${ROK4COREPERL_VERSION}-ubuntu-20.04-all.deb && DEBIAN_FRONTEND=noninteractive apt install -y ./librok4-core-perl.deb -RUN curl -L -o libnet-amazon-s3-perl_0.991-1_all.deb http://snapshot.debian.org/archive/debian/20220718T213229Z/pool/main/libn/libnet-amazon-s3-perl/libnet-amazon-s3-perl_0.991-1_all.deb && apt install -y ./libnet-amazon-s3-perl_0.991-1_all.deb && rm ./libnet-amazon-s3-perl_0.991-1_all.deb +RUN curl -L -o libnet-amazon-s3-perl_0.991-1_all.deb http://archive.ubuntu.com/ubuntu/pool/universe/libn/libnet-amazon-s3-perl/libnet-amazon-s3-perl_0.991-1_all.deb && apt install -y ./libnet-amazon-s3-perl_0.991-1_all.deb && rm ./libnet-amazon-s3-perl_0.991-1_all.deb ARG ROK4PREGENERATION_VERSION ENV ROK4PREGENERATION_VERSION=$ROK4PREGENERATION_VERSION @@ -36,4 +36,4 @@ RUN curl -L -o rok4-tools.deb https://github.com/rok4/tools/releases/download/$ COPY --from=metacollin/tippecanoe:latest /usr/local/bin/tippecanoe /usr/bin/tippecanoe ENV TIPPECANOE_VERSION=v1.36.0 -CMD echo "ROK4:\n\t- generation: $ROK4GENERATION_VERSION\n\t- pregeneration: $ROK4PREGENERATION_VERSION\n\t- tools: $ROK4TOOLS_VERSION\n\t- core Perl: $ROK4COREPERL_VERSION\n\t- styles: $ROK4STYLES_VERSION\n\t- tile matrix sets: $ROK4TILEMATRIXSETS_VERSION\nTippecanoe: $TIPPECANOE_VERSION" +CMD echo "ROK4:\n\t- generation: $ROK4GENERATION_VERSION\n\t- pregeneration: $ROK4PREGENERATION_VERSION\n\t- tools: $ROK4TOOLS_VERSION\n\t- core C++: $ROK4CORECPP_VERSION\n\t- core Perl: $ROK4COREPERL_VERSION\n\t- styles: $ROK4STYLES_VERSION\n\t- tile matrix sets: $ROK4TILEMATRIXSETS_VERSION\nTippecanoe: $TIPPECANOE_VERSION" diff --git a/build/generation/debian11.Dockerfile b/build/generation/debian11.Dockerfile index 107c145..ca457da 100644 --- a/build/generation/debian11.Dockerfile +++ b/build/generation/debian11.Dockerfile @@ -17,4 +17,4 @@ RUN curl -L -o rok4-generation.deb https://github.com/rok4/generation/releases/ COPY --from=metacollin/tippecanoe:latest /usr/local/bin/tippecanoe /usr/bin/tippecanoe ENV TIPPECANOE_VERSION=v1.36.0 -CMD echo "ROK4:\n\t- generation: $ROK4GENERATION_VERSION\n\t- styles: $ROK4STYLES_VERSION\nTippecanoe: $TIPPECANOE_VERSION" +CMD echo "ROK4:\n\t- generation: $ROK4GENERATION_VERSION- core C++: $ROK4CORECPP_VERSION\n\t\n\t- styles: $ROK4STYLES_VERSION\nTippecanoe: $TIPPECANOE_VERSION" diff --git a/build/generation/debian12.Dockerfile b/build/generation/debian12.Dockerfile index c8d776c..1c82d63 100644 --- a/build/generation/debian12.Dockerfile +++ b/build/generation/debian12.Dockerfile @@ -17,4 +17,4 @@ RUN curl -L -o rok4-generation.deb https://github.com/rok4/generation/releases/ COPY --from=metacollin/tippecanoe:latest /usr/local/bin/tippecanoe /usr/bin/tippecanoe ENV TIPPECANOE_VERSION=v1.36.0 -CMD echo "ROK4:\n\t- generation: $ROK4GENERATION_VERSION\n\t- styles: $ROK4STYLES_VERSION\nTippecanoe: $TIPPECANOE_VERSION" +CMD echo "ROK4:\n\t- generation: $ROK4GENERATION_VERSION- core C++: $ROK4CORECPP_VERSION\n\t\n\t- styles: $ROK4STYLES_VERSION\nTippecanoe: $TIPPECANOE_VERSION" From c028389a7df002a984debf79b158dab8a4e6b35c Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Mon, 29 Jan 2024 08:54:14 +0100 Subject: [PATCH 10/18] Ajout d'une image du serveur avec valgrind --- build/server/ubuntu-2004-valgrind.Dockerfile | 51 ++++++++++++++++++++ run/server/docker-compose-s3.yaml | 4 +- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 build/server/ubuntu-2004-valgrind.Dockerfile diff --git a/build/server/ubuntu-2004-valgrind.Dockerfile b/build/server/ubuntu-2004-valgrind.Dockerfile new file mode 100644 index 0000000..eada395 --- /dev/null +++ b/build/server/ubuntu-2004-valgrind.Dockerfile @@ -0,0 +1,51 @@ +FROM ubuntu:20.04 + +RUN apt update && apt -y install curl gettext + +ARG ROK4TILEMATRIXSETS_VERSION=4.1 +ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION +RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb + +ARG ROK4STYLES_VERSION=4.1 +ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION +RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb + +ARG ROK4CORECPP_VERSION +ENV ROK4CORECPP_VERSION=$ROK4CORECPP_VERSION +RUN curl -L -o librok4-dev.deb https://github.com/rok4/core-cpp/releases/download/${ROK4CORECPP_VERSION}/librok4-ceph-${ROK4CORECPP_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./librok4-dev.deb + +ARG ROK4SERVER_VERSION +ENV ROK4SERVER_VERSION=$ROK4SERVER_VERSION +RUN curl -L -o rok4-server.deb https://github.com/rok4/server/releases/download/${ROK4SERVER_VERSION}/rok4-server-${ROK4SERVER_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./rok4-server.deb + +# Configuration par variables d'environnement par défaut +ENV IMPORT_LAYERS_FROM_PYRAMIDS="" +ENV SERVER_LOGLEVEL="debug" SERVER_LOGOUTPUT="standard_output" SERVER_NBTHREAD="4" SERVER_CACHE_SIZE="1000" SERVER_CACHE_VALIDITY="10" SERVER_BACKLOG="0" +ENV SERVER_LAYERS="/etc/rok4/layers.txt" SERVER_STYLES="/usr/share/rok4/styles" SERVER_TMS="/usr/share/rok4/tilematrixsets" +ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide WMS, WMTS and TMS raster and vector data broadcast" SERVICE_PROVIDERNAME="ROK4 Team" SERVICE_PROVIDERSITE="https://github.com/rok4/documentation" SERVICE_KEYWORDS="WMS,WMTS,TMS,Docker" +ENV SERVICE_FEE="none" SERVICE_ACCESSCONSTRAINT="none" +ENV SERVICE_WMS="WMS service" SERVICE_MAXWIDTH="10000" SERVICE_MAXHEIGHT="10000" SERVICE_LAYERLIMIT="2" SERVICE_MAXTILEX="256" SERVICE_MAXTILEY="256" SERVICE_FORMATLIST="image/jpeg,image/png,image/tiff,image/geotiff,image/x-bil;bits=32" +ENV SERVICE_GLOBALCRSLIST="CRS:84,EPSG:3857" SERVICE_FULLYSTYLING="true" SERVICE_INSPIRE="false" +ENV SERVICE_WMTSSUPPORT="true" SERVICE_TMSSUPPORT="true" SERVICE_WMSSUPPORT="true" SERVICE_OGCTILESSUPPORT="true" +ENV SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" SERVICE_OGCTILES_ENDPOINT="http://localhost/ogcapitiles" + +WORKDIR / + +# Déploiement des configurations +COPY ./server.template.json /etc/rok4/server.template.json +COPY ./services.template.json /etc/rok4/services.template.json + +COPY ./docker-entrypoint.sh / +RUN chmod +x /docker-entrypoint.sh + +RUN mkdir /etc/rok4/layers /pyramids + +RUN apt -y install valgrind + +VOLUME /etc/rok4/layers +VOLUME /pyramids + +EXPOSE 9000 + +ENTRYPOINT ["/docker-entrypoint.sh"] +CMD ["valgrind", "--leak-check=full", "/usr/bin/rok4", "-f", "/etc/rok4/server.json"] diff --git a/run/server/docker-compose-s3.yaml b/run/server/docker-compose-s3.yaml index aa9dbd9..ddc843a 100644 --- a/run/server/docker-compose-s3.yaml +++ b/run/server/docker-compose-s3.yaml @@ -13,7 +13,7 @@ services: - ./viewer:/usr/share/nginx/html/viewer middle: - image: rok4/server:5.0.4 + image: rok4/server:5.3.0 depends_on: - storage environment: @@ -29,6 +29,8 @@ services: - SERVER_LAYERS=s3://layers/list.txt - SERVER_STYLES=s3://styles - SERVER_TMS=s3://tilematrixsets + - SERVER_CACHE_VALIDITY=1 + - SERVER_CACHE_SIZE=1 storage: image: rok4/dataset:minio From f748bdb6e390a060ba4184df9765726900995978 Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Mon, 22 Apr 2024 15:26:40 +0200 Subject: [PATCH 11/18] =?UTF-8?q?Passage=20=C3=A0=20la=20version=204.3=20d?= =?UTF-8?q?es=20TMS=20par=20d=C3=A9faut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fullgeneration-docker.yaml | 2 +- .github/workflows/pregeneration-docker.yaml | 2 +- .github/workflows/server-docker.yaml | 2 +- .github/workflows/tools-docker.yaml | 2 +- build/fullgeneration/debian11.Dockerfile | 2 +- build/pregeneration/debian11.Dockerfile | 2 +- build/pregeneration/debian12.Dockerfile | 2 +- build/pytools/debian11.Dockerfile | 9 ++++++--- build/server/ubuntu-2004-valgrind.Dockerfile | 2 +- build/server/ubuntu-2004.Dockerfile | 2 +- build/server/ubuntu-2204.Dockerfile | 2 +- build/tools/debian11.Dockerfile | 2 +- 12 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/fullgeneration-docker.yaml b/.github/workflows/fullgeneration-docker.yaml index d9df176..9e11206 100644 --- a/.github/workflows/fullgeneration-docker.yaml +++ b/.github/workflows/fullgeneration-docker.yaml @@ -24,7 +24,7 @@ on: tilematrixsets_tag: description: 'Tile matrix sets tagged version' required: true - default: '4.2' + default: '4.3' styles_tag: description: 'Styles tagged version' required: true diff --git a/.github/workflows/pregeneration-docker.yaml b/.github/workflows/pregeneration-docker.yaml index 25715ce..8c6ebfc 100644 --- a/.github/workflows/pregeneration-docker.yaml +++ b/.github/workflows/pregeneration-docker.yaml @@ -12,7 +12,7 @@ on: tilematrixsets_tag: description: 'Tile matrix sets tagged version' required: true - default: '4.2' + default: '4.3' jobs: push_to_registry: diff --git a/.github/workflows/server-docker.yaml b/.github/workflows/server-docker.yaml index be35fd8..b8c8537 100644 --- a/.github/workflows/server-docker.yaml +++ b/.github/workflows/server-docker.yaml @@ -16,7 +16,7 @@ on: tilematrixsets_tag: description: 'Tile matrix sets version' required: true - default: '4.2' + default: '4.3' jobs: push_to_registry: diff --git a/.github/workflows/tools-docker.yaml b/.github/workflows/tools-docker.yaml index 5a841a7..e5a24fb 100644 --- a/.github/workflows/tools-docker.yaml +++ b/.github/workflows/tools-docker.yaml @@ -12,7 +12,7 @@ on: tilematrixsets_tag: description: 'Tile matrix sets tagged version' required: true - default: '4.2' + default: '4.3' jobs: push_to_registry: diff --git a/build/fullgeneration/debian11.Dockerfile b/build/fullgeneration/debian11.Dockerfile index bbeaec3..885ac8a 100644 --- a/build/fullgeneration/debian11.Dockerfile +++ b/build/fullgeneration/debian11.Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:20.04 RUN apt update && apt -y install curl procps wget gdal-bin -ARG ROK4TILEMATRIXSETS_VERSION=4.1 +ARG ROK4TILEMATRIXSETS_VERSION=4.3 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb ENV ROK4_TMS_DIRECTORY=/usr/share/rok4/tilematrixsets diff --git a/build/pregeneration/debian11.Dockerfile b/build/pregeneration/debian11.Dockerfile index e8fb982..40a26ed 100644 --- a/build/pregeneration/debian11.Dockerfile +++ b/build/pregeneration/debian11.Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:20.04 RUN apt update && apt -y install curl procps wget gdal-bin -ARG ROK4TILEMATRIXSETS_VERSION=4.1 +ARG ROK4TILEMATRIXSETS_VERSION=4.3 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb && rm ./rok4-tilematrixsets.deb ENV ROK4_TMS_DIRECTORY=/usr/share/rok4/tilematrixsets diff --git a/build/pregeneration/debian12.Dockerfile b/build/pregeneration/debian12.Dockerfile index 333f0f1..4eed339 100644 --- a/build/pregeneration/debian12.Dockerfile +++ b/build/pregeneration/debian12.Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:22.04 RUN apt update && apt -y install curl procps wget gdal-bin -ARG ROK4TILEMATRIXSETS_VERSION=4.1 +ARG ROK4TILEMATRIXSETS_VERSION=4.3 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb ENV ROK4_TMS_DIRECTORY=/usr/share/rok4/tilematrixsets diff --git a/build/pytools/debian11.Dockerfile b/build/pytools/debian11.Dockerfile index 3cc99f6..04a2fc3 100644 --- a/build/pytools/debian11.Dockerfile +++ b/build/pytools/debian11.Dockerfile @@ -2,14 +2,17 @@ FROM python:3.10-slim-bullseye RUN apt update && apt -y install python3-gdal python3-rados curl -ARG ROK4TILEMATRIXSETS_VERSION=4.1 +ARG ROK4TILEMATRIXSETS_VERSION=4.3 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb ENV ROK4_TMS_DIRECTORY=/usr/share/rok4/tilematrixsets ARG ROK4PYTOOLS_VERSION ENV ROK4PYTOOLS_VERSION=$ROK4PYTOOLS_VERSION -RUN pip install rok4-tools==$ROK4PYTOOLS_VERSION && pip install numpy --upgrade -RUN echo "/usr/lib/python3/dist-packages/" >/usr/local/lib/python3.10/site-packages/system.pth + +WORKDIR /home +RUN python3 -m venv .venv && . .venv/bin/activate && pip install rok4-tools==$ROK4PYTOOLS_VERSION +# RUN pip install rok4-tools==$ROK4PYTOOLS_VERSION +RUN echo "/usr/lib/python3/dist-packages/" >>.venv/lib/python3.10/site-packages/system.pth CMD echo "ROK4:\n\t- pytools: $ROK4PYTOOLS_VERSION\n\t- tile matrix sets: $ROK4TILEMATRIXSETS_VERSION" diff --git a/build/server/ubuntu-2004-valgrind.Dockerfile b/build/server/ubuntu-2004-valgrind.Dockerfile index eada395..d4f0167 100644 --- a/build/server/ubuntu-2004-valgrind.Dockerfile +++ b/build/server/ubuntu-2004-valgrind.Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:20.04 RUN apt update && apt -y install curl gettext -ARG ROK4TILEMATRIXSETS_VERSION=4.1 +ARG ROK4TILEMATRIXSETS_VERSION=4.3 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb diff --git a/build/server/ubuntu-2004.Dockerfile b/build/server/ubuntu-2004.Dockerfile index dacf876..dc20d41 100644 --- a/build/server/ubuntu-2004.Dockerfile +++ b/build/server/ubuntu-2004.Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:20.04 RUN apt update && apt -y install curl gettext -ARG ROK4TILEMATRIXSETS_VERSION=4.1 +ARG ROK4TILEMATRIXSETS_VERSION=4.3 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb diff --git a/build/server/ubuntu-2204.Dockerfile b/build/server/ubuntu-2204.Dockerfile index 1aafe9d..8a941d7 100644 --- a/build/server/ubuntu-2204.Dockerfile +++ b/build/server/ubuntu-2204.Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:22.04 RUN apt update && apt -y install curl gettext -ARG ROK4TILEMATRIXSETS_VERSION=4.1 +ARG ROK4TILEMATRIXSETS_VERSION=4.3 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb diff --git a/build/tools/debian11.Dockerfile b/build/tools/debian11.Dockerfile index 38bd219..cdaa3a7 100644 --- a/build/tools/debian11.Dockerfile +++ b/build/tools/debian11.Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:20.04 RUN apt update && apt -y install curl procps wget gdal-bin -ARG ROK4TILEMATRIXSETS_VERSION=4.1 +ARG ROK4TILEMATRIXSETS_VERSION=4.3 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb ENV ROK4_TMS_DIRECTORY=/usr/share/rok4/tilematrixsets From e89d076bece9c3245d1dc2c0958c06ceedbb3563 Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Tue, 30 Apr 2024 21:58:46 +0200 Subject: [PATCH 12/18] Mise en fonction de la compilation de l'image rok4/pytools --- .github/workflows/pytools-docker.yaml | 50 ++++++++++++++ build/fullgeneration/README.md | 2 +- build/generation/README.md | 2 +- build/pytools/README.md | 98 +++++++++++++++++++++++++++ build/pytools/debian11.Dockerfile | 7 +- run/server/README.md | 7 +- 6 files changed, 156 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/pytools-docker.yaml create mode 100644 build/pytools/README.md diff --git a/.github/workflows/pytools-docker.yaml b/.github/workflows/pytools-docker.yaml new file mode 100644 index 0000000..f02955a --- /dev/null +++ b/.github/workflows/pytools-docker.yaml @@ -0,0 +1,50 @@ +name: Build and publish python tools Docker image + +on: + workflow_dispatch: + inputs: + pytools_tag: + description: 'Python tools tagged version' + required: true + tilematrixsets_tag: + description: 'Tile matrix sets tagged version' + required: true + default: '4.3' + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and push Docker image + uses: docker/build-push-action@v3 + with: + context: build/pytools/ + push: true + file: build/pytools/debian11.Dockerfile + tags: | + rok4/pytools:${{ github.event.inputs.pytools_tag }} + build-args: | + ROK4TILEMATRIXSETS_VERSION=${{ github.event.inputs.tilematrixsets_tag }} + ROK4PYTOOLS_VERSION=${{ github.event.inputs.pytools_tag }} + + - name: Docker Hub Description + uses: peter-evans/dockerhub-description@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + repository: rok4/pytools + short-description: 'Outils python de gestion du projet ROK4 : conversions, calcul de statistiques...' + readme-filepath: build/pytools/README.md \ No newline at end of file diff --git a/build/fullgeneration/README.md b/build/fullgeneration/README.md index 7bf4036..95f21ab 100644 --- a/build/fullgeneration/README.md +++ b/build/fullgeneration/README.md @@ -3,7 +3,7 @@ Cette image contient tous les outils de traitement et de gestion des pyramides de données, c'est à dire : * les outil permettant d'écrire les scripts de génération ou de modification de pyramide ROK4 raster et vecteur. Ces outils font partie du projet, la documentation complète est disponible [ici](https://github.com/rok4/pregeneration), avec le code source. -* les outils permettant la manipulation des données images (reprojection, réechantillonnage, superposition...) ainsi que la mise au format final des données (écriture des dalles des pyramides ROK4). Ces outils font partie du projet, la documentation complète est disponible [ici](https://github.com/rok4/generation), avec le code source. +* les outils permettant la manipulation des données images (reprojection, réechantillonnage, superposition...) ainsi que la mise au format final des données (écriture des dalles des pyramides ROK4). Ces outils font partie du projet, la documentation complète est disponible [ici](https://rok4.github.io/generation). * les outils facilitant la gestion des pyramides (suppression, statistiques), la création de descripteur de couche par défaut, ainsi qu'un outil de conversion basé sur les TMS. Ces outils font partie du projet, la documentation complète est disponible [ici](https://github.com/rok4/tools), avec le code source. * l'outil [tippecanoe](https://github.com/mapbox/tippecanoe), permettant le calcul des tuiles vectorielles * la suite d'outil GDAL, permettant l'extraction des données vecteur diff --git a/build/generation/README.md b/build/generation/README.md index a7e76be..97f9117 100644 --- a/build/generation/README.md +++ b/build/generation/README.md @@ -2,7 +2,7 @@ Cette image contient tous les binaires permettant d'exécuter les scripts générés par les outils de pré-génération, c'est à dire : -* les outils permettant la manipulation des données images (reprojection, réechantillonnage, superposition...) ainsi que la mise au format final des données (écriture des dalles des pyramides ROK4). Ces outils font partie du projet, la documentation complète est disponible [ici](https://github.com/rok4/generation), avec le code source. +* les outils permettant la manipulation des données images (reprojection, réechantillonnage, superposition...) ainsi que la mise au format final des données (écriture des dalles des pyramides ROK4). Ces outils font partie du projet, la documentation complète est disponible [ici](https://rok4.github.io/generation). * l'outil [tippecanoe](https://github.com/mapbox/tippecanoe), permettant le calcul des tuiles vectorielles * la suite d'outil GDAL, permettant l'extraction des données vecteur diff --git a/build/pytools/README.md b/build/pytools/README.md new file mode 100644 index 0000000..6b3e5e4 --- /dev/null +++ b/build/pytools/README.md @@ -0,0 +1,98 @@ +# Outils python de gestion du projet ROK4 conteneurisés + +Cette suite d'outil facilite la gestion des pyramides (conversions, statistiques), la création de descripteur de couche par défaut, ainsi qu'un outil de conversion basé sur les TMS. + +La documentation complète est disponible [ici](https://rok4.github.io/pytools). + +## PYR2PYR + +PYR2PYR est un outil de copie d'une pyramide d'un stockage à un autre. Il est possible de filtrer les dalles transférée en précisant une taille limite sous laquelle les données ne sont pas recopiées. La copie des dalles est parallélisable. Si des signatures MD5 sont présente dans le fichier liste, elles sont contrôlées après recopie. + +Un exemple de configuration est affichable avec la commande `pyr2pyr --role example` et l'appel `pyr2pyr --role check --conf conf.json` permet de valider un fichier de configuration. Le fichier de configuration peut être un objet, auquel cas le chemin doit être préfixé par le type de stockage (exemple : `s3://bucket/configuration.json`) + +Exemple d'appel : + +```bash +docker run --rm \ + -e ROK4_S3_SECRETKEY=rok4S3storage \ + -e ROK4_S3_KEY=rok4 \ + -e ROK4_S3_URL=http://storage:9000 \ + -v ./input:/input + rok4/tools \ + rok4/pytools \ + pyr2pyr --role master --conf s3://configurations/pyr2pyr.json +``` + +Documentation complète de l'outil [ici](https://rok4.github.io/pytools/latest/#pyr2pyr). + +### JOINCACHE + +L'outil JOINCACHE génèrent une pyramide raster à partir d'autres pyramide raster compatibles (même TMS, dalles de même dimensions, canaux au même format). La composition se fait verticalement (choix des pyramides sources par niveau) et horizontalement (choix des pyramides source par zone au sein d'un niveau). + +Un exemple de configuration est affichable avec la commande `joincache --role example` et l'appel `joincache --role check --conf conf.json` permet de valider un fichier de configuration. Le fichier de configuration peut être un objet, auquel cas le chemin doit être préfixé par le type de stockage (exemple : `s3://bucket/configuration.json`) + +Exemple d'appel : + +```bash +docker run --rm \ + -e ROK4_S3_SECRETKEY=rok4S3storage \ + -e ROK4_S3_KEY=rok4 \ + -e ROK4_S3_URL=http://storage:9000 \ + rok4/pytools \ + joincache --role agent --split 1 --conf s3://configurations/joincache.json +``` + +Documentation complète de l'outil [ici](https://rok4.github.io/pytools/latest/#joincache). + +### MAKE-LAYER + +MAKE-LAYER est un outil générant un descripteur de couche compatible avec le serveur à partir des pyramides de données à utiliser + +Exemple d'appel : + +```bash +docker run --rm \ + -e ROK4_S3_SECRETKEY=rok4S3storage \ + -e ROK4_S3_KEY=rok4 \ + -e ROK4_S3_URL=http://storage:9000 \ + rok4/pytools \ + make-layer --pyramids s3://pyramids/data.json --name my_data --title "Titre de ma couche" --directory s3://layers/ +``` + +Documentation complète de l'outil [ici](https://rok4.github.io/pytools/latest/#make-layer). + +### PYROLYSE + +PYROLYSE est un outil d'analyse d'une pyramide, permettant d'avoir le nombre et la taille des dalles et tuiles, au global et par niveau. Les tailles des dalles et des tuiles ne sont pas toutes récupérées : un ratio permet de définir le nombre de mesures (un ratio de 100 entraînera la récupération de la taille d'une dalle sur 100 et d'une de ses tuile). Ce ratio s'applique par niveau (pour ne pas avoir que des données sur le meilleur niveau, celui qui contient le plus de dalles). Lorsque les statistiques sur les tuiles sont activées, on mesure le temps de lecture du header. + +Concernant les tailles et les temps d'accès, il est possible de demander le calcul des déciles plutôt que de garder toutes les valeurs. + +Exemple d'appel : + +```bash +docker run --rm \ + -e ROK4_S3_SECRETKEY=rok4S3storage \ + -e ROK4_S3_KEY=rok4 \ + -e ROK4_S3_URL=http://storage:9000 \ + -v $PWD/output:/output \ + rok4/pytools \ + pyrolyse --pyramid s3://pyramids/data.json --tiles --progress --ratio 10 --json /output/stats.json +``` + +Documentation complète de l'outil [ici](https://rok4.github.io/pytools/latest/#pyrolyse). + +### TMSIZER + +TMSIZER est un outil permettant de convertir des informations selon différents formats en accord avec un Tile Matrix Set en particulier. Les données en entrée peuvent être lues depuis un fichier, un objet ou l'entrée standard. Les données en sortie peuvent être écrites dans un fichier, un objet ou la sortie standard. + +Exemple d'appel : + +```bash +docker run --rm \ + -v $PWD/input:/input:ro \ + -v $PWD/output:/output \ + rok4/pytools \ + tmsizer -i /input/logs.txt --tms PM -io level=15 -if GETTILE_PARAMS -of HEATMAP -oo bbox=65000,6100000,665000,6500000 -oo dimensions=600x400 -o /output/heatmap.tif +``` + +Documentation complète de l'outil [ici](https://rok4.github.io/pytools/latest/#tmsizer). diff --git a/build/pytools/debian11.Dockerfile b/build/pytools/debian11.Dockerfile index 04a2fc3..66434a5 100644 --- a/build/pytools/debian11.Dockerfile +++ b/build/pytools/debian11.Dockerfile @@ -1,6 +1,6 @@ FROM python:3.10-slim-bullseye -RUN apt update && apt -y install python3-gdal python3-rados curl +RUN apt update && apt -y install gdal-bin libgdal-dev curl g++ ARG ROK4TILEMATRIXSETS_VERSION=4.3 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION @@ -11,8 +11,7 @@ ARG ROK4PYTOOLS_VERSION ENV ROK4PYTOOLS_VERSION=$ROK4PYTOOLS_VERSION WORKDIR /home -RUN python3 -m venv .venv && . .venv/bin/activate && pip install rok4-tools==$ROK4PYTOOLS_VERSION -# RUN pip install rok4-tools==$ROK4PYTOOLS_VERSION -RUN echo "/usr/lib/python3/dist-packages/" >>.venv/lib/python3.10/site-packages/system.pth +RUN pip install rok4-tools==$ROK4PYTOOLS_VERSION +RUN pip install GDAL=="$(gdal-config --version).*" && pip install gdal[numpy]=="$(gdal-config --version).*" CMD echo "ROK4:\n\t- pytools: $ROK4PYTOOLS_VERSION\n\t- tile matrix sets: $ROK4TILEMATRIXSETS_VERSION" diff --git a/run/server/README.md b/run/server/README.md index eae4180..e6fcef4 100644 --- a/run/server/README.md +++ b/run/server/README.md @@ -2,11 +2,10 @@ Le serveur permet la diffusion des données conditionnées sous forme de pyramide raster ou vecteur selon les protocoles Web Map Service, Web Map Tiled Service et Tile Map Service -La documentation complète est disponible [ici](https://github.com/rok4/server), avec le code source. +La documentation complète est disponible [ici](https://rok4.github.io/server). ## Lancement rapide - ### Version 4+ ``` @@ -16,7 +15,7 @@ docker run --publish 9000:9000 rok4/server:4.1.0 ### Version 5+ ``` -docker run --publish 9000:9000 -e SERVER_LOGOUTPUT=standard_output rok4/server:5.0.1 +docker run --publish 9000:9000 -e SERVER_LOGOUTPUT=standard_output rok4/server:5.5.0 ``` ## Configuration personnalisée @@ -207,7 +206,7 @@ services: - ./nginx.conf:/etc/nginx/conf.d/default.conf middle: - image: rok4/server:5.0.4 + image: rok4/server:5.5.0 depends_on: - storage environment: From 1c7b0a6f8415d47e3284e562e051a1f9df984a90 Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Fri, 7 Jun 2024 10:52:01 +0200 Subject: [PATCH 13/18] =?UTF-8?q?Temps=20d'attente=20entre=20les=20tentati?= =?UTF-8?q?ves=20de=20lecture=20=C3=A0=200=20par=20d=C3=A9faut=20dans=20le?= =?UTF-8?q?=20serveur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/server/ubuntu-2004-valgrind.Dockerfile | 1 + build/server/ubuntu-2004.Dockerfile | 1 + build/server/ubuntu-2204.Dockerfile | 1 + 3 files changed, 3 insertions(+) diff --git a/build/server/ubuntu-2004-valgrind.Dockerfile b/build/server/ubuntu-2004-valgrind.Dockerfile index d4f0167..e01fda6 100644 --- a/build/server/ubuntu-2004-valgrind.Dockerfile +++ b/build/server/ubuntu-2004-valgrind.Dockerfile @@ -19,6 +19,7 @@ ENV ROK4SERVER_VERSION=$ROK4SERVER_VERSION RUN curl -L -o rok4-server.deb https://github.com/rok4/server/releases/download/${ROK4SERVER_VERSION}/rok4-server-${ROK4SERVER_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./rok4-server.deb # Configuration par variables d'environnement par défaut +ENV ROK4_OBJECT_ATTEMPTS_WAIT=0 ENV IMPORT_LAYERS_FROM_PYRAMIDS="" ENV SERVER_LOGLEVEL="debug" SERVER_LOGOUTPUT="standard_output" SERVER_NBTHREAD="4" SERVER_CACHE_SIZE="1000" SERVER_CACHE_VALIDITY="10" SERVER_BACKLOG="0" ENV SERVER_LAYERS="/etc/rok4/layers.txt" SERVER_STYLES="/usr/share/rok4/styles" SERVER_TMS="/usr/share/rok4/tilematrixsets" diff --git a/build/server/ubuntu-2004.Dockerfile b/build/server/ubuntu-2004.Dockerfile index dc20d41..e5693cf 100644 --- a/build/server/ubuntu-2004.Dockerfile +++ b/build/server/ubuntu-2004.Dockerfile @@ -19,6 +19,7 @@ ENV ROK4SERVER_VERSION=$ROK4SERVER_VERSION RUN curl -L -o rok4-server.deb https://github.com/rok4/server/releases/download/${ROK4SERVER_VERSION}/rok4-server-${ROK4SERVER_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./rok4-server.deb # Configuration par variables d'environnement par défaut +ENV ROK4_OBJECT_ATTEMPTS_WAIT=0 ENV IMPORT_LAYERS_FROM_PYRAMIDS="" ENV SERVER_LOGLEVEL="error" SERVER_LOGOUTPUT="standard_output" SERVER_NBTHREAD="4" SERVER_CACHE_SIZE="1000" SERVER_CACHE_VALIDITY="10" SERVER_BACKLOG="0" ENV SERVER_LAYERS="/etc/rok4/layers.txt" SERVER_STYLES="/usr/share/rok4/styles" SERVER_TMS="/usr/share/rok4/tilematrixsets" diff --git a/build/server/ubuntu-2204.Dockerfile b/build/server/ubuntu-2204.Dockerfile index 8a941d7..688bfd1 100644 --- a/build/server/ubuntu-2204.Dockerfile +++ b/build/server/ubuntu-2204.Dockerfile @@ -19,6 +19,7 @@ ENV ROK4SERVER_VERSION=$ROK4SERVER_VERSION RUN curl -L -o rok4-server.deb https://github.com/rok4/server/releases/download/${ROK4SERVER_VERSION}/rok4-server-${ROK4SERVER_VERSION}-ubuntu-22.04-amd64.deb && apt install -y ./rok4-server.deb # Configuration par variables d'environnement par défaut +ENV ROK4_OBJECT_ATTEMPTS_WAIT=0 ENV IMPORT_LAYERS_FROM_PYRAMIDS="" ENV SERVER_LOGLEVEL="error" SERVER_LOGOUTPUT="standard_output" SERVER_NBTHREAD="4" SERVER_CACHE_SIZE="1000" SERVER_CACHE_VALIDITY="10" SERVER_BACKLOG="0" ENV SERVER_LAYERS="/etc/rok4/layers.txt" SERVER_STYLES="/usr/share/rok4/styles" SERVER_TMS="/usr/share/rok4/tilematrixsets" From e8f69b29c8f82cb9b5a4d53e4717b6837ee87f17 Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Wed, 11 Sep 2024 12:40:47 +0200 Subject: [PATCH 14/18] =?UTF-8?q?Passage=20=C3=A0=20la=20version=206=20du?= =?UTF-8?q?=20serveur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Simplification des configurations * Suppression de l'usage des versions avant la 5 (sans stockage objet) --- build/server/docker-entrypoint.sh | 24 ++- build/server/server.template.json | 2 +- build/server/services.template.json | 112 +++++++---- build/server/ubuntu-2004-valgrind.Dockerfile | 16 +- build/server/ubuntu-2004.Dockerfile | 19 +- build/server/ubuntu-2204-valgrind.Dockerfile | 56 ++++++ build/server/ubuntu-2204.Dockerfile | 15 +- run/datasets/README.md | 20 +- run/server/README.md | 191 +++++-------------- run/server/docker-compose-s3.yaml | 40 ---- run/server/docker-compose.yaml | 60 ++---- run/server/viewer/index.html | 22 ++- 12 files changed, 261 insertions(+), 316 deletions(-) create mode 100644 build/server/ubuntu-2204-valgrind.Dockerfile delete mode 100644 run/server/docker-compose-s3.yaml diff --git a/build/server/docker-entrypoint.sh b/build/server/docker-entrypoint.sh index d8f86c8..c713127 100644 --- a/build/server/docker-entrypoint.sh +++ b/build/server/docker-entrypoint.sh @@ -3,21 +3,19 @@ set -eu # Refactor some variable export SERVICE_KEYWORDS_JSON=$(echo $SERVICE_KEYWORDS | sed "s#,#\",\"#g") -export SERVICE_FORMATLIST_JSON=$(echo $SERVICE_FORMATLIST | sed "s#,#\",\"#g") -export SERVICE_GLOBALCRSLIST_JSON=$(echo $SERVICE_GLOBALCRSLIST | sed "s#,#\",\"#g") -# Setup server.json -envsubst < /etc/rok4/server.template.json > /etc/rok4/server.json - -# Setup services.json -envsubst < /etc/rok4/services.template.json > /etc/rok4/services.json +# Setup server.json : if final file already exists, we don't overwrite it +if [[ ! -f /configurations/server.json ]]; then + envsubst < /etc/rok4/server.template.json > /configurations/server.json +else + echo "/configurations/server.json exists: we don't overwrite it" +fi -# Centralisation des descripteurs de couches (serveur version 4) -if [[ ! -z $IMPORT_LAYERS_FROM_PYRAMIDS ]] ; then - for lay in $(find /pyramids/ -maxdepth 2 -name "*.lay.json"); do - bn=$(basename -s ".lay.json" $lay) - cp $lay /etc/rok4/layers/$bn.json - done +# Setup services.json : if final file already exists, we don't overwrite it +if [[ ! -f /configurations/services.json ]]; then + envsubst < /etc/rok4/services.template.json > /configurations/services.json +else + echo "/configurations/services.json exists: we don't overwrite it" fi exec "$@" \ No newline at end of file diff --git a/build/server/server.template.json b/build/server/server.template.json index 0a8d113..01cdc3a 100644 --- a/build/server/server.template.json +++ b/build/server/server.template.json @@ -12,7 +12,7 @@ "validity": ${SERVER_CACHE_VALIDITY} }, "configurations": { - "services": "/etc/rok4/services.json", + "services": "/configurations/services.json", "layers": "${SERVER_LAYERS}", "styles": "${SERVER_STYLES}", "tile_matrix_sets": "${SERVER_TMS}" diff --git a/build/server/services.template.json b/build/server/services.template.json index 640e089..5f32b4c 100644 --- a/build/server/services.template.json +++ b/build/server/services.template.json @@ -1,11 +1,6 @@ { - "title": "${SERVICE_TITLE}", - "abstract": "${SERVICE_ABSTRACT}", "provider": "${SERVICE_PROVIDERNAME}", "site": "${SERVICE_PROVIDERSITE}", - "keywords": [ - "${SERVICE_KEYWORDS_JSON}" - ], "fee": "${SERVICE_FEE}", "access_constraint": "${SERVICE_ACCESSCONSTRAINT}", "contact": { @@ -21,55 +16,88 @@ "country": "${SERVICE_COUNTRY}", "email": "${SERVICE_ELECTRONICMAILADDRESS}" }, + "crs_equivalences": "/etc/rok4/equals_crs.json", + "admin": { + "enabled": ${SERVICE_ADMIN_SUPPORT} + }, + "health": { + "enabled": true + }, "common": { - "info_formats": [ - "text/plain", - "text/html", - "text/xml", - "application/xml", - "application/json" - ], - "styling": ${SERVICE_FULLYSTYLING}, - "reprojection": true, - "inspire": ${SERVICE_INSPIRE}, - "post_mode": false + "enabled": ${SERVICE_COMMON_SUPPORT}, + "endpoint_uri": "${SERVICE_COMMON_ENDPOINT}", + "root_path": "/common", + "title": "Service COMMON", + "abstract": "Ce service permet la découvertes des services assurés par ce serveur", + "keywords": [ + "COMMON" + ] }, "wms": { - "active": ${SERVICE_WMSSUPPORT}, + "enabled": ${SERVICE_WMS_SUPPORT}, "endpoint_uri": "${SERVICE_WMS_ENDPOINT}", - "name": "${SERVICE_WMS}", - "max_width": ${SERVICE_MAXWIDTH}, - "max_height": ${SERVICE_MAXHEIGHT}, - "layer_limit": ${SERVICE_LAYERLIMIT}, - "max_tile_x": ${SERVICE_MAXTILEX}, - "max_tile_y": ${SERVICE_MAXTILEY}, + "root_path": "/wms", + "title": "Service de visualisation WMS", + "abstract": "Ce service permet la visulation de couches de données raster IGN au travers d'un flux WMS", + "keywords": [ + "WMS" + ], + "limits": { + "width": 5000, + "height": 5000, + "tile_x": 32, + "tile_y": 32, + "layers_count": 2 + }, + "name": "WMS", "formats": [ - "${SERVICE_FORMATLIST_JSON}" + "image/jpeg", + "image/png", + "image/tiff", + "image/geotiff", + "image/x-bil;bits=32" ], "crs": [ - "${SERVICE_GLOBALCRSLIST_JSON}" + "CRS:84", + "EPSG:3857", + "EPSG:4326" ], - "metadata": { - "url": "${SERVICE_METADATAWMS_URL}", - "type": "${SERVICE_METADATAWMS_TYPE}", - "format": "simple" - } + "root_layer": { + "title": "Couches WMS", + "abstract": "Données servies en WMS" + }, + "reprojection": true, + "inspire": false }, "wmts": { - "active": ${SERVICE_WMTSSUPPORT}, - "endpoint_uri": "${SERVICE_WMTS_ENDPOINT}", - "metadata": { - "url": "${SERVICE_METADATAWMTS_URL}", - "type": "${SERVICE_METADATAWMTS_TYPE}", - "format": "simple" - } + "enabled": ${SERVICE_WMTS_SUPPORT}, + "endpoint_uri": "${SERVICE_WMTS_ENDPOINT}", + "title": "Service de visualisation WMTS", + "abstract": "Ce service permet la visulation de couches de données raster IGN au travers d'un flux WMTS", + "keywords": [ + "WMTS" + ], + "root_path": "/wmts", + "reprojection": true }, "tms": { - "active": ${SERVICE_TMSSUPPORT}, - "endpoint_uri": "${SERVICE_TMS_ENDPOINT}" + "enabled": ${SERVICE_TMS_SUPPORT}, + "endpoint_uri": "${SERVICE_TMS_ENDPOINT}", + "root_path": "/tms", + "title": "Service de visualisation TMS", + "abstract": "Ce service permet la visulation de couches de données raster IGN au travers d'un flux TMS", + "keywords": [ + "TMS" + ] }, - "ogctiles": { - "active": ${SERVICE_OGCTILESSUPPORT}, - "endpoint_uri": "${SERVICE_OGCTILES_ENDPOINT}" + "tiles": { + "enabled": ${SERVICE_TILES_SUPPORT}, + "endpoint_uri": "${SERVICE_TILES_ENDPOINT}", + "root_path": "/tiles", + "title": "Service de visualisation OGC API Tiles", + "abstract": "Ce service permet la visulation de couches de données raster IGN au travers d'un flux OGC API Tiles", + "keywords": [ + "OGC API Tiles" + ] } } \ No newline at end of file diff --git a/build/server/ubuntu-2004-valgrind.Dockerfile b/build/server/ubuntu-2004-valgrind.Dockerfile index e01fda6..dfb127a 100644 --- a/build/server/ubuntu-2004-valgrind.Dockerfile +++ b/build/server/ubuntu-2004-valgrind.Dockerfile @@ -23,12 +23,12 @@ ENV ROK4_OBJECT_ATTEMPTS_WAIT=0 ENV IMPORT_LAYERS_FROM_PYRAMIDS="" ENV SERVER_LOGLEVEL="debug" SERVER_LOGOUTPUT="standard_output" SERVER_NBTHREAD="4" SERVER_CACHE_SIZE="1000" SERVER_CACHE_VALIDITY="10" SERVER_BACKLOG="0" ENV SERVER_LAYERS="/etc/rok4/layers.txt" SERVER_STYLES="/usr/share/rok4/styles" SERVER_TMS="/usr/share/rok4/tilematrixsets" -ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide WMS, WMTS and TMS raster and vector data broadcast" SERVICE_PROVIDERNAME="ROK4 Team" SERVICE_PROVIDERSITE="https://github.com/rok4/documentation" SERVICE_KEYWORDS="WMS,WMTS,TMS,Docker" + +ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide WMS, WMTS and TMS raster and vector data broadcast" SERVICE_PROVIDERNAME="ROK4 Team" SERVICE_PROVIDERSITE="https://github.com/rok4/documentation" SERVICE_KEYWORDS="WMS,WMTS,TMS,API Tiles,Docker" ENV SERVICE_FEE="none" SERVICE_ACCESSCONSTRAINT="none" -ENV SERVICE_WMS="WMS service" SERVICE_MAXWIDTH="10000" SERVICE_MAXHEIGHT="10000" SERVICE_LAYERLIMIT="2" SERVICE_MAXTILEX="256" SERVICE_MAXTILEY="256" SERVICE_FORMATLIST="image/jpeg,image/png,image/tiff,image/geotiff,image/x-bil;bits=32" -ENV SERVICE_GLOBALCRSLIST="CRS:84,EPSG:3857" SERVICE_FULLYSTYLING="true" SERVICE_INSPIRE="false" -ENV SERVICE_WMTSSUPPORT="true" SERVICE_TMSSUPPORT="true" SERVICE_WMSSUPPORT="true" SERVICE_OGCTILESSUPPORT="true" -ENV SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" SERVICE_OGCTILES_ENDPOINT="http://localhost/ogcapitiles" +ENV SERVICE_ADMIN_SUPPORT="true" SERVICE_COMMON_SUPPORT="true" SERVICE_WMTS_SUPPORT="true" SERVICE_TMS_SUPPORT="true" SERVICE_WMS_SUPPORT="true" SERVICE_TILES_SUPPORT="true" +ENV SERVICE_COMMON_ENDPOINT="http://localhost/common" SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" SERVICE_TILES_ENDPOINT="http://localhost/tiles" + WORKDIR / @@ -46,7 +46,11 @@ RUN apt -y install valgrind VOLUME /etc/rok4/layers VOLUME /pyramids +RUN mkdir /configurations && chown rok4:rok4 /configurations + +USER rok4 + EXPOSE 9000 ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["valgrind", "--leak-check=full", "/usr/bin/rok4", "-f", "/etc/rok4/server.json"] +CMD ["valgrind", "--leak-check=full", "/usr/bin/rok4", "-f", "/configurations/server.json"] diff --git a/build/server/ubuntu-2004.Dockerfile b/build/server/ubuntu-2004.Dockerfile index e5693cf..baf60d5 100644 --- a/build/server/ubuntu-2004.Dockerfile +++ b/build/server/ubuntu-2004.Dockerfile @@ -12,7 +12,7 @@ RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download ARG ROK4CORECPP_VERSION ENV ROK4CORECPP_VERSION=$ROK4CORECPP_VERSION -RUN curl -L -o librok4-dev.deb https://github.com/rok4/core-cpp/releases/download/${ROK4CORECPP_VERSION}/librok4-ceph-${ROK4CORECPP_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./librok4-dev.deb +RUN curl -L -o librok4-dev.deb https://github.com/rok4/core-cpp/releases/download/${ROK4CORECPP_VERSION}/librok4-ceph-${ROK4CORECPP_VERSION}-ubuntu-20.04-amd64.deb && apt update && apt install -y ./librok4-dev.deb ARG ROK4SERVER_VERSION ENV ROK4SERVER_VERSION=$ROK4SERVER_VERSION @@ -23,12 +23,11 @@ ENV ROK4_OBJECT_ATTEMPTS_WAIT=0 ENV IMPORT_LAYERS_FROM_PYRAMIDS="" ENV SERVER_LOGLEVEL="error" SERVER_LOGOUTPUT="standard_output" SERVER_NBTHREAD="4" SERVER_CACHE_SIZE="1000" SERVER_CACHE_VALIDITY="10" SERVER_BACKLOG="0" ENV SERVER_LAYERS="/etc/rok4/layers.txt" SERVER_STYLES="/usr/share/rok4/styles" SERVER_TMS="/usr/share/rok4/tilematrixsets" -ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide WMS, WMTS and TMS raster and vector data broadcast" SERVICE_PROVIDERNAME="ROK4 Team" SERVICE_PROVIDERSITE="https://github.com/rok4/documentation" SERVICE_KEYWORDS="WMS,WMTS,TMS,Docker" + +ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide WMS, WMTS and TMS raster and vector data broadcast" SERVICE_PROVIDERNAME="ROK4 Team" SERVICE_PROVIDERSITE="https://github.com/rok4/documentation" SERVICE_KEYWORDS="WMS,WMTS,TMS,API Tiles,Docker" ENV SERVICE_FEE="none" SERVICE_ACCESSCONSTRAINT="none" -ENV SERVICE_WMS="WMS service" SERVICE_MAXWIDTH="10000" SERVICE_MAXHEIGHT="10000" SERVICE_LAYERLIMIT="2" SERVICE_MAXTILEX="256" SERVICE_MAXTILEY="256" SERVICE_FORMATLIST="image/jpeg,image/png,image/tiff,image/geotiff,image/x-bil;bits=32" -ENV SERVICE_GLOBALCRSLIST="CRS:84,EPSG:3857" SERVICE_FULLYSTYLING="true" SERVICE_INSPIRE="false" -ENV SERVICE_WMTSSUPPORT="true" SERVICE_TMSSUPPORT="true" SERVICE_WMSSUPPORT="true" SERVICE_OGCTILESSUPPORT="true" -ENV SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" SERVICE_OGCTILES_ENDPOINT="http://localhost/ogcapitiles" +ENV SERVICE_ADMIN_SUPPORT="true" SERVICE_COMMON_SUPPORT="true" SERVICE_WMTS_SUPPORT="true" SERVICE_TMS_SUPPORT="true" SERVICE_WMS_SUPPORT="true" SERVICE_TILES_SUPPORT="true" +ENV SERVICE_COMMON_ENDPOINT="http://localhost/common" SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" SERVICE_TILES_ENDPOINT="http://localhost/tiles" WORKDIR / @@ -37,14 +36,18 @@ COPY ./server.template.json /etc/rok4/server.template.json COPY ./services.template.json /etc/rok4/services.template.json COPY ./docker-entrypoint.sh / -RUN chmod +x /docker-entrypoint.sh +RUN chmod a+x /docker-entrypoint.sh RUN mkdir /etc/rok4/layers /pyramids VOLUME /etc/rok4/layers VOLUME /pyramids +RUN mkdir /configurations && chown rok4:rok4 /configurations + +USER rok4 + EXPOSE 9000 ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["/usr/bin/rok4", "-f", "/etc/rok4/server.json"] +CMD ["/usr/bin/rok4", "-f", "/configurations/server.json"] diff --git a/build/server/ubuntu-2204-valgrind.Dockerfile b/build/server/ubuntu-2204-valgrind.Dockerfile new file mode 100644 index 0000000..451f687 --- /dev/null +++ b/build/server/ubuntu-2204-valgrind.Dockerfile @@ -0,0 +1,56 @@ +FROM ubuntu:22.04 + +RUN apt update && apt -y install curl gettext + +ARG ROK4TILEMATRIXSETS_VERSION=4.3 +ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION +RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb + +ARG ROK4STYLES_VERSION=4.1 +ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION +RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb + +ARG ROK4CORECPP_VERSION +ENV ROK4CORECPP_VERSION=$ROK4CORECPP_VERSION +RUN curl -L -o librok4-dev.deb https://github.com/rok4/core-cpp/releases/download/${ROK4CORECPP_VERSION}/librok4-ceph-${ROK4CORECPP_VERSION}-ubuntu-22.04-amd64.deb && apt install -y ./librok4-dev.deb + +ARG ROK4SERVER_VERSION +ENV ROK4SERVER_VERSION=$ROK4SERVER_VERSION +RUN curl -L -o rok4-server.deb https://github.com/rok4/server/releases/download/${ROK4SERVER_VERSION}/rok4-server-${ROK4SERVER_VERSION}-ubuntu-22.04-amd64.deb && apt install -y ./rok4-server.deb + +# Configuration par variables d'environnement par défaut +ENV ROK4_OBJECT_ATTEMPTS_WAIT=0 +ENV IMPORT_LAYERS_FROM_PYRAMIDS="" +ENV SERVER_LOGLEVEL="debug" SERVER_LOGOUTPUT="standard_output" SERVER_NBTHREAD="4" SERVER_CACHE_SIZE="1000" SERVER_CACHE_VALIDITY="10" SERVER_BACKLOG="0" +ENV SERVER_LAYERS="/etc/rok4/layers.txt" SERVER_STYLES="/usr/share/rok4/styles" SERVER_TMS="/usr/share/rok4/tilematrixsets" + +ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide WMS, WMTS and TMS raster and vector data broadcast" SERVICE_PROVIDERNAME="ROK4 Team" SERVICE_PROVIDERSITE="https://github.com/rok4/documentation" SERVICE_KEYWORDS="WMS,WMTS,TMS,API Tiles,Docker" +ENV SERVICE_FEE="none" SERVICE_ACCESSCONSTRAINT="none" +ENV SERVICE_ADMIN_SUPPORT="true" SERVICE_COMMON_SUPPORT="true" SERVICE_WMTS_SUPPORT="true" SERVICE_TMS_SUPPORT="true" SERVICE_WMS_SUPPORT="true" SERVICE_TILES_SUPPORT="true" +ENV SERVICE_COMMON_ENDPOINT="http://localhost/common" SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" SERVICE_TILES_ENDPOINT="http://localhost/tiles" + + +WORKDIR / + +# Déploiement des configurations +COPY ./server.template.json /etc/rok4/server.template.json +COPY ./services.template.json /etc/rok4/services.template.json + +COPY ./docker-entrypoint.sh / +RUN chmod +x /docker-entrypoint.sh + +RUN mkdir /etc/rok4/layers /pyramids + +RUN apt -y install valgrind + +VOLUME /etc/rok4/layers +VOLUME /pyramids + +RUN mkdir /configurations && chown rok4:rok4 /configurations + +USER rok4 + +EXPOSE 9000 + +ENTRYPOINT ["/docker-entrypoint.sh"] +CMD ["valgrind", "--leak-check=full", "/usr/bin/rok4", "-f", "/configurations/server.json"] diff --git a/build/server/ubuntu-2204.Dockerfile b/build/server/ubuntu-2204.Dockerfile index 688bfd1..432e45b 100644 --- a/build/server/ubuntu-2204.Dockerfile +++ b/build/server/ubuntu-2204.Dockerfile @@ -23,12 +23,11 @@ ENV ROK4_OBJECT_ATTEMPTS_WAIT=0 ENV IMPORT_LAYERS_FROM_PYRAMIDS="" ENV SERVER_LOGLEVEL="error" SERVER_LOGOUTPUT="standard_output" SERVER_NBTHREAD="4" SERVER_CACHE_SIZE="1000" SERVER_CACHE_VALIDITY="10" SERVER_BACKLOG="0" ENV SERVER_LAYERS="/etc/rok4/layers.txt" SERVER_STYLES="/usr/share/rok4/styles" SERVER_TMS="/usr/share/rok4/tilematrixsets" -ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide WMS, WMTS and TMS raster and vector data broadcast" SERVICE_PROVIDERNAME="ROK4 Team" SERVICE_PROVIDERSITE="https://github.com/rok4/documentation" SERVICE_KEYWORDS="WMS,WMTS,TMS,Docker" + +ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide WMS, WMTS and TMS raster and vector data broadcast" SERVICE_PROVIDERNAME="ROK4 Team" SERVICE_PROVIDERSITE="https://github.com/rok4/documentation" SERVICE_KEYWORDS="WMS,WMTS,TMS,API Tiles,Docker" ENV SERVICE_FEE="none" SERVICE_ACCESSCONSTRAINT="none" -ENV SERVICE_WMS="WMS service" SERVICE_MAXWIDTH="10000" SERVICE_MAXHEIGHT="10000" SERVICE_LAYERLIMIT="2" SERVICE_MAXTILEX="256" SERVICE_MAXTILEY="256" SERVICE_FORMATLIST="image/jpeg,image/png,image/tiff,image/geotiff,image/x-bil;bits=32" -ENV SERVICE_GLOBALCRSLIST="CRS:84,EPSG:3857" SERVICE_FULLYSTYLING="true" SERVICE_INSPIRE="false" -ENV SERVICE_WMTSSUPPORT="true" SERVICE_TMSSUPPORT="true" SERVICE_WMSSUPPORT="true" SERVICE_OGCTILESSUPPORT="true" -ENV SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" SERVICE_OGCTILES_ENDPOINT="http://localhost/ogcapitiles" +ENV SERVICE_ADMIN_SUPPORT="true" SERVICE_COMMON_SUPPORT="true" SERVICE_WMTS_SUPPORT="true" SERVICE_TMS_SUPPORT="true" SERVICE_WMS_SUPPORT="true" SERVICE_TILES_SUPPORT="true" +ENV SERVICE_COMMON_ENDPOINT="http://localhost/common" SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" SERVICE_TILES_ENDPOINT="http://localhost/tiles" WORKDIR / @@ -44,7 +43,11 @@ RUN mkdir /etc/rok4/layers /pyramids VOLUME /etc/rok4/layers VOLUME /pyramids +RUN mkdir /configurations && chown rok4:rok4 /configurations + +USER rok4 + EXPOSE 9000 ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["/usr/bin/rok4", "-f", "/etc/rok4/server.json"] +CMD ["/usr/bin/rok4", "-f", "/configurations/server.json"] diff --git a/run/datasets/README.md b/run/datasets/README.md index d137e53..5c6e6e1 100644 --- a/run/datasets/README.md +++ b/run/datasets/README.md @@ -81,7 +81,7 @@ curl -X POST $ROK4SERVER_ENDPOINT/admin/layers/ALTI \ --data-binary @- << EOF { "wms" : { - "authorized" : true, + "enabled" : true, "crs" : [ "IGNF:UTM20W84MART", "CRS:84", @@ -92,14 +92,14 @@ curl -X POST $ROK4SERVER_ENDPOINT/admin/layers/ALTI \ ] }, "tms" : { - "authorized" : true + "enabled" : true }, "keywords" : [ "UTM20W84MART_1M_MNT", "RASTER" ], "wmts" : { - "authorized" : true + "enabled" : true }, "pyramids" : [ { @@ -142,7 +142,7 @@ curl -X POST $ROK4SERVER_ENDPOINT/admin/layers/PENTE \ --data-binary @- << EOF { "wms" : { - "authorized" : true, + "enabled" : true, "crs" : [ "EPSG:3857", "CRS:84", @@ -165,10 +165,10 @@ curl -X POST $ROK4SERVER_ENDPOINT/admin/layers/PENTE \ "normal" ], "tms" : { - "authorized" : true + "enabled" : true }, "wmts" : { - "authorized" : true + "enabled" : true }, "keywords" : [ "PM", @@ -200,14 +200,14 @@ curl -X POST $ROK4SERVER_ENDPOINT/admin/layers/BDORTHO \ "title" : "BDORTHO", "abstract" : "Diffusion de la donnée BDORTHO.json", "wmts" : { - "authorized" : true + "enabled" : true }, "keywords" : [ "PM", "RASTER" ], "tms" : { - "authorized" : true + "enabled" : true }, "styles" : [ "normal" @@ -228,7 +228,7 @@ curl -X POST $ROK4SERVER_ENDPOINT/admin/layers/BDORTHO \ "EPSG:4258", "EPSG:4326" ], - "authorized" : true + "enabled" : true } } EOF @@ -254,7 +254,7 @@ curl -X POST $ROK4SERVER_ENDPOINT/admin/layers/LIMADM \ --data-binary @- << EOF { "tms" : { - "authorized" : true + "enabled" : true }, "keywords" : [ "PM", diff --git a/run/server/README.md b/run/server/README.md index e6fcef4..cd85797 100644 --- a/run/server/README.md +++ b/run/server/README.md @@ -1,37 +1,30 @@ # Stacks de diffusion -Le serveur permet la diffusion des données conditionnées sous forme de pyramide raster ou vecteur selon les protocoles Web Map Service, Web Map Tiled Service et Tile Map Service +Le serveur permet la diffusion des données conditionnées sous forme de pyramide raster ou vecteur selon les protocoles OGC Web Map Service, Web Map Tiled Service et API Tiles ou le protocole de l'OSGeo Tile Map Service. La documentation complète est disponible [ici](https://rok4.github.io/server). ## Lancement rapide -### Version 4+ - ``` -docker run --publish 9000:9000 rok4/server:4.1.0 +docker run --publish 9000:9000 rok4/server:6.0.1 ``` -### Version 5+ - -``` -docker run --publish 9000:9000 -e SERVER_LOGOUTPUT=standard_output rok4/server:5.5.0 -``` +Ce serveur n'est pas interrogeable en HTTP mais en FastCGI, il faut donc avoir un serveur en amont pour faire la conversion (style NGinx). ## Configuration personnalisée - Liste des variables d'environnement injectées dans les fichiers de configuration du serveur (et valeurs par défaut) : * `server.json` * SERVER_LOGLEVEL (`error`) - * SERVER_LOGOUTPUT (`standard_output`, valide pour la version 5, surcharger avec `standard_output_stream_for_errors` pour la version 4) + * SERVER_LOGOUTPUT (`standard_output`) * SERVER_NBTHREAD (`4`) * SERVER_CACHE_SIZE (`1000`) * SERVER_CACHE_VALIDITY (`10`) - * SERVER_LAYERS (`/etc/rok4/layers.txt`, valide pour la version 5, surcharger avec `/etc/rok4/layers/` pour la version 4) - * SERVER_STYLES (`/usr/share/rok4/styles`, valide pour la version 5, surcharger avec `/etc/rok4/layers/` pour la version 4)) - * SERVER_TMS (`/usr/share/rok4/tilematrixsets`, valide pour la version 5, surcharger avec `/etc/rok4/layers/` pour la version 4)) + * SERVER_LAYERS (`/etc/rok4/layers.txt`) + * SERVER_STYLES (`/usr/share/rok4/styles`) + * SERVER_TMS (`/usr/share/rok4/tilematrixsets`) * SERVER_BACKLOG (`0`) * `services.json` * SERVICE_TITLE (`WMS/WMTS/TMS server`) @@ -52,28 +45,17 @@ Liste des variables d'environnement injectées dans les fichiers de configuratio * SERVICE_POSTCODE (``) * SERVICE_COUNTRY (``) * SERVICE_ELECTRONICMAILADDRESS (``) - * SERVICE_WMS (`WMS service`) - * SERVICE_MAXWIDTH (`10000`) - * SERVICE_MAXHEIGHT (`10000`) - * SERVICE_LAYERLIMIT (`2`) - * SERVICE_MAXTILEX (`256`) - * SERVICE_MAXTILEY (`256`) - * SERVICE_FORMATLIST (`image/jpeg,image/png,image/tiff,image/geotiff,image/x-bil;bits=32`) - * SERVICE_GLOBALCRSLIST (`CRS:84,EPSG:3857`) - * SERVICE_FULLYSTYLING (`true`) - * SERVICE_INSPIRE (`false`) - * SERVICE_METADATAWMS_URL (``) - * SERVICE_METADATAWMS_TYPE (``) - * SERVICE_METADATAWMS_URL (``) - * SERVICE_METADATAWMS_TYPE (``) - * SERVICE_WMTSSUPPORT (`true`) - * SERVICE_TMSSUPPORT (`true`) - * SERVICE_WMSSUPPORT (`true`) - * SERVICE_OGCTILESSUPPORT (`true`) + * SERVICE_ADMIN_SUPPORT (`true`) + * SERVICE_COMMON_SUPPORT (`true`) + * SERVICE_COMMON_ENDPOINT (`http://localhost/common`) + * SERVICE_WMTS_SUPPORT (`true`) * SERVICE_WMTS_ENDPOINT (`http://localhost/wmts`) + * SERVICE_TMS_SUPPORT (`true`) * SERVICE_TMS_ENDPOINT (`http://localhost/tms`) + * SERVICE_WMS_SUPPORT (`true`) * SERVICE_WMS_ENDPOINT (`http://localhost/wms`) - * SERVICE_OGCTILES_ENDPOINT (`http://localhost/ogcapitiles`) + * SERVICE_TILES_SUPPORT (`true`) + * SERVICE_OGCTILES_ENDPOINT (`http://localhost/tiles`) Il est possible de surcharger chacune de ces valeurs de configuration via des variables d'environnement. Exemple : @@ -86,109 +68,7 @@ Il est aussi possible de définir toutes les variables d'environnement dans un f `docker run --publish 9000:9000 --env-file=custom_env rok4/server` -En définissant la variable d'environnement `IMPORT_LAYERS_FROM_PYRAMIDS` à une valeur non nulle (version 4), le script de lancement du serveur copie les fichiers avec l'extension `.lay.json` trouvés dans le dossier `/pyramids` dans le dossier `/etc/rok4/layers` (en supprimant le .lay du nom). - - -## Lancement au sein d'une stack avec stockage fichier (version 4) - -Avec les fichiers : - -* `docker-compose.yaml` -```yaml -version: "3" -services: - front: - image: nginx:alpine - ports: - - "80:80" - links: - - middle - volumes: - - ./nginx.conf:/etc/nginx/conf.d/default.conf - - middle: - image: rok4/server:4.1.0 - volumes: - - volume-limadm:/pyramids/LIMADM - - volume-alti:/pyramids/ALTI - - volume-ortho:/pyramids/BDORTHO - - volume-pente:/pyramids/PENTE - environment: - - IMPORT_LAYERS_FROM_PYRAMIDS=oui - - SERVICE_WMTS_ENDPOINT=http://localhost/wmts - - SERVICE_WMS_ENDPOINT=http://localhost/wms - - SERVICE_TMS_ENDPOINT=http://localhost/tms - depends_on: - - data-limadm - - data-alti - - data-pente - - data-ortho - - data-limadm: - image: rok4/dataset:geofla-martinique - volumes: - - volume-limadm:/pyramids/LIMADM - - data-alti: - image: rok4/dataset:bdalti-martinique - volumes: - - volume-alti:/pyramids/ALTI - - data-pente: - image: rok4/dataset:pente-martinique - volumes: - - volume-pente:/pyramids/PENTE - - data-ortho: - image: rok4/dataset:bdortho5m-martinique - volumes: - - volume-ortho:/pyramids/BDORTHO - -volumes: - volume-limadm: - volume-alti: - volume-ortho: - volume-pente: - -``` -* Fichier `nginx.conf` : -``` -upstream server { server middle:9000; } - -server { - listen 80 default_server; - - location / { - fastcgi_pass server; - include fastcgi_params; - add_header 'Access-Control-Allow-Origin' '*'; - } -} -``` - -Cette stack comprend : - -* Un front NGINX, permettant l'interrogation du serveur en HTTP, avec une configuration minimale -* Un serveur ROK4 -* Des jeux de données, disponible sous forme d'[images](https://hub.docker.com/r/rok4/dataset) - -Les capacités des 4 services rendus (WMS, WMTS, OGC API Tiles et TMS) sont disponibles aux URL : - -* WMS : http://localhost/wms?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0 -* WMTS : http://localhost/wmts?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0 -* TMS : http://localhost/tms/1.0.0 -* OGC API Tiles : http://localhost/ogcapitiles/collections -* Routes de santé (à partir de la version `4.1.0`) : - * http://localhost/healthcheck - * http://localhost/healthcheck/info - * http://localhost/healthcheck/threads - * http://localhost/healthcheck/depends - -Une stack plus complète incluant un visualisateur est disponible [ici](https://github.com/rok4/docker/tree/master/run/server/docker-compose.yaml). - - -## Lancement au sein d'une stack avec stockage S3 (version 5) - +## Lancement au sein d'une stack avec stockage S3 Avec les fichiers : @@ -211,14 +91,14 @@ services: - storage environment: - SERVER_LOGLEVEL=info - - IMPORT_LAYERS_FROM_PYRAMIDS=non - SERVICE_WMTS_ENDPOINT=http://localhost:8082/data/wmts - SERVICE_WMS_ENDPOINT=http://localhost:8082/data/wms - SERVICE_TMS_ENDPOINT=http://localhost:8082/data/tms + - SERVICE_COMMON_ENDPOINT=http://localhost:8082/data/common + - SERVICE_TILES_ENDPOINT=http://localhost:8082/data/tiles - ROK4_S3_SECRETKEY=rok4S3storage - ROK4_S3_KEY=rok4 - ROK4_S3_URL=http://storage:9000 - - SERVER_LOGOUTPUT=standard_output - SERVER_LAYERS=s3://layers/list.txt - SERVER_STYLES=s3://styles - SERVER_TMS=s3://tilematrixsets @@ -250,7 +130,21 @@ Cette stack comprend : * Un front NGINX, permettant l'interrogation du serveur en HTTP, avec une configuration minimale * Des serveurs ROK4 -* Un stockage S3, disponible sous forme d'[image](https://hub.docker.com/r/rok4/dataset), tag `minio` +* Un stockage S3, disponible sous forme d'[image](https://hub.docker.com/r/rok4/dataset), tag `minio`. Celui ci contient : + * Les styles de base du projet + * Les Tile Matrix Sets de base du projet + * 5 pyramides sur la Martinique : + * ALTI : données flottante, MNT à 25m + * BDORTHO : photographies aériennes, à 5m + * BDPARCELLAIRE : parcelles cadastrales, 50cm + * PENTE : pente calculée à partir de la BDAlti à 25m + * LIMADM : limites administratives au format vecteur + * 5 descripteurs de couches + * alti, avec le style hypso + * bdortho + * bdparcellaire, avec les styles orange et blanc + * pente, avec le style montagne_palette + * limadm Cette centralisation du stockage permet plus facilement de déployer plusieurs middle : `docker-compose -f docker-compose.yaml up --scale middle=2` @@ -259,12 +153,17 @@ Les capacités des 4 services rendus (WMS, WMTS, OGC API Tiles et TMS) sont disp * WMS : http://localhost/wms?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0 * WMTS : http://localhost/wmts?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0 * TMS : http://localhost/tms/1.0.0 -* OGC API Tiles : http://localhost/ogcapitiles/collections -* Routes de santé : - * http://localhost/healthcheck - * http://localhost/healthcheck/info - * http://localhost/healthcheck/threads - * http://localhost/healthcheck/depends -* Interface du minio : http://localhost:9000 (accès : rok4 / rok4S3storage) +* OGC API Tiles : http://localhost/tiles/collections + +On peut retrouver ces informations sur la route de l'API Common : http://localhost/common + +Des routes de santé permettent de surveiller l'activité et le contenu du serveur : + +* http://localhost/healthcheck +* http://localhost/healthcheck/info +* http://localhost/healthcheck/threads +* http://localhost/healthcheck/depends + +Et les données sont consultables via l'interface du minio : http://localhost:9000 (accès : rok4 / rok4S3storage) Une stack plus complète incluant un visualisateur est disponible [ici](https://github.com/rok4/docker/tree/master/run/server/docker-compose-s3.yaml). diff --git a/run/server/docker-compose-s3.yaml b/run/server/docker-compose-s3.yaml deleted file mode 100644 index ddc843a..0000000 --- a/run/server/docker-compose-s3.yaml +++ /dev/null @@ -1,40 +0,0 @@ -version: "3" -services: - front: - image: nginx:alpine - ports: - - "8082:80" - depends_on: - - middle - environment: - - SERVER_PREFIX=data - volumes: - - ./nginx/nginx.conf.template:/etc/nginx/templates/default.conf.template - - ./viewer:/usr/share/nginx/html/viewer - - middle: - image: rok4/server:5.3.0 - depends_on: - - storage - environment: - - SERVER_LOGLEVEL=info - - IMPORT_LAYERS_FROM_PYRAMIDS=non - - SERVICE_WMTS_ENDPOINT=http://localhost:8082/data/wmts - - SERVICE_WMS_ENDPOINT=http://localhost:8082/data/wms - - SERVICE_TMS_ENDPOINT=http://localhost:8082/data/tms - - ROK4_S3_SECRETKEY=rok4S3storage - - ROK4_S3_KEY=rok4 - - ROK4_S3_URL=http://storage:9000 - - SERVER_LOGOUTPUT=standard_output - - SERVER_LAYERS=s3://layers/list.txt - - SERVER_STYLES=s3://styles - - SERVER_TMS=s3://tilematrixsets - - SERVER_CACHE_VALIDITY=1 - - SERVER_CACHE_SIZE=1 - - storage: - image: rok4/dataset:minio - command: server /data --console-address ":9001" - ports: - - "9000:9000" - - "9001:9001" diff --git a/run/server/docker-compose.yaml b/run/server/docker-compose.yaml index c3e3775..ba04509 100644 --- a/run/server/docker-compose.yaml +++ b/run/server/docker-compose.yaml @@ -4,7 +4,7 @@ services: image: nginx:alpine ports: - "8082:80" - links: + depends_on: - middle environment: - SERVER_PREFIX=data @@ -13,46 +13,28 @@ services: - ./viewer:/usr/share/nginx/html/viewer middle: - image: rok4/server:4.1.0 - volumes: - - volume-limadm:/pyramids/LIMADM - - volume-alti:/pyramids/ALTI - - volume-ortho:/pyramids/BDORTHO - - volume-pente:/pyramids/PENTE + image: rok4/server:6.0.1 + depends_on: + - storage environment: - - SERVER_LOGLEVEL=debug - - IMPORT_LAYERS_FROM_PYRAMIDS=oui + - SERVER_LOGLEVEL=info - SERVICE_WMTS_ENDPOINT=http://localhost:8082/data/wmts - SERVICE_WMS_ENDPOINT=http://localhost:8082/data/wms - SERVICE_TMS_ENDPOINT=http://localhost:8082/data/tms - depends_on: - - data-limadm - - data-alti - - data-pente - - data-ortho + - SERVICE_TILES_ENDPOINT=http://localhost:8082/data/tiles + - SERVICE_COMMON_ENDPOINT=http://localhost:8082/data/common + - ROK4_S3_SECRETKEY=rok4S3storage + - ROK4_S3_KEY=rok4 + - ROK4_S3_URL=http://storage:9000 + - SERVER_LAYERS=s3://layers/list.txt + - SERVER_STYLES=s3://styles + - SERVER_TMS=s3://tilematrixsets + - SERVER_CACHE_VALIDITY=1 + - SERVER_CACHE_SIZE=1 - data-limadm: - image: rok4/dataset:geofla-martinique - volumes: - - volume-limadm:/pyramids/LIMADM - - data-alti: - image: rok4/dataset:bdalti-martinique - volumes: - - volume-alti:/pyramids/ALTI - - data-pente: - image: rok4/dataset:pente-martinique - volumes: - - volume-pente:/pyramids/PENTE - - data-ortho: - image: rok4/dataset:bdortho5m-martinique - volumes: - - volume-ortho:/pyramids/BDORTHO - -volumes: - volume-limadm: - volume-alti: - volume-ortho: - volume-pente: + storage: + image: rok4/dataset:minio + command: server /data --console-address ":9001" + ports: + - "9000:9000" + - "9001:9001" diff --git a/run/server/viewer/index.html b/run/server/viewer/index.html index c6ce11f..8ef368d 100644 --- a/run/server/viewer/index.html +++ b/run/server/viewer/index.html @@ -41,24 +41,35 @@ var bdortho = L.tileLayer(server + '/data/wmts?service=WMTS&request=GetTile&version=1.0.0&layer={id}&style=normal&tilematrixSet=PM&format=image%2Fjpeg&height=256&width=256&tilematrix={z}&tilerow={y}&tilecol={x}', { attribution: 'IGN', - id: 'BDORTHO' + id: 'bdortho' }).addTo(map); - var pente = L.tileLayer(server + '/data/wmts?service=WMTS&request=GetTile&version=1.0.0&layer={id}&style=normal&tilematrixSet=PM&format=image%2Fpng&height=256&width=256&tilematrix={z}&tilerow={y}&tilecol={x}', { + var bdparcellaire = L.tileLayer(server + '/data/wmts?service=WMTS&request=GetTile&version=1.0.0&layer={id}&style=orange&tilematrixSet=PM&format=image%2Fpng&height=256&width=256&tilematrix={z}&tilerow={y}&tilecol={x}', { attribution: 'IGN', - id: 'PENTE' + id: 'bdparcellaire' }).addTo(map); + var bdaltihypso = L.tileLayer.betterWms(server + '/data/wms?', { attribution: 'IGN', styles: 'hypso', version: '1.3.0', - layers: 'ALTI', + layers: 'alti', + transparent: true, + format: 'image/png' + }).addTo(map); + + var pente = L.tileLayer.betterWms(server + '/data/wms?', { + attribution: 'IGN', + styles: 'montagne_palette', + version: '1.3.0', + layers: 'pente', transparent: true, format: 'image/png' }).addTo(map); - var limadm = L.vectorGrid.protobuf(server + "/data/tms/1.0.0/LIMADM/{z}/{x}/{y}.pbf", { + + var limadm = L.vectorGrid.protobuf(server + "/data/tms/1.0.0/limadm/{z}/{x}/{y}.pbf", { vectorTileLayerStyles: { departement: { weight: 8, @@ -87,6 +98,7 @@ }, { "Carte des pentes": pente, + "Parcelles cadastrales": bdparcellaire, "Limites administratives": limadm } ).addTo(map); From 9d137fea22c89dde287014833f8ad61a3e238338 Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Wed, 11 Sep 2024 12:52:09 +0200 Subject: [PATCH 15/18] =?UTF-8?q?Version=204.3=20par=20d=C3=A9faut=20pour?= =?UTF-8?q?=20les=20styles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fullgeneration-docker.yaml | 2 +- .github/workflows/generation-docker.yaml | 2 +- .github/workflows/server-docker.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fullgeneration-docker.yaml b/.github/workflows/fullgeneration-docker.yaml index 9e11206..7ca9664 100644 --- a/.github/workflows/fullgeneration-docker.yaml +++ b/.github/workflows/fullgeneration-docker.yaml @@ -28,7 +28,7 @@ on: styles_tag: description: 'Styles tagged version' required: true - default: '4.1' + default: '4.3' jobs: push_to_registry: diff --git a/.github/workflows/generation-docker.yaml b/.github/workflows/generation-docker.yaml index 031bde7..86ad00a 100644 --- a/.github/workflows/generation-docker.yaml +++ b/.github/workflows/generation-docker.yaml @@ -12,7 +12,7 @@ on: styles_tag: description: 'Styles tagged version' required: true - default: '4.1' + default: '4.3' jobs: push_to_registry: diff --git a/.github/workflows/server-docker.yaml b/.github/workflows/server-docker.yaml index b8c8537..84e4ae5 100644 --- a/.github/workflows/server-docker.yaml +++ b/.github/workflows/server-docker.yaml @@ -12,7 +12,7 @@ on: styles_tag: description: 'Styles version' required: true - default: '4.1' + default: '4.3' tilematrixsets_tag: description: 'Tile matrix sets version' required: true From b953c94e346ba9ea0740225f8a12a1ae82e4cce2 Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Wed, 18 Sep 2024 14:10:23 +0200 Subject: [PATCH 16/18] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20la=20document?= =?UTF-8?q?ation=20de=20tmsizer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/pytools/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pytools/README.md b/build/pytools/README.md index 6b3e5e4..304cc41 100644 --- a/build/pytools/README.md +++ b/build/pytools/README.md @@ -92,7 +92,7 @@ docker run --rm \ -v $PWD/input:/input:ro \ -v $PWD/output:/output \ rok4/pytools \ - tmsizer -i /input/logs.txt --tms PM -io level=15 -if GETTILE_PARAMS -of HEATMAP -oo bbox=65000,6100000,665000,6500000 -oo dimensions=600x400 -o /output/heatmap.tif + tmsizer -i /input/logs.txt --tms PM -io levels=15,14 -io layers=LAYER.NAME1,LAYER.NAME2,LAYER.NAME3 -if GETTILE_PARAMS -of HEATMAP -oo bbox=65000,6100000,665000,6500000 -oo dimensions=600x400 -o /output/heatmap.tif ``` Documentation complète de l'outil [ici](https://rok4.github.io/pytools/latest/#tmsizer). From c83cb3f124b51e903e7cb8241b5b7e54b589c901 Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Tue, 1 Oct 2024 11:45:58 +0200 Subject: [PATCH 17/18] =?UTF-8?q?Passage=20en=20version=204.4=20par=20d?= =?UTF-8?q?=C3=A9faut=20pour=20les=20styles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/fullgeneration/debian11.Dockerfile | 2 +- build/generation/debian11.Dockerfile | 2 +- build/generation/debian12.Dockerfile | 2 +- build/server/server.template.json | 1 - build/server/services.template.json | 3 +- build/server/ubuntu-2004-valgrind.Dockerfile | 2 +- build/server/ubuntu-2004.Dockerfile | 2 +- build/server/ubuntu-2204-valgrind.Dockerfile | 2 +- build/server/ubuntu-2204.Dockerfile | 2 +- run/datasets/README.md | 227 +------------------ 10 files changed, 13 insertions(+), 232 deletions(-) diff --git a/build/fullgeneration/debian11.Dockerfile b/build/fullgeneration/debian11.Dockerfile index 885ac8a..7d4457d 100644 --- a/build/fullgeneration/debian11.Dockerfile +++ b/build/fullgeneration/debian11.Dockerfile @@ -7,7 +7,7 @@ ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb ENV ROK4_TMS_DIRECTORY=/usr/share/rok4/tilematrixsets -ARG ROK4STYLES_VERSION=4.1 +ARG ROK4STYLES_VERSION=4.4 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb diff --git a/build/generation/debian11.Dockerfile b/build/generation/debian11.Dockerfile index ca457da..f62d1ff 100644 --- a/build/generation/debian11.Dockerfile +++ b/build/generation/debian11.Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:20.04 RUN apt update && apt -y install curl procps wget gdal-bin -ARG ROK4STYLES_VERSION=4.1 +ARG ROK4STYLES_VERSION=4.4 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb diff --git a/build/generation/debian12.Dockerfile b/build/generation/debian12.Dockerfile index 1c82d63..4f10c63 100644 --- a/build/generation/debian12.Dockerfile +++ b/build/generation/debian12.Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:22.04 RUN apt update && apt -y install curl procps wget gdal-bin -ARG ROK4STYLES_VERSION=4.1 +ARG ROK4STYLES_VERSION=4.4 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb diff --git a/build/server/server.template.json b/build/server/server.template.json index 01cdc3a..38dd688 100644 --- a/build/server/server.template.json +++ b/build/server/server.template.json @@ -6,7 +6,6 @@ "threads": ${SERVER_NBTHREAD}, "port": ":9000", "backlog": ${SERVER_BACKLOG}, - "api": true, "cache": { "size": ${SERVER_CACHE_SIZE}, "validity": ${SERVER_CACHE_VALIDITY} diff --git a/build/server/services.template.json b/build/server/services.template.json index 5f32b4c..2e4c130 100644 --- a/build/server/services.template.json +++ b/build/server/services.template.json @@ -98,6 +98,7 @@ "abstract": "Ce service permet la visulation de couches de données raster IGN au travers d'un flux OGC API Tiles", "keywords": [ "OGC API Tiles" - ] + ], + "reprojection": true } } \ No newline at end of file diff --git a/build/server/ubuntu-2004-valgrind.Dockerfile b/build/server/ubuntu-2004-valgrind.Dockerfile index dfb127a..caa8819 100644 --- a/build/server/ubuntu-2004-valgrind.Dockerfile +++ b/build/server/ubuntu-2004-valgrind.Dockerfile @@ -6,7 +6,7 @@ ARG ROK4TILEMATRIXSETS_VERSION=4.3 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb -ARG ROK4STYLES_VERSION=4.1 +ARG ROK4STYLES_VERSION=4.4 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb diff --git a/build/server/ubuntu-2004.Dockerfile b/build/server/ubuntu-2004.Dockerfile index baf60d5..9bd098d 100644 --- a/build/server/ubuntu-2004.Dockerfile +++ b/build/server/ubuntu-2004.Dockerfile @@ -6,7 +6,7 @@ ARG ROK4TILEMATRIXSETS_VERSION=4.3 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb -ARG ROK4STYLES_VERSION=4.1 +ARG ROK4STYLES_VERSION=4.4 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb diff --git a/build/server/ubuntu-2204-valgrind.Dockerfile b/build/server/ubuntu-2204-valgrind.Dockerfile index 451f687..34d1dbc 100644 --- a/build/server/ubuntu-2204-valgrind.Dockerfile +++ b/build/server/ubuntu-2204-valgrind.Dockerfile @@ -6,7 +6,7 @@ ARG ROK4TILEMATRIXSETS_VERSION=4.3 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb -ARG ROK4STYLES_VERSION=4.1 +ARG ROK4STYLES_VERSION=4.4 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb diff --git a/build/server/ubuntu-2204.Dockerfile b/build/server/ubuntu-2204.Dockerfile index 432e45b..c040b77 100644 --- a/build/server/ubuntu-2204.Dockerfile +++ b/build/server/ubuntu-2204.Dockerfile @@ -6,7 +6,7 @@ ARG ROK4TILEMATRIXSETS_VERSION=4.3 ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb -ARG ROK4STYLES_VERSION=4.1 +ARG ROK4STYLES_VERSION=4.4 ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb diff --git a/run/datasets/README.md b/run/datasets/README.md index 5c6e6e1..1a0bf1d 100644 --- a/run/datasets/README.md +++ b/run/datasets/README.md @@ -52,230 +52,11 @@ La génération complète se fait en utilisant les images `rok4/pregeneration`, * [PM](https://github.com/rok4/tilematrixsets/blob/master/PM.json) * [UTM20W84MART_1M_MNT](https://github.com/rok4/tilematrixsets/blob/master/UTM20W84MART_1M_MNT.json) -## Détails sur les jeux de données - -Jeux disponibles sous forme d'images Docker sur [Docker Hub](https://hub.docker.com/r/rok4/dataset) - -### rok4/dataset:bdalti-martinique - -1 pyramide, 1 couche - -* Type : pyramide raster - * Zone : Martinique - * Tile Matrix Set : UTM20W84MART_1M_MNT - * Niveau du bas : 6 (25m) - * Source des données : [Alti (25m)](https://geoservices.ign.fr/ressource/154713). Les données (format ASC) doivent être transformées en TIF pour être prise en charge par les outils de génération. Dans le dossier dézippé : -``` -cd BDALTIV2/1_DONNEES_LIVRAISON_2020-06-00407/BDALTIV2_MNT_25M_ASC_WGS84UTM20_MART87_D972 -gdalbuildvrt BDALTIV2_2-0_25M_ASC_WGS84UTM20-MART87_D972_2015-10-21.vrt BDALTIV2_25M_MTQ_0675_1625_MNT_WGS84UTM20_MART87.asc BDALTIV2_25M_MTQ_0675_1650_MNT_WGS84UTM20_MART87.asc BDALTIV2_25M_MTQ_0700_1600_MNT_WGS84UTM20_MART87.asc BDALTIV2_25M_MTQ_0700_1625_MNT_WGS84UTM20_MART87.asc BDALTIV2_25M_MTQ_0700_1650_MNT_WGS84UTM20_MART87.asc BDALTIV2_25M_MTQ_0725_1600_MNT_WGS84UTM20_MART87.asc BDALTIV2_25M_MTQ_0725_1625_MNT_WGS84UTM20_MART87.asc BDALTIV2_25M_MTQ_0725_1650_MNT_WGS84UTM20_MART87.asc -gdalwarp BDALTIV2_2-0_25M_ASC_WGS84UTM20-MART87_D972_2015-10-21.vrt BDALTIV2_2-0_25M_ASC_WGS84UTM20-MART87_D972_2015-10-21.tif -``` - -* Volume à monter : /pyramids/ALTI - -* Exemple de requête à jouer pour ajouter la couche (avec Get Feature Info activé sur la valeur du pixel) - -```bash -curl -X POST $ROK4SERVER_ENDPOINT/admin/layers/ALTI \ --H 'Content-Type: application/json; charset=utf-8' \ ---data-binary @- << EOF -{ - "wms" : { - "enabled" : true, - "crs" : [ - "IGNF:UTM20W84MART", - "CRS:84", - "IGNF:WGS84G", - "EPSG:3857", - "EPSG:4258", - "EPSG:4326" - ] - }, - "tms" : { - "enabled" : true - }, - "keywords" : [ - "UTM20W84MART_1M_MNT", - "RASTER" - ], - "wmts" : { - "enabled" : true - }, - "pyramids" : [ - { - "top_level" : "0", - "path" : "/pyramids/ALTI/ALTI.json", - "bottom_level" : "6" - } - ], - "title" : "ALTI", - "resampling" : "nn", - "abstract" : "Diffusion de la donnée ALTI.json", - "styles" : [ - "normal", - "hypso" - ], - "get_feature_info": { - "type": "PYRAMID" - } -} -EOF -``` - -### rok4/dataset:pente-martinique - -1 pyramide, 1 couche - -* Type : pyramide raster - * Zone : Martinique - * Tile Matrix Set : PM - * Niveau du bas : 13 (20m) - * Source des données : [Alti (250m)](https://geoservices.ign.fr/documentation/diffusion/telechargement-donnees-libres.html#bd-alti) - -* Volume à monter : /pyramids/PENTE - -* Exemple de requête à jouer pour ajouter la couche - -```bash -curl -X POST $ROK4SERVER_ENDPOINT/admin/layers/PENTE \ --H 'Content-Type: application/json; charset=utf-8' \ ---data-binary @- << EOF -{ - "wms" : { - "enabled" : true, - "crs" : [ - "EPSG:3857", - "CRS:84", - "IGNF:WGS84G", - "EPSG:3857", - "EPSG:4258", - "EPSG:4326" - ] - }, - "abstract" : "Diffusion de la donnée PENTE.json", - "title" : "PENTE", - "pyramids" : [ - { - "bottom_level" : "13", - "path" : "/pyramids/PENTE/PENTE.json", - "top_level" : "0" - } - ], - "styles" : [ - "normal" - ], - "tms" : { - "enabled" : true - }, - "wmts" : { - "enabled" : true - }, - "keywords" : [ - "PM", - "RASTER" - ] -} -EOF -``` - -### rok4/dataset:bdortho5m-martinique - -1 pyramides, 1 couches - -* Type : pyramide raster - * Zone : Martinique - * Tile Matrix Set : PM - * Niveau du bas : 15 (7m) - * Source des données : [BDOrtho (5m)](https://geoservices.ign.fr/documentation/diffusion/telechargement-donnees-libres.html#bd-ortho-5-m) - -* Volume à monter : /pyramids/BDORTHO - -* Exemple de requête à jouer pour ajouter la couche - -```bash -curl -X POST $ROK4SERVER_ENDPOINT/admin/layers/BDORTHO \ --H 'Content-Type: application/json; charset=utf-8' \ ---data-binary @- << EOF -{ - "title" : "BDORTHO", - "abstract" : "Diffusion de la donnée BDORTHO.json", - "wmts" : { - "enabled" : true - }, - "keywords" : [ - "PM", - "RASTER" - ], - "tms" : { - "enabled" : true - }, - "styles" : [ - "normal" - ], - "pyramids" : [ - { - "path" : "/pyramids/BDORTHO/BDORTHO.json", - "top_level" : "0", - "bottom_level" : "15" - } - ], - "wms" : { - "crs" : [ - "EPSG:3857", - "CRS:84", - "IGNF:WGS84G", - "EPSG:3857", - "EPSG:4258", - "EPSG:4326" - ], - "enabled" : true - } -} -EOF -``` - -### rok4/dataset:geofla-martinique - -1 pyramide, 1 couche - -* Type : pyramide vecteur - * Zone : Martinique - * Tile Matrix Set : PM - * Niveau du bas : 18 - * Source des données : [GEOFLA](https://geoservices.ign.fr/documentation/diffusion/telechargement-donnees-libres.html#geofla) - -* Volume à monter : /pyramids/LIMADM - -* Exemple de requête à jouer pour ajouter la couche - -```bash -curl -X POST $ROK4SERVER_ENDPOINT/admin/layers/LIMADM \ --H 'Content-Type: application/json; charset=utf-8' \ ---data-binary @- << EOF -{ - "tms" : { - "enabled" : true - }, - "keywords" : [ - "PM", - "RASTER" - ], - "abstract" : "Diffusion de la donnée LIMADM.json", - "title" : "LIMADM", - "pyramids" : [ - { - "top_level" : "0", - "path" : "/pyramids/LIMADM/LIMADM.json", - "bottom_level" : "18" - } - ] -} -EOF -``` +## Détails sur les jeux de données pré conteneurisé ### rok4/dataset:minio -Cette image, ayant pour base `minio/minio`, est un styockage S3 contenant les styles, les tile matrix sets, les pyramides et les descripteurs de couche. Ce stockage centralisé permet d'exploiter le fonctionnement du serveur ROK4 5.0.0. +Cette image, ayant pour base `minio/minio`, est un stockage S3 contenant les styles, les tile matrix sets, les pyramides et les descripteurs de couche. Ce stockage centralisé permet d'exploiter le fonctionnement du serveur ROK4 5.0.0. Ce stockage se lance via la commande `docker run -p 9000:9000 -p 9001:9001 rok4/dataset:minio` et une interface graphique de gestion est disponible à l'URL `http://localhost:9001/buckets` (accès : rok4 / rok4S3storage) @@ -283,5 +64,5 @@ Ce stockage contient les buckets suivants : * `styles` : tous les styles du projet ROK4 * `tilematrixsets` : tous les tile matrix sets du projet ROK4 -* `pyramids` : les pyramides BDORTHO, ALTI, PENTE et LIMADM -* `layers` : l'objet liste `list.txt` et les descripteurs de couche BDORTHO, ALTI, PENTE et LIMADM \ No newline at end of file +* `pyramids` : les pyramides BDORTHO, BDPACELLAIRE, ALTI, PENTE et LIMADM +* `layers` : l'objet liste `list.txt` et les descripteurs de couche BDORTHO, BDPACELLAIRE, ALTI, PENTE et LIMADM \ No newline at end of file From 1f5c5d322a3c64b45ed108b443e645b6666fdc2b Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Tue, 1 Oct 2024 11:53:45 +0200 Subject: [PATCH 18/18] Correction de la documentation du serveur --- .github/workflows/fullgeneration-docker.yaml | 2 +- .github/workflows/generation-docker.yaml | 2 +- .github/workflows/server-docker.yaml | 2 +- run/server/README.md | 17 +++++++---------- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/fullgeneration-docker.yaml b/.github/workflows/fullgeneration-docker.yaml index 7ca9664..07e5679 100644 --- a/.github/workflows/fullgeneration-docker.yaml +++ b/.github/workflows/fullgeneration-docker.yaml @@ -28,7 +28,7 @@ on: styles_tag: description: 'Styles tagged version' required: true - default: '4.3' + default: '4.4' jobs: push_to_registry: diff --git a/.github/workflows/generation-docker.yaml b/.github/workflows/generation-docker.yaml index 86ad00a..18c01bf 100644 --- a/.github/workflows/generation-docker.yaml +++ b/.github/workflows/generation-docker.yaml @@ -12,7 +12,7 @@ on: styles_tag: description: 'Styles tagged version' required: true - default: '4.3' + default: '4.4' jobs: push_to_registry: diff --git a/.github/workflows/server-docker.yaml b/.github/workflows/server-docker.yaml index 84e4ae5..e84dec8 100644 --- a/.github/workflows/server-docker.yaml +++ b/.github/workflows/server-docker.yaml @@ -12,7 +12,7 @@ on: styles_tag: description: 'Styles version' required: true - default: '4.3' + default: '4.4' tilematrixsets_tag: description: 'Tile matrix sets version' required: true diff --git a/run/server/README.md b/run/server/README.md index cd85797..a792827 100644 --- a/run/server/README.md +++ b/run/server/README.md @@ -27,11 +27,8 @@ Liste des variables d'environnement injectées dans les fichiers de configuratio * SERVER_TMS (`/usr/share/rok4/tilematrixsets`) * SERVER_BACKLOG (`0`) * `services.json` - * SERVICE_TITLE (`WMS/WMTS/TMS server`) - * SERVICE_ABSTRACT (`This server provide WMS, WMTS and TMS raster and vector data broadcast`) * SERVICE_PROVIDERNAME (`ROK4 Team`) * SERVICE_PROVIDERSITE (`https://rok4.github.io/`) - * SERVICE_KEYWORDS (`WMS,WMTS,TMS,Docker`) * SERVICE_FEE (`none`) * SERVICE_ACCESSCONSTRAINT (`none`) * SERVICE_INDIVIDUALNAME (``) @@ -60,7 +57,7 @@ Liste des variables d'environnement injectées dans les fichiers de configuratio Il est possible de surcharger chacune de ces valeurs de configuration via des variables d'environnement. Exemple : -`docker run --publish 9000:9000 -e SERVICE_TITLE='"Mon serveur ROK4"' rok4/server` +`docker run --publish 9000:9000 rok4/server` Afin de définir des valeurs avec des espaces (comme dans l'exemple), il faut bien encapsuler la chaîne avec des des doubles quotes et des simples. @@ -91,11 +88,11 @@ services: - storage environment: - SERVER_LOGLEVEL=info - - SERVICE_WMTS_ENDPOINT=http://localhost:8082/data/wmts - - SERVICE_WMS_ENDPOINT=http://localhost:8082/data/wms - - SERVICE_TMS_ENDPOINT=http://localhost:8082/data/tms - - SERVICE_COMMON_ENDPOINT=http://localhost:8082/data/common - - SERVICE_TILES_ENDPOINT=http://localhost:8082/data/tiles + - SERVICE_WMTS_ENDPOINT=http://localhost/wmts + - SERVICE_WMS_ENDPOINT=http://localhost/wms + - SERVICE_TMS_ENDPOINT=http://localhost/tms + - SERVICE_COMMON_ENDPOINT=http://localhost/common + - SERVICE_TILES_ENDPOINT=http://localhost/tiles - ROK4_S3_SECRETKEY=rok4S3storage - ROK4_S3_KEY=rok4 - ROK4_S3_URL=http://storage:9000 @@ -166,4 +163,4 @@ Des routes de santé permettent de surveiller l'activité et le contenu du serve Et les données sont consultables via l'interface du minio : http://localhost:9000 (accès : rok4 / rok4S3storage) -Une stack plus complète incluant un visualisateur est disponible [ici](https://github.com/rok4/docker/tree/master/run/server/docker-compose-s3.yaml). +Une stack plus complète incluant un visualisateur est disponible [ici](https://github.com/rok4/docker/tree/master/run/server/docker-compose.yaml).