Closed juanluisrp closed 1 year ago
It should be noted that there is a sticky cookie here for forcing the user to use the same geonetwork across his visit: https://github.com/geonetwork/docker-geonetwork/pull/107/files#diff-bed7ab158ecf2f50be93c45dd9ae77da44d0689a155d95771d091515fb6d1ba7R59
If we have 2 geonetwork instances, the requests won't be evenly sent to all the geonetwork instances, in case we have 50% of users stuck to 1 geonetwork sending 80% of the overall requests, then one geonetwork will be overloaded while the other one will be underutilized.
I guess it's inevitable because geonetwork is a stateful app, but that's something the users should be aware of it.
I have encountered a configuration issue that I can reproduce based on this 4.4.0 setup. The swagger docs for ogc-records-service are not accessible through Geonetwork:
/openapi
and generates a link for baseurl + /openapi
, whereas geonetwork wants to send traffic for the service to /api
I've tried configuring the context path for ogc-records-service such that it matches /api
, and the location for the swagger api itself to match:
server.servlet.context-path: /api
springfox.documentation.sawggerUi.baseUrl: /api/openapi
However, in that case, the desired path results in a 404: http://localhost:8081/api/openapi/swagger-ui/. Probably not the way to go then. Could you advise on how to get the swaggerui accessible?
However, in that case, the desired path results in a 404: http://localhost:8081/api/openapi/swagger-ui/. Probably not the way to go then. Could you advise on how to get the swaggerui accessible?
Not sure @joachimnielandt . We have to fix it in OGC API Records side and it will not be fixed for 4.4.0.
However, in that case, the desired path results in a 404: http://localhost:8081/api/openapi/swagger-ui/. Probably not the way to go then. Could you advise on how to get the swaggerui accessible?
Checking a bit more, it looks like
http://localhost:8080/geonetwork/api/openapi/swagger-ui/
is fine so the issue is when swagger redirect from /openapi
to /openapi/swagger-ui/
.
Created https://github.com/docker-library/official-images/pull/15618 in official images repo.
Main changes
Run on Java 11
GeoNetwork 4.4.x use Java 11 (See https://github.com/geonetwork/core-geonetwork/pull/7186)
Improved configuration
Documentation explains how to configure various aspects of the application (eg. root context, database, elasticsearch index, security, ...) using environment variables.
Changes and new options:
WEBAPP_CONTEXT_PATH
(defaults to/geonetwork
)/opt/geonetwork
GN_CONFIG_PROPERTIES
for passing addional configuration options to GN in the form of Java properties, for exampleGN_CONFIG_PROPERTIES=-Dldap.base.provider.url=ldap://ldap:389
ES_XYZ
variables are removed. Use JVM arguments instead.Move from Nginx to Traefik
Moving to traefik was mainly motivated for easier setup of the multiple instances configuration (see below). Traefik dashboard is available on http://localhost:8000/ It defines a router to GeoNetwork with a redirect when requesting "/" on http://geonetwork.localhost/ and then load balance to the instances available.
Add health check
Add service health check and start services in order (eg. avoid to have error on OGC API Records when the database is empty).
Multiple instances configuration (experimental)
The composition allows to start multiple GeoNetwork nodes. eg. to start 2 more instances :
and traefik will register them as servers for the route
Related works