{"id":26702011,"url":"https://github.com/geonetwork/geonetwork-microservices","last_synced_at":"2025-04-13T11:25:26.253Z","repository":{"id":39854145,"uuid":"275828980","full_name":"geonetwork/geonetwork-microservices","owner":"geonetwork","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-21T11:20:35.000Z","size":1827,"stargazers_count":14,"open_issues_count":37,"forks_count":19,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-04-04T10:39:45.967Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geonetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-29T13:51:07.000Z","updated_at":"2025-03-05T08:35:25.000Z","dependencies_parsed_at":"2023-11-24T03:25:32.230Z","dependency_job_id":"9740ab5e-3b49-4caf-99ab-e748abd3a9ba","html_url":"https://github.com/geonetwork/geonetwork-microservices","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geonetwork%2Fgeonetwork-microservices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geonetwork%2Fgeonetwork-microservices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geonetwork%2Fgeonetwork-microservices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geonetwork%2Fgeonetwork-microservices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geonetwork","download_url":"https://codeload.github.com/geonetwork/geonetwork-microservices/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248704423,"owners_count":21148364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-27T02:32:11.499Z","updated_at":"2025-04-13T11:25:26.227Z","avatar_url":"https://github.com/geonetwork.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GeoNetwork opensource services\n\nGeoNetwork microservices is GeoNetwork ready to use in the cloud through dockerized microservices. It will work along with GeoNetwork 4 as it will only provide part of the application functionalities.\n\n* [Configuration](modules/support-services/configuring/README.md)\n* [Authorizing by using JWT](modules/services/authorizing/README.md)\n* [Searching](modules/services/authorizing/README.md)\n* [Routing](modules/services/routing/README.md)\n* [Indexing](modules/services/indexing/README.md)\n* [OGC API Records](modules/services/ogc-api-records/README.md)\n\n## Services architecture\n\n![Overall architecture](doc/img/gnmicroservices.svg)\n\n## Build \u0026 run\n\n### Requirements\nThose components are created with the following requirements:\n* Java 11 JDK\n* Maven 3.6.3\n* Docker (optional)\n* [core-geonetwork:4.0.0](https://github.com/geonetwork/core-geonetwork/releases/tag/4.0.0), might need a local build, it's not available on any published maven repository?\n\n### Building\nTo build the services:\n\u003e **_NOTE:_**  It will build all the services.\n\u003e - authorizing\n\u003e - gateway\n\u003e - indexing\n\u003e - ogc-api-records\n\u003e - searching\n\n```shell script\n./mvnw clean install\n```\n\nFor a quicker build, you can skip `checkstyle`, tests and docker image build with:\n\n```shell script\n./mvnw clean install -Drelax -P-docker\n```\n\n### Running with docker\nThe simple build command above created the docker images.\n\nNow run the docker composition as follows, the first time it might need to download some additional images for the rabbitmq event broker and the postgresql config database:\n\n\u003e **_NOTE:_**  This will run the whole docker composition:\n\u003e the microservice architecture + all services.\n\n```shell script\ndocker-compose up -d\n```\n\nIf some services fail to start and report config server error:\n```\ngateway_1        | java.lang.IllegalStateException: No instances found of configserver (config-service)\n```\n\nRestart `docker-compose up -d` to launch again the missing services. The config server being up, they will start properly.\n\n\nOnce services are up and running, access GeoNetwork from http://localhost:9900/geonetwork.\n\nRun `docker-compose logs -f` to watch startup progress of all services.\n\n### Calling services\n\nTest the service using the token:\n\n```shell script\n# Authenticate\nUSERNAME=admin\nPASSWORD=admin\n\ngn_token=$( \\\n    curl test-client:noonewilleverguess@127.0.0.1:9900/oauth/token \\\n         -dgrant_type=password -dscope=any \\\n         -dusername=$USERNAME -dpassword=$PASSWORD \\\n        | jq -r '.access_token')\n\n# Testing the token\ngn_auth_header=$(echo \"Authorization: Bearer $gn_token\")\ncurl 127.0.0.1:9900/secured -H \"$gn_auth_header\"\n\n\n# Search service (TODO: Need to be accessible to anonymous)\ncurl 127.0.0.1:9900/search \\\n    -H \"Accept: application/json\" \\\n    -H \"Content-type: application/json\" \\\n    -H \"$gn_auth_header\" \\\n    -X POST \\\n    -d '{\"from\": 0, \"size\": 0, \"query\": {\"query_string\": {\"query\": \"+isTemplate:n\"}}}' | jq -r '.hits.total.value'\n```\n\n### Development/debug\n\nDevelopments are made on https://github.com/geonetwork/geonetwork-microservices\n\nTo run one service directly without docker, use the `standalone` profile.\n\n```shell script\nmvn spring-boot:run -Dspring-boot.run.profiles=dev,standalone -f modules/services/indexing/\n```\nYou can also run the service from the service root folder also eg `modules/services/ogc-api-records` and refer to the [documentation](https://github.com/geonetwork/geonetwork-microservices/tree/main/modules/services/ogc-api-records#run-the-service-as-a-standalone-spring-boot-app) of the service \n\nTo run all services independently, start the event bus rabbitmq + support services, then start apps in order:\n```shell script\ndocker-compose up -d rabbitmq discovery config\n\nmvn spring-boot:run -Dspring-boot.run.profiles=dev,standalone -f modules/support-services/discovery\nmvn spring-boot:run -Dspring-boot.run.profiles=dev,standalone -f modules/support-services/configuring\nmvn spring-boot:run -Dspring-boot.run.profiles=dev,standalone -f modules/services/indexing\nmvn spring-boot:run -Dspring-boot.run.profiles=dev,standalone -f modules/services/ogc-api-records\n...\n```\n\nTo work on a microservice, start the docker containers and then run the service separetely:\n```shell script\nSERVER_PORT=9901 mvn spring-boot:run -Dspring-boot.run.profiles=dev,standalone -f modules/services/searching\n```\n\n\n## Bugs\n\n## Roadmap\n\nTODO\n\n## Contributing\n\nTo set license header use:\n\n```shell script\n./mvnw license:format\n```\n\n\n## Status\n\nThis is a feasibility exploration of moving from GeoNetwork monolithic application to a more scalable architecture. The main ideas are:\n* improve discoverability \u0026 search availability by creating a dedicated search service that can be replicated\n* better Search Engine Optimization by implementing an OGC API records service with a landing page builder mechanism\n* be in capacity to have background tasks like harvester and indexing that do not alter performances of the main web application.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeonetwork%2Fgeonetwork-microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeonetwork%2Fgeonetwork-microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeonetwork%2Fgeonetwork-microservices/lists"}