diff --git a/config b/config
index 7de5cc81d..1ca41bb28 160000
--- a/config
+++ b/config
@@ -1 +1 @@
-Subproject commit 7de5cc81d6bd87d9b9651b416f5dfa0ef28eadf4
+Subproject commit 1ca41bb28a67bf7e09e9765ac60c967f2d4db506
diff --git a/pom.xml b/pom.xml
index d9c743a99..0db949f04 100644
--- a/pom.xml
+++ b/pom.xml
@@ -74,11 +74,6 @@
gs-cloud-starter-webmvc${project.version}
-
- org.geoserver.cloud
- gs-cloud-starter-reactive
- ${project.version}
- org.geoserver.cloudgs-cloud-starter-wms-extensions
@@ -109,16 +104,6 @@
gs-cloud-catalog-cache${project.version}
-
- org.geoserver.cloud.catalog.service
- gs-cloud-reactive-catalog-client
- ${project.version}
-
-
- org.geoserver.cloud.catalog.service
- gs-cloud-reactive-catalog-server
- ${revision}
- org.geoserver.cloud.catalog.backendgs-cloud-catalog-backend-common
@@ -134,11 +119,6 @@
gs-cloud-catalog-backend-jdbcconfig${project.version}
-
- org.geoserver.cloud.catalog.backend
- gs-cloud-catalog-backend-catalog-service
- ${project.version}
- org.geoserver.cloud.catalog.backendgs-cloud-catalog-backend-pgsql
diff --git a/src/apps/geoserver/catalog/Dockerfile b/src/apps/geoserver/catalog/Dockerfile
deleted file mode 100644
index 4574b0981..000000000
--- a/src/apps/geoserver/catalog/Dockerfile
+++ /dev/null
@@ -1,55 +0,0 @@
-FROM eclipse-temurin:17-jre as builder
-ARG JAR_FILE=target/gs-cloud-*-bin.jar
-
-RUN apt update && \
-apt install -y fonts-deva \
-fonts-font-awesome \
-fonts-freefont-ttf \
-fonts-material-design-icons-iconfont \
-fonts-materialdesignicons-webfont \
-fonts-roboto
-
-COPY ${JAR_FILE} application.jar
-
-RUN java -Djarmode=layertools -jar application.jar extract
-
-##########
-FROM eclipse-temurin:17-jre
-COPY target/config/ /etc/gscloud/
-
-LABEL maintainer="GeoServer PSC "
-
-COPY --from=builder /usr/share/fonts/truetype/* /usr/share/fonts/truetype/
-
-RUN mkdir -p /opt/app/bin
-RUN mkdir -p /opt/app/data_directory && chmod 0777 /opt/app/data_directory
-VOLUME /opt/app/data_directory
-
-WORKDIR /opt/app/bin
-ENV JAVA_TOOL_OPTS="\
---add-exports=java.desktop/sun.awt.image=ALL-UNNAMED \
---add-opens=java.base/java.lang=ALL-UNNAMED \
---add-opens=java.base/java.util=ALL-UNNAMED \
---add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
---add-opens=java.base/java.text=ALL-UNNAMED \
---add-opens=java.desktop/java.awt.font=ALL-UNNAMED \
---add-opens=java.desktop/sun.awt.image=ALL-UNNAMED \
---add-opens=java.naming/com.sun.jndi.ldap=ALL-UNNAMED \
--Djava.awt.headless=true"
-ENV JAVA_OPTS=
-EXPOSE 8080
-EXPOSE 8081
-
-COPY --from=builder dependencies/ ./
-COPY --from=builder snapshot-dependencies/ ./
-COPY --from=builder spring-boot-loader/ ./
-COPY --from=builder application/ ./
-
-HEALTHCHECK \
---interval=10s \
---timeout=5s \
---start-period=30s \
---retries=5 \
-CMD curl -f -s -o /dev/null localhost:8081/actuator/health || exit 1
-
-CMD exec env USER_ID="$(id -u)" USER_GID="$(id -g)" java $JAVA_OPTS $JAVA_TOOL_OPTS org.springframework.boot.loader.JarLauncher
diff --git a/src/apps/geoserver/catalog/README.md b/src/apps/geoserver/catalog/README.md
deleted file mode 100644
index 6d821a9ee..000000000
--- a/src/apps/geoserver/catalog/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Cloud Native GeoServer Catalog service
-
-Spring Webflux reactive microservice that exposes the GeoServer *catalog*, *global*, and *resources* configuration
-objects through a RESTful API to other microservices, in order to abstract out the microservices that require access
-to the catalog from the actual catalog backend and implementation.
-
-Follow the service [documentation](../../../docs/develop/services/catalog-service.md) and keep it up to date .
diff --git a/src/apps/geoserver/catalog/pom.xml b/src/apps/geoserver/catalog/pom.xml
deleted file mode 100644
index 1eb29ed32..000000000
--- a/src/apps/geoserver/catalog/pom.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
- 4.0.0
-
- org.geoserver.cloud.apps
- gs-cloud-services
- ${revision}
-
- gs-cloud-catalog-service
- jar
- catalog-service
-
- false
- geoserver-cloud-catalog
- org.geoserver.cloud.catalog.app.CatalogServiceApplication
-
-
-
- org.geoserver.cloud
- gs-cloud-starter-reactive
-
-
- org.geoserver.cloud.catalog.service
- gs-cloud-reactive-catalog-server
-
-
- org.geoserver.cloud.catalog
- gs-cloud-catalog-plugin
- ${project.version}
- test-jar
- test
-
-
-
-
-
- maven-resources-plugin
- 3.3.1
-
-
- copy-resources
-
- validate
-
- copy-resources
-
-
- ${basedir}/target/config
-
-
- ${maven.multiModuleProjectDirectory}/config/
- false
-
-
-
-
-
-
-
-
-
-
- docker
-
- false
-
- docker
-
-
-
-
-
- com.spotify
- dockerfile-maven-plugin
-
-
-
-
-
-
diff --git a/src/apps/geoserver/catalog/src/main/java/org/geoserver/cloud/catalog/app/CatalogServiceApplication.java b/src/apps/geoserver/catalog/src/main/java/org/geoserver/cloud/catalog/app/CatalogServiceApplication.java
deleted file mode 100644
index 41d74e9a4..000000000
--- a/src/apps/geoserver/catalog/src/main/java/org/geoserver/cloud/catalog/app/CatalogServiceApplication.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.catalog.app;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class CatalogServiceApplication {
-
- public static void main(String[] args) {
- try {
- SpringApplication.run(CatalogServiceApplication.class, args);
- } catch (RuntimeException e) {
- System.exit(-1);
- }
- }
-}
diff --git a/src/apps/geoserver/catalog/src/main/resources/bootstrap.yml b/src/apps/geoserver/catalog/src/main/resources/bootstrap.yml
deleted file mode 100644
index 9ee53e9c4..000000000
--- a/src/apps/geoserver/catalog/src/main/resources/bootstrap.yml
+++ /dev/null
@@ -1,71 +0,0 @@
-info:
- component: Catalog and Config Server
- instance-id: ${spring.application.name}:${vcap.application.instance_id:${spring.application.instance_id:${spring.cloud.client.ip-address}}:${server.port}}
-
-geoserver:
- security.enabled: false
- catalog:
- # Disable isolated catalog, it checks the org.geoserver.ows.Dispatcher.REQUEST to check if an OWS is in progress,
- # which can never be the case, and causes a java.lang.NoClassDefFoundError on org.springframework.web.servlet.mvc.AbstractController
- isolated: false
- # Disable advertised catalog, it checks the org.geoserver.ows.Dispatcher.REQUEST to check if an OWS is in progress,
- # which can never be the case, and causes a java.lang.NoClassDefFoundError on org.springframework.web.servlet.mvc.AbstractController
- advertised: false
- # Disable LocalWorkspaceCatalog decorator, this service exposes a "raw catalog" backend, there's no concept of local workspaces
- localWorkspace: false
- secure: false
- catalog-service:
- io-threads:
- # if using jdbcconfig, make io-size be about half the size of geoserver.backend.jdbcconfig.datasource.maximumPoolSize,
- # it has the tendency to use more than one jdbc connection for some requests
- max-size: 8
- max-queued: 10000
- bus:
- send-events: false
- receive-events: true
- send-object: false
- send-diff: false
-server:
- port: 8080
- # one of never, always, on_trace_param (deprecated), on_param
- error.include-stacktrace: on-param
-management.server.port: 8081
-spring:
- config:
- import:
-# import definition of common bootstrap configuration profiles
- - classpath:gs_cloud_bootstrap_profiles.yml
-# load externalized configuration from geoserver.yml
- name: geoserver
-# and always include the service specific settings from the profile
- profiles.include: catalog_service
-# also ask for geoserver.yml when loading the externalized config through a config-server
- cloud.config.name: geoserver
- main:
- banner-mode: off
- allow-bean-definition-overriding: true
- allow-circular-references: true # false by default since spring-boot 2.6.0, breaks geoserver initialization
- web-application-type: reactive
- application:
- name: catalog-service
- jackson:
- default-property-inclusion: non-empty
- serialization:
- indent-output: false
- autoconfigure:
- exclude:
- - org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration
- - org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration
- - org.springframework.boot.actuate.autoconfigure.security.reactive.ReactiveManagementWebSecurityAutoConfiguration
-
-# override default of true, this service does not use the registry (when eureka client is enabled)
-eureka.client.fetch-registry: false
-
-logging:
- level:
- org.springframework.retry: debug
----
-# local profile, used for development only. Other settings like config and eureka urls in gs_cloud_bootstrap_profiles.yml
-spring.config.activate.on-profile: local
-server.port: 9100
-management.server.port: 8100
diff --git a/src/apps/geoserver/pom.xml b/src/apps/geoserver/pom.xml
index 4a701fa11..4729ee95d 100644
--- a/src/apps/geoserver/pom.xml
+++ b/src/apps/geoserver/pom.xml
@@ -17,8 +17,6 @@
restconfigwebuigwc
-
-
diff --git a/src/catalog/README.md b/src/catalog/README.md
index 7bc08aa78..4ec02a2fd 100644
--- a/src/catalog/README.md
+++ b/src/catalog/README.md
@@ -7,14 +7,14 @@ Dependency graph:
^
|
(catalog-event-bus) <-------- (catalog-backend-starter) ------> (catalog-cache)
- ^ | \
+ / | \
/ | \--> [gs-jdbcconfig]
/ | \
/ | \--> ...
/ |
- / +--> (catalog-service-client)
+ / +--> (pgconfig)
/
- (catalog-service)
+ (data-directory)
```
## pluggable-catalog-support
@@ -28,12 +28,14 @@ Implements `spring-could-bus` based event notification of catalog and configurat
## catalog-backend-starter
-Provides spring atuo-configuration for several catalog back-ends. Namely: traditional file based data directory, jdbcconfig, and catalog-service-client. More can be added as implementations are developed.
+Provides spring atuo-configuration for several catalog back-ends. Namely: traditional file based data directory, jdbcconfig, and pgconfig. More can be added as implementations are developed.
depends on:
- * catalog-event-bus
- * gs-jdbcconfig
- * catalog-service-client
+ * gs-cloud-catalog-events
+ * gs-cloud-catalog-cache
+ * gs-cloud-catalog-backend-datadir
+ * gs-cloud-catalog-backend-jdbcconfig
+ * gs-cloud-catalog-backend-pgsql
## catalog-cache
@@ -42,18 +44,6 @@ Based on `spring-boot-starter-cache`, decorates the application catalog's backen
depends on:
* catalog-event-bus
-## catalog-service-client
-
-Catalog implementation to use `catalog-service` as the application's catalog backend. Hooks into the configured `Catalog` and `ResourceStore`
-
-## catalog-service
-
-Microservice that implements the web-api to back the `catalog-service-client`.
-
- depends on:
- * catalog-backend-starter (hence transitively on all the supported backends)
-
-
# Common configuration properties
The following configuration properties apply to all *GeoServer* microservices (i.e. not edge services):
diff --git a/src/catalog/backends/catalog-service/pom.xml b/src/catalog/backends/catalog-service/pom.xml
deleted file mode 100644
index 129928d33..000000000
--- a/src/catalog/backends/catalog-service/pom.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
- 4.0.0
-
- org.geoserver.cloud.catalog.backend
- gs-cloud-catalog-backends
- ${revision}
-
- gs-cloud-catalog-backend-catalog-service
- jar
- Autoconfigurations for using the reactive catalog service as Catalog and config backend
-
-
- org.geoserver.cloud.catalog.backend
- gs-cloud-catalog-backend-common
-
-
- org.geoserver.cloud.catalog.service
- gs-cloud-reactive-catalog-client
-
-
- org.geoserver.cloud.catalog
- gs-cloud-catalog-events
- true
-
-
- org.springframework.boot
- spring-boot-starter-actuator
- true
-
-
- org.springframework.boot
- spring-boot-configuration-processor
- true
-
-
-
- org.springframework
- spring-webmvc
- provided
-
-
-
- javax.servlet
- javax.servlet-api
- provided
-
-
- org.springframework.boot
- spring-boot-autoconfigure-processor
- true
-
-
-
diff --git a/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/autoconfigure/catalog/backend/catalogservice/CatalogClientBackendAutoConfiguration.java b/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/autoconfigure/catalog/backend/catalogservice/CatalogClientBackendAutoConfiguration.java
deleted file mode 100644
index 00c3631b5..000000000
--- a/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/autoconfigure/catalog/backend/catalogservice/CatalogClientBackendAutoConfiguration.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.autoconfigure.catalog.backend.catalogservice;
-
-import org.geoserver.cloud.autoconfigure.catalog.backend.core.DefaultUpdateSequenceAutoConfiguration;
-import org.geoserver.cloud.config.catalog.backend.catalogservice.CatalogClientBackendConfigurer;
-import org.geoserver.cloud.config.catalog.backend.core.GeoServerBackendConfigurer;
-import org.springframework.boot.autoconfigure.AutoConfiguration;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.context.annotation.Import;
-
-/**
- * {@link EnableAutoConfiguration @EnableAutoConfiguration} auto-configuration to use the {@code
- * catalog-service} microservice as the {@link GeoServerBackendConfigurer catalog and configuration
- * backend} through the {@link CatalogClientBackendConfigurer}
- *
- *
Engages if enabled and configured as described by the {@link CatalogService} configuration
- * properties under the {@code geoserver.backend.catalog-service} prefix.
- *
- * @see ConditionalOnCatalogServiceClientEnabled
- */
-@AutoConfiguration(before = DefaultUpdateSequenceAutoConfiguration.class)
-@ConditionalOnCatalogServiceClientEnabled
-@Import(CatalogClientBackendConfigurer.class)
-public class CatalogClientBackendAutoConfiguration {}
diff --git a/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/autoconfigure/catalog/backend/catalogservice/ConditionalOnCatalogServiceClientEnabled.java b/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/autoconfigure/catalog/backend/catalogservice/ConditionalOnCatalogServiceClientEnabled.java
deleted file mode 100644
index b493f787b..000000000
--- a/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/autoconfigure/catalog/backend/catalogservice/ConditionalOnCatalogServiceClientEnabled.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.autoconfigure.catalog.backend.catalogservice;
-
-import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD, ElementType.TYPE})
-@Documented
-@ConditionalOnClass(org.geoserver.cloud.catalog.client.impl.CatalogClientConfiguration.class)
-@ConditionalOnProperty(
- prefix = "geoserver.backend.catalog-service",
- name = "enabled",
- havingValue = "true",
- matchIfMissing = false)
-public @interface ConditionalOnCatalogServiceClientEnabled {}
diff --git a/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/config/catalog/backend/catalogservice/CatalogClientBackendConfigurer.java b/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/config/catalog/backend/catalogservice/CatalogClientBackendConfigurer.java
deleted file mode 100644
index 3838a0876..000000000
--- a/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/config/catalog/backend/catalogservice/CatalogClientBackendConfigurer.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.config.catalog.backend.catalogservice;
-
-import lombok.extern.slf4j.Slf4j;
-
-import org.geoserver.GeoServerConfigurationLock;
-import org.geoserver.catalog.plugin.ExtendedCatalogFacade;
-import org.geoserver.cloud.catalog.client.impl.CatalogClientCatalogFacade;
-import org.geoserver.cloud.catalog.client.impl.CatalogClientConfiguration;
-import org.geoserver.cloud.catalog.client.impl.CatalogClientGeoServerFacade;
-import org.geoserver.cloud.catalog.client.impl.CatalogClientResourceStore;
-import org.geoserver.cloud.config.catalog.backend.core.GeoServerBackendConfigurer;
-import org.geoserver.config.GeoServerFacade;
-import org.geoserver.config.GeoServerLoader;
-import org.geoserver.platform.GeoServerResourceLoader;
-import org.geoserver.platform.config.UpdateSequence;
-import org.geoserver.platform.resource.FileSystemResourceStore;
-import org.geoserver.platform.resource.ResourceStore;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.DependsOn;
-import org.springframework.context.annotation.Import;
-import org.springframework.core.env.Environment;
-
-import java.io.File;
-
-@Configuration(proxyBeanMethods = true)
-@EnableConfigurationProperties(CatalogClientProperties.class)
-@Import(CatalogClientConfiguration.class)
-@Slf4j(topic = "org.geoserver.cloud.config.catalogclient")
-public class CatalogClientBackendConfigurer extends GeoServerBackendConfigurer {
-
- private @Autowired CatalogClientCatalogFacade catalogClientFacade;
- private @Autowired CatalogClientGeoServerFacade configClientFacade;
- private @Autowired CatalogClientResourceStore catalogServiceResourceStore;
-
- private @Autowired CatalogClientProperties catalogClientConfig;
-
- public CatalogClientBackendConfigurer() {
- log.info(
- "Loading geoserver config backend with {}",
- CatalogClientBackendConfigurer.class.getSimpleName());
- }
-
- protected @Bean @Override UpdateSequence updateSequence() {
- throw new UnsupportedOperationException("implement");
- }
-
- protected @Bean @Override GeoServerConfigurationLock configurationLock() {
- throw new UnsupportedOperationException("implement");
- }
-
- protected @Bean @Override ExtendedCatalogFacade catalogFacade() {
- return catalogClientFacade;
- }
-
- protected @Bean @Override GeoServerFacade geoserverFacade() {
- return configClientFacade;
- }
-
- @Bean(name = {"resourceStoreImpl"})
- protected @Override CatalogClientResourceStore resourceStoreImpl() {
- CatalogClientResourceStore store = catalogServiceResourceStore;
- File cacheDirectory = catalogClientConfig.getCacheDirectory();
- if (null != cacheDirectory) {
- store.setLocalCacheDirectory(cacheDirectory);
- }
- return store;
- }
-
- @DependsOn({
- "extensions",
- "wmsLoader",
- "wfsLoader",
- "wcsLoader",
- "wpsServiceLoader",
- "wmtsLoader"
- })
- protected @Bean @Override GeoServerLoader geoServerLoaderImpl() {
- return new CatalogClientGeoServerLoader(resourceLoader());
- }
-
- protected @Bean @Override GeoServerResourceLoader resourceLoader() {
- CatalogClientResourceStore resourceStore = resourceStoreImpl();
- GeoServerResourceLoader resourceLoader = new GeoServerResourceLoader(resourceStore);
- File cacheDirectory = catalogClientConfig.getCacheDirectory();
- if (null != cacheDirectory) {
- resourceLoader.setBaseDirectory(cacheDirectory);
- }
- return resourceLoader;
- }
-
- @Bean
- ResourceStore catalogServiceFallbackResourceStore(@Autowired Environment springEnv) {
- File dir =
- springEnv.getProperty(
- "geoserver.backend.catalog-service.fallback-resource-directory",
- File.class);
- if (dir == null) return null;
- dir.mkdirs();
- return new FileSystemResourceStore(dir);
- }
-}
diff --git a/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/config/catalog/backend/catalogservice/CatalogClientGeoServerLoader.java b/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/config/catalog/backend/catalogservice/CatalogClientGeoServerLoader.java
deleted file mode 100644
index f08969ea0..000000000
--- a/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/config/catalog/backend/catalogservice/CatalogClientGeoServerLoader.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.config.catalog.backend.catalogservice;
-
-import lombok.extern.slf4j.Slf4j;
-
-import org.geoserver.catalog.Catalog;
-import org.geoserver.catalog.WorkspaceInfo;
-import org.geoserver.config.GeoServer;
-import org.geoserver.config.GeoServerInfo;
-import org.geoserver.config.GeoServerLoader;
-import org.geoserver.config.util.XStreamPersister;
-import org.geoserver.platform.GeoServerResourceLoader;
-import org.geotools.api.filter.Filter;
-
-import java.io.IOException;
-
-/** */
-@Slf4j
-public class CatalogClientGeoServerLoader extends GeoServerLoader {
-
- public CatalogClientGeoServerLoader(GeoServerResourceLoader resourceLoader) {
- super(resourceLoader);
- }
-
- protected @Override void initializeDefaultStyles(Catalog catalog) throws IOException {
- try {
- super.initializeDefaultStyles(catalog);
- } catch (Exception e) {
- log.warn(
- "Unable to connect to catalog-service's catalog API during GeoServerLoader bean initialization",
- e);
- }
- }
-
- protected @Override void loadCatalog(Catalog catalog, XStreamPersister xp) throws Exception {
- log.info("Checking catalog service health...");
- try {
- int count = catalog.count(WorkspaceInfo.class, Filter.INCLUDE);
- log.info(
- "Catalog-service reports {} workspaces, roundtrip succeeded, assuming service is healthy",
- count);
- } catch (Exception e) {
- log.warn(
- "Unable to connect to catalog-service's catalog API during GeoServerLoader bean initialization",
- e);
- }
- }
-
- protected @Override void loadGeoServer(GeoServer geoServer, XStreamPersister xp)
- throws Exception {
- log.info("Checking config service health...");
- try {
- GeoServerInfo global = geoServer.getGlobal();
- log.info(
- "Catalog-service returned global config, update sequence: {}, roundtrip succeeded, assuming service is healthy",
- global.getUpdateSequence());
- } catch (Exception e) {
- log.warn(
- "Unable to connect to catalog-service's config API during GeoServerLoader bean initialization",
- e);
- }
- }
-}
diff --git a/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/config/catalog/backend/catalogservice/CatalogClientProperties.java b/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/config/catalog/backend/catalogservice/CatalogClientProperties.java
deleted file mode 100644
index 5d0950499..000000000
--- a/src/catalog/backends/catalog-service/src/main/java/org/geoserver/cloud/config/catalog/backend/catalogservice/CatalogClientProperties.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.config.catalog.backend.catalogservice;
-
-import lombok.Data;
-import lombok.Generated;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-import java.io.File;
-
-/**
- * Configuration properties bean to use the {@code catalog-service} micro-service client back-end
- * and can be used as a {@link ConfigurationProperties @ConfigurationProperties}
- */
-@Generated
-@ConfigurationProperties(prefix = "geoserver.backend.catalog-service")
-public @Data class CatalogClientProperties {
- private boolean enabled;
- private String url;
- private File cacheDirectory;
-}
diff --git a/src/catalog/backends/catalog-service/src/main/resources/META-INF/spring.factories b/src/catalog/backends/catalog-service/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index fb7b52f42..000000000
--- a/src/catalog/backends/catalog-service/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,3 +0,0 @@
-# Auto Configure
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.geoserver.cloud.autoconfigure.catalog.backend.catalogservice.CatalogClientBackendAutoConfiguration
\ No newline at end of file
diff --git a/src/catalog/backends/catalog-service/src/test/java/org/geoserver/cloud/autoconfigure/catalog/backend/catalogservice/CatalogClientBackendAutoConfigurationTest.java b/src/catalog/backends/catalog-service/src/test/java/org/geoserver/cloud/autoconfigure/catalog/backend/catalogservice/CatalogClientBackendAutoConfigurationTest.java
deleted file mode 100644
index f3f276f1a..000000000
--- a/src/catalog/backends/catalog-service/src/test/java/org/geoserver/cloud/autoconfigure/catalog/backend/catalogservice/CatalogClientBackendAutoConfigurationTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.autoconfigure.catalog.backend.catalogservice;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.instanceOf;
-import static org.junit.jupiter.api.Assertions.assertSame;
-
-import org.geoserver.catalog.CatalogFacade;
-import org.geoserver.catalog.plugin.CatalogPlugin;
-import org.geoserver.cloud.autoconfigure.catalog.backend.core.GeoServerBackendAutoConfiguration;
-import org.geoserver.cloud.autoconfigure.security.GeoServerSecurityAutoConfiguration;
-import org.geoserver.cloud.catalog.client.impl.CatalogClientCatalogFacade;
-import org.geoserver.cloud.catalog.client.impl.CatalogClientGeoServerFacade;
-import org.geoserver.cloud.catalog.client.impl.CatalogClientResourceStore;
-import org.geoserver.cloud.config.catalog.backend.catalogservice.CatalogClientBackendConfigurer;
-import org.geoserver.cloud.config.catalog.backend.catalogservice.CatalogClientGeoServerLoader;
-import org.geoserver.platform.GeoServerResourceLoader;
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.autoconfigure.AutoConfigurations;
-import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration;
-import org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration;
-import org.springframework.boot.test.context.runner.ApplicationContextRunner;
-
-import reactivefeign.spring.config.ReactiveFeignAutoConfiguration;
-
-/**
- * Test {@link CatalogClientBackendConfigurer} through {@link CatalogClientBackendAutoConfiguration}
- * when {@code geoserver.backend.catalog-service.enabled=true}
- */
-@Disabled("Make it run without ReactiveCatalogClient trying to connect")
-class CatalogClientBackendAutoConfigurationTest {
-
- // geoserver.security.enabled=false to avoid calling the catalog during bean initialization,
- // since there's no backend service to connect to
- private final ApplicationContextRunner contextRunner =
- new ApplicationContextRunner()
- .withAllowBeanDefinitionOverriding(true)
- .withPropertyValues(
- "reactive.feign.loadbalancer.enabled=false",
- "geoserver.backend.catalog-service.enabled=true",
- "geoserver.security.enabled=false")
- .withAllowBeanDefinitionOverriding(true)
- .withConfiguration(
- AutoConfigurations.of( //
- GeoServerBackendAutoConfiguration.class,
- GeoServerSecurityAutoConfiguration.class,
- ReactiveFeignAutoConfiguration.class,
- WebClientAutoConfiguration.class,
- CacheAutoConfiguration.class));
-
- @Test
- void testCatalog() {
- contextRunner.run(
- context ->
- context.isTypeMatch(
- "rawCatalog", org.geoserver.catalog.plugin.CatalogPlugin.class));
- }
-
- @Test
- void testCatalogFacade() {
- contextRunner.run(
- context -> context.isTypeMatch("catalogFacade", CatalogClientCatalogFacade.class));
- }
-
- @Test
- void testCatalogFacadeIsRawCatalogFacade() {
- contextRunner.run(
- context -> {
- CatalogPlugin catalog = context.getBean("rawCatalog", CatalogPlugin.class);
- CatalogFacade rawCatalogFacade =
- context.getBean("catalogFacade", CatalogFacade.class);
- assertSame(rawCatalogFacade, catalog.getRawFacade());
- });
- }
-
- @Test
- void testResourceStore() {
- contextRunner.run(
- context ->
- context.isTypeMatch("resourceStoreImpl", CatalogClientResourceStore.class));
- }
-
- @Test
- void testResourceLoadersResourceStore() {
- contextRunner.run(
- context -> {
- GeoServerResourceLoader resourceLoader =
- context.getBean(GeoServerResourceLoader.class);
- assertThat(
- resourceLoader.getResourceStore(),
- instanceOf(CatalogClientResourceStore.class));
- });
- }
-
- @Test
- void testGeoserverFacade() {
- contextRunner.run(
- context ->
- context.isTypeMatch("geoserverFacade", CatalogClientGeoServerFacade.class));
- }
-
- @Test
- void testGeoserverLoader() {
- contextRunner.run(
- context ->
- context.isTypeMatch(
- "geoServerLoaderImpl", CatalogClientGeoServerLoader.class));
- }
-}
diff --git a/src/catalog/backends/catalog-service/src/test/resources/application.yml b/src/catalog/backends/catalog-service/src/test/resources/application.yml
deleted file mode 100644
index ad138e97f..000000000
--- a/src/catalog/backends/catalog-service/src/test/resources/application.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-info:
- instance-id: test-instance-id
-spring:
- main:
- banner-mode: off
- allow-bean-definition-overriding: true
- # false by default since spring-boot 2.6.0, breaks geoserver initialization
- allow-circular-references: true
- cloud.bus.enabled: false
- autoconfigure:
- exclude:
- - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
-
-
-eureka.client.enabled: false
-
-geoserver:
- backend:
- catalog-service:
- enabled: false
- url: catalog-service
-# resource-store.fallback.enabled: ${java.io.tmpdir}/gs_cloud/catalog_client_resource_store_fallback
-# resource-store.fallback: ${java.io.tmpdir}/gs_cloud/catalog_client_resource_store_fallback
-
-logging:
- level:
- root: WARN
- #org.geoserver.platform: ERROR
- org.geoserver: warn
- org.geoserver.cloud: warn
- org.geoserver.cloud.config.factory: warn
- org.geoserver.jdbcconfig: warn
- org.geoserver.jdbcstore: warn
diff --git a/src/catalog/backends/catalog-service/src/test/resources/logback-test.xml b/src/catalog/backends/catalog-service/src/test/resources/logback-test.xml
deleted file mode 100644
index 92a70edd5..000000000
--- a/src/catalog/backends/catalog-service/src/test/resources/logback-test.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/catalog/backends/pom.xml b/src/catalog/backends/pom.xml
index 6f995cf87..43356b389 100644
--- a/src/catalog/backends/pom.xml
+++ b/src/catalog/backends/pom.xml
@@ -41,15 +41,4 @@
test
-
-
- catalog-service
-
- false
-
-
- catalog-service
-
-
-
diff --git a/src/catalog/catalog-server/client/README.md b/src/catalog/catalog-server/client/README.md
deleted file mode 100644
index cf96361e8..000000000
--- a/src/catalog/catalog-server/client/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# GeoServer Catalog micro-service client
-
-Client library for the catalog-microservice.
-
-The `catalog-service` client uses [String Cloud OpenFeign](https://cloud.spring.io/spring-cloud-openfeign/reference/html/)
-
diff --git a/src/catalog/catalog-server/client/pom.xml b/src/catalog/catalog-server/client/pom.xml
deleted file mode 100644
index fd15ee75d..000000000
--- a/src/catalog/catalog-server/client/pom.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
- 4.0.0
-
- org.geoserver.cloud.catalog.service
- gs-cloud-catalog-server
- ${revision}
-
- gs-cloud-reactive-catalog-client
- jar
- Reactive catalog-service client library
-
-
- org.springframework.boot
- spring-boot-starter-json
-
-
- org.geoserver.cloud.catalog.jackson
- gs-cloud-starter-jackson
-
-
- org.geoserver.cloud.catalog
- gs-cloud-catalog-plugin
-
-
- org.geoserver
- gs-main
-
-
- org.springframework.cloud
- spring-cloud-starter-netflix-eureka-client
-
-
- com.playtika.reactivefeign
- feign-reactor-webclient
-
-
- com.playtika.reactivefeign
- feign-reactor-cloud
-
-
- com.playtika.reactivefeign
- feign-reactor-spring-configuration
-
-
- io.github.openfeign
- feign-slf4j
-
-
-
- org.geoserver.cloud.catalog
- gs-cloud-catalog-plugin
- ${project.version}
- test-jar
- test
-
-
- org.springframework.boot
- spring-boot-starter-web
- test
-
-
-
diff --git a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientCatalogFacade.java b/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientCatalogFacade.java
deleted file mode 100644
index 518401928..000000000
--- a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientCatalogFacade.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.catalog.client.impl;
-
-import lombok.NonNull;
-
-import org.geoserver.catalog.Catalog;
-import org.geoserver.catalog.CatalogFacade;
-import org.geoserver.catalog.CatalogInfo;
-import org.geoserver.catalog.LayerGroupInfo;
-import org.geoserver.catalog.LayerInfo;
-import org.geoserver.catalog.MapInfo;
-import org.geoserver.catalog.NamespaceInfo;
-import org.geoserver.catalog.ResourceInfo;
-import org.geoserver.catalog.StoreInfo;
-import org.geoserver.catalog.StyleInfo;
-import org.geoserver.catalog.WorkspaceInfo;
-import org.geoserver.catalog.impl.ModificationProxy;
-import org.geoserver.catalog.impl.ResolvingProxy;
-import org.geoserver.catalog.plugin.RepositoryCatalogFacade;
-import org.geoserver.catalog.plugin.forwarding.ResolvingCatalogFacadeDecorator;
-import org.geoserver.catalog.plugin.resolving.CatalogPropertyResolver;
-import org.geoserver.catalog.plugin.resolving.CollectionPropertiesInitializer;
-import org.geoserver.catalog.plugin.resolving.ResolvingProxyResolver;
-import org.geoserver.cloud.catalog.client.repository.CatalogClientRepository;
-
-import java.lang.reflect.Proxy;
-import java.util.function.Function;
-import java.util.function.Supplier;
-
-/**
- * {@link CatalogFacade} for {@code catalog-service}, being a {@link
- * ResolvingCatalogFacadeDecorator}, wraps the raw {@link RepositoryCatalogFacade} that delegates to
- * the {@link CatalogClientRepository catalog client repositories}, and adds the necessary {@link
- * #setInboundResolver inbound} and {@link #setOutboundResolver outbound} resolvers to ensure valid
- * input and output for the decorated facade.
- *
- *
Note these in/out bound resolvers do not deal with {@link ModificationProxy} at all. It
- * is up to the {@link Catalog} implementation itself to do that if it so requires it.
- *
- *
This decorator specializes in resolving the objects returned by {@link ReactiveCatalogClient}
- * through {@link CatalogClientRepository}. For instance:
- *
- *
- *
- *
- *
for in-bound objects, it checks no {@code java.lang.reflect.Proxy} instances get in,
- * throwing an {@link IllegalArgumentException} if so happens, as it'd be a programming error,
- * probably the catalog not unwrapping objects before deliering them down to the facade.
- *
then sets the {@link Catalog} property if the object so requires it (e.g. {@link
- * StoreInfo#getCatalog()} (see {@link CatalogPropertyResolver});
- *
and finally resolves {@code null} collection properties to empty collections (see
- * {@link CollectionPropertiesInitializer})
- *
- *
- */
-public class CatalogClientCatalogFacade extends ResolvingCatalogFacadeDecorator {
-
- public CatalogClientCatalogFacade(@NonNull RepositoryCatalogFacade rawFacade) {
- super(rawFacade);
- }
-
- // set up resolving chain
- @Override
- public void setCatalog(Catalog catalog) {
- super.setCatalog(catalog);
-
- final ResolvingProxyResolver proxyResolver =
- ResolvingProxyResolver.of(catalog, true);
- final CatalogPropertyResolver catalogPropertyResolver =
- CatalogPropertyResolver.of(catalog);
- final CollectionPropertiesInitializer collectionInitializer =
- CollectionPropertiesInitializer.instance();
-
- // resolver for single-object returning methods
- Function outboundResolver =
- proxyResolver.andThen(catalogPropertyResolver).andThen(collectionInitializer);
-
- // resolver supplier for Stream<> returning methods, uses memoized proxy resolver that
- // caches resolved references for the lifetime of the stream
- Supplier> streamResolver = //
- () ->
- proxyResolver
- .memoizing() //
- .andThen(catalogPropertyResolver) //
- .andThen(collectionInitializer);
-
- setInboundResolver(
- o -> {
- if (o instanceof Proxy) {
- throw new IllegalArgumentException(
- "This CatalogFacade does not accept java.lang.reflect.Proxy instances: "
- + o);
- }
- return o;
- });
-
- setInnerResolver(repo(WorkspaceInfo.class), cast(outboundResolver), streamResolver);
- setInnerResolver(repo(NamespaceInfo.class), cast(outboundResolver), streamResolver);
- setInnerResolver(repo(StoreInfo.class), cast(outboundResolver), streamResolver);
- setInnerResolver(repo(ResourceInfo.class), cast(outboundResolver), streamResolver);
- setInnerResolver(repo(LayerInfo.class), cast(outboundResolver), streamResolver);
- setInnerResolver(repo(LayerGroupInfo.class), cast(outboundResolver), streamResolver);
- setInnerResolver(repo(StyleInfo.class), cast(outboundResolver), streamResolver);
- setInnerResolver(repo(MapInfo.class), cast(outboundResolver), streamResolver);
- }
-
- @SuppressWarnings("unchecked")
- private Function cast(Function f) {
- return (Function) f;
- }
-
- private CatalogClientRepository repo(Class type) {
- return facade().repository(type);
- }
-
- private void setInnerResolver( //
- CatalogClientRepository catalogClientRepository, //
- Function objectResolver, //
- Supplier> memoizingResolver) {
-
- catalogClientRepository.setObjectResolver(objectResolver);
- catalogClientRepository.setStreamResolver(memoizingResolver);
- }
-
- protected @Override RepositoryCatalogFacade facade() {
- return (RepositoryCatalogFacade) facade;
- }
-}
diff --git a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientConfiguration.java b/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientConfiguration.java
deleted file mode 100644
index 4471e57cf..000000000
--- a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientConfiguration.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.catalog.client.impl;
-
-import org.geoserver.catalog.plugin.RepositoryCatalogFacade;
-import org.geoserver.catalog.plugin.RepositoryCatalogFacadeImpl;
-import org.geoserver.cloud.catalog.client.reactivefeign.BlockingResourceStoreClient;
-import org.geoserver.cloud.catalog.client.reactivefeign.ReactiveConfigClient;
-import org.geoserver.cloud.catalog.client.reactivefeign.ReactiveResourceStoreClient;
-import org.geoserver.cloud.catalog.client.repository.CatalogClientConfigRepository;
-import org.geoserver.cloud.catalog.client.repository.CatalogClientLayerGroupRepository;
-import org.geoserver.cloud.catalog.client.repository.CatalogClientLayerRepository;
-import org.geoserver.cloud.catalog.client.repository.CatalogClientMapRepository;
-import org.geoserver.cloud.catalog.client.repository.CatalogClientNamespaceRepository;
-import org.geoserver.cloud.catalog.client.repository.CatalogClientRepositoryConfiguration;
-import org.geoserver.cloud.catalog.client.repository.CatalogClientResourceRepository;
-import org.geoserver.cloud.catalog.client.repository.CatalogClientStoreRepository;
-import org.geoserver.cloud.catalog.client.repository.CatalogClientStyleRepository;
-import org.geoserver.cloud.catalog.client.repository.CatalogClientWorkspaceRepository;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-
-@Configuration
-@Import(CatalogClientRepositoryConfiguration.class)
-public class CatalogClientConfiguration {
-
- private @Autowired CatalogClientWorkspaceRepository cloudWorkspaceRepository;
- private @Autowired CatalogClientNamespaceRepository cloudNamespaceRepository;
- private @Autowired CatalogClientStoreRepository cloudStoreRepository;
- private @Autowired CatalogClientResourceRepository cloudResourceRepository;
- private @Autowired CatalogClientLayerRepository cloudLayerRepository;
- private @Autowired CatalogClientLayerGroupRepository cloudLayerGroupRepository;
- private @Autowired CatalogClientStyleRepository cloudStyleRepository;
- private @Autowired CatalogClientMapRepository cloudMapRepository;
-
- private @Autowired ReactiveConfigClient configClient;
- private @Autowired ReactiveResourceStoreClient resourceStoreClient;
-
- @Bean
- CatalogClientCatalogFacade rawCatalogServiceFacade() {
- RepositoryCatalogFacade rawFacade = new RepositoryCatalogFacadeImpl();
- rawFacade.setWorkspaceRepository(cloudWorkspaceRepository);
- rawFacade.setNamespaceRepository(cloudNamespaceRepository);
- rawFacade.setStoreRepository(cloudStoreRepository);
- rawFacade.setResourceRepository(cloudResourceRepository);
- rawFacade.setLayerRepository(cloudLayerRepository);
- rawFacade.setLayerGroupRepository(cloudLayerGroupRepository);
- rawFacade.setStyleRepository(cloudStyleRepository);
- rawFacade.setMapRepository(cloudMapRepository);
-
- CatalogClientCatalogFacade facade = new CatalogClientCatalogFacade(rawFacade);
- return facade;
- }
-
- @Bean
- CatalogClientConfigRepository catalogServiceConfigRepository() {
- return new CatalogClientConfigRepository(configClient);
- }
-
- @Bean
- CatalogClientGeoServerFacade catalogServiceGeoServerFacade() {
- return new CatalogClientGeoServerFacade(catalogServiceConfigRepository());
- }
-
- @Bean
- CatalogClientResourceStore catalogServiceResourceStore() {
- BlockingResourceStoreClient blockingClient =
- new BlockingResourceStoreClient(resourceStoreClient);
- return new CatalogClientResourceStore(blockingClient);
- }
-
- // @ConditionalOnProperty(name = "reactive.feign.jetty", havingValue = "true")
- // @Bean JettyHttpClientFactory jettyHttpClientFactory() {
- // return new JettyHttpClientFactory() {
- //
- // @Override
- // public HttpClient build(boolean useHttp2) {
- // HttpClient httpClient = new HttpClient();
- // try {
- // httpClient.start();
- // } catch (Exception e) {
- // e.printStackTrace();
- // throw new RuntimeException(e);
- // }
- // return httpClient;
- // }
- // };
- // }
-}
diff --git a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientGeoServerFacade.java b/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientGeoServerFacade.java
deleted file mode 100644
index 01bd08134..000000000
--- a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientGeoServerFacade.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.catalog.client.impl;
-
-import org.geoserver.cloud.catalog.client.repository.CatalogClientConfigRepository;
-import org.geoserver.config.plugin.RepositoryGeoServerFacadeImpl;
-
-/** */
-public class CatalogClientGeoServerFacade extends RepositoryGeoServerFacadeImpl {
-
- public CatalogClientGeoServerFacade(CatalogClientConfigRepository repository) {
- super(repository);
- }
-}
diff --git a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientResource.java b/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientResource.java
deleted file mode 100644
index d9a01d624..000000000
--- a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientResource.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.catalog.client.impl;
-
-import com.google.common.io.ByteStreams;
-
-import lombok.AllArgsConstructor;
-import lombok.NonNull;
-
-import org.geoserver.cloud.catalog.client.reactivefeign.ReactiveResourceStoreClient;
-import org.geoserver.cloud.catalog.client.reactivefeign.ReactiveResourceStoreClient.ResourceDescriptor;
-import org.geoserver.platform.resource.Resource;
-import org.geoserver.platform.resource.ResourceListener;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UncheckedIOException;
-import java.nio.ByteBuffer;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.List;
-import java.util.Objects;
-
-/** */
-@AllArgsConstructor
-class CatalogClientResource implements Resource {
-
- private @NonNull ReactiveResourceStoreClient.ResourceDescriptor descriptor;
- private @NonNull CatalogClientResourceStore store;
-
- @Override
- public String path() {
- return descriptor.getPath();
- }
-
- @Override
- public void addListener(ResourceListener listener) {
- store.getResourceNotificationDispatcher().addListener(path(), listener);
- }
-
- @Override
- public void removeListener(ResourceListener listener) {
- store.getResourceNotificationDispatcher().removeListener(path(), listener);
- }
-
- @Override
- public String name() {
- return Paths.get(path()).getFileName().toString();
- }
-
- @Override
- public Lock lock() {
- return store.getLockProvider().acquire(path());
- }
-
- private byte[] toByteArray(org.springframework.core.io.Resource buff) {
- try (InputStream in = buff.getInputStream()) {
- byte[] array = ByteStreams.toByteArray(in);
- return array;
- } catch (IOException e) {
- throw new UncheckedIOException(e);
- }
- }
-
- @Override
- public byte[] getContents() throws IOException {
- org.springframework.core.io.Resource contents = store.getFileContent(path());
- return toByteArray(contents);
- }
-
- @Override
- public void setContents(byte[] contents) throws IOException {
- store.put(path(), ByteBuffer.wrap(contents));
- }
-
- @Override
- public InputStream in() {
- try {
- return new ByteArrayInputStream(getContents());
- } catch (IOException e) {
- throw new UncheckedIOException(e);
- }
- }
-
- @Override
- public OutputStream out() {
- return new ByteArrayOutputStream() {
- @Override
- public void close() throws IOException {
- ByteBuffer buff = ByteBuffer.wrap(super.buf, 0, super.count);
- store.put(path(), buff);
- }
- };
- }
-
- @Override
- public File file() {
- return store.file(this);
- }
-
- @Override
- public File dir() {
- return store.dir(this);
- }
-
- @Override
- public long lastmodified() {
- return descriptor.getLastModified();
- }
-
- @Override
- public Resource parent() {
- Path parentPath = Paths.get(path()).getParent();
- if (null == parentPath) {
- parentPath = Paths.get(org.geoserver.platform.resource.Paths.BASE); // root
- }
- return store.get(parentPath.toString());
- }
-
- @Override
- public Resource get(final String childName) {
- Objects.requireNonNull(childName, "Resource path required");
- if ("".equals(childName)) {
- return this;
- }
- Path path = Paths.get(path());
- Path child = path.resolve(childName);
- return store.get(child.toString());
- }
-
- @Override
- public List list() {
- return store.list(path()).map(Resource.class::cast).toList();
- }
-
- @Override
- public Type getType() {
- return descriptor.getType();
- }
-
- @Override
- public boolean delete() {
- boolean removed = store.remove(path());
- if (removed) {
- this.descriptor.setType(Type.UNDEFINED);
- }
- return removed;
- }
-
- @Override
- public boolean renameTo(Resource dest) {
- boolean moved = store.move(path(), dest.path());
- if (moved) {
- this.descriptor = store.get(dest.path()).getDescriptor();
- return true;
- }
- return moved;
- }
-
- @NonNull
- ResourceDescriptor getDescriptor() {
- return this.descriptor;
- }
-
- @Override
- public String toString() {
- return String.format(
- "%s[path: %s, type: %s, lastModified: %s, lockProvider: %s]",
- getClass().getSimpleName(),
- descriptor.getPath(),
- descriptor.getType(),
- descriptor.getLastModified(),
- store.getLockProvider().getClass().getSimpleName());
- }
-
- boolean isDirectory() {
- return getType() == Type.DIRECTORY;
- }
-
- boolean isFile() {
- return getType() == Type.RESOURCE;
- }
-
- boolean exists() {
- return getType() != Type.UNDEFINED;
- }
-}
diff --git a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientResourceStore.java b/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientResourceStore.java
deleted file mode 100644
index caefc98fd..000000000
--- a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/CatalogClientResourceStore.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.catalog.client.impl;
-
-import com.google.common.io.ByteStreams;
-
-import lombok.Getter;
-import lombok.NonNull;
-import lombok.Setter;
-import lombok.extern.slf4j.Slf4j;
-
-import org.geoserver.cloud.catalog.client.reactivefeign.BlockingResourceStoreClient;
-import org.geoserver.cloud.catalog.client.reactivefeign.ReactiveResourceStoreClient.ResourceDescriptor;
-import org.geoserver.platform.resource.FileSystemResourceStore;
-import org.geoserver.platform.resource.LockProvider;
-import org.geoserver.platform.resource.MemoryLockProvider;
-import org.geoserver.platform.resource.NullLockProvider;
-import org.geoserver.platform.resource.Resource;
-import org.geoserver.platform.resource.Resource.Lock;
-import org.geoserver.platform.resource.Resource.Type;
-import org.geoserver.platform.resource.ResourceListener;
-import org.geoserver.platform.resource.ResourceNotification;
-import org.geoserver.platform.resource.ResourceNotificationDispatcher;
-import org.geoserver.platform.resource.ResourceStore;
-import org.springframework.util.Assert;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UncheckedIOException;
-import java.nio.ByteBuffer;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.stream.Stream;
-
-/** */
-@Slf4j
-public class CatalogClientResourceStore implements ResourceStore {
- private static final NullLockProvider NULL_LOCK_PROVIDER = new NullLockProvider();
-
- /** LockProvider used to secure resources for exclusive access */
- private @Getter @Setter @NonNull LockProvider lockProvider = NULL_LOCK_PROVIDER;
-
- private final BlockingResourceStoreClient remoteStore;
- private FileSystemResourceStore localStore;
-
- /**
- * No-op notification dispatcher, resources are live-through-the-wire. May end up needing a
- * notification mechanism, but until proved differently, there seems to be no need for it.
- */
- private ResourceNotificationDispatcher resourceNotificationDispatcher =
- NullResourceNotificationDispatcher.INSTANCE;
-
- public CatalogClientResourceStore(@NonNull BlockingResourceStoreClient client) {
- this.remoteStore = client;
- Path localCache = getOrCreateDefaultLocalCacheDirectory();
- setLocalCacheDirectory(localCache.toFile());
- }
-
- protected Path getOrCreateDefaultLocalCacheDirectory() {
- Path tmpdir = Path.of(System.getProperty("java.io.tmpdir"));
- Path localCache = tmpdir.resolve("cngs/catalog-service/resource_store");
- if (!Files.isDirectory(localCache)) {
- try {
- Files.createDirectories(localCache);
- } catch (IOException e) {
- throw new IllegalStateException(
- "Unable to create catalog-service local resource cache directory "
- + localCache.toString(),
- e);
- }
- }
- return localCache;
- }
-
- public CatalogClientResourceStore(
- @NonNull BlockingResourceStoreClient client, @NonNull File localCache) {
- this.remoteStore = client;
- setLocalCacheDirectory(localCache);
- }
-
- public void setLocalCacheDirectory(File localCache) {
- this.localStore = createLocalStore(localCache);
- }
-
- private FileSystemResourceStore createLocalStore(@NonNull File localCache) {
- FileSystemResourceStore local =
- new FileSystemResourceStore(localCache) {
- @Override
- public ResourceNotificationDispatcher getResourceNotificationDispatcher() {
- return NullResourceNotificationDispatcher.INSTANCE;
- }
- };
- local.setLockProvider(new MemoryLockProvider(Runtime.getRuntime().availableProcessors()));
- return local;
- }
-
- private Map dumbCache = new ConcurrentHashMap<>();
-
- @Override
- public CatalogClientResource get(String path) {
- try {
- // ResourceDescriptor descriptor = remoteStore.describe(path);
- ResourceDescriptor descriptor = dumbCache.computeIfAbsent(path, remoteStore::describe);
- return toResource(descriptor);
- } catch (RuntimeException e) {
- e.printStackTrace();
- throw e;
- }
- }
-
- @Override
- public boolean remove(String path) {
- boolean deleted = remoteStore.delete(path);
- if (deleted) {
- localStore.get(path).delete();
- }
- return deleted;
- }
-
- @Override
- public boolean move(String path, String target) {
- ResourceDescriptor moved = remoteStore.move(path, target).orElse(null);
- localStore.move(path, target);
- return moved != null && target.equals(moved.getPath());
- }
-
- @Override
- public ResourceNotificationDispatcher getResourceNotificationDispatcher() {
- return resourceNotificationDispatcher;
- }
-
- private static class NullResourceNotificationDispatcher
- implements ResourceNotificationDispatcher {
-
- static final NullResourceNotificationDispatcher INSTANCE =
- new NullResourceNotificationDispatcher();
-
- @Override
- public void addListener(String resource, ResourceListener listener) {}
-
- @Override
- public boolean removeListener(String resource, ResourceListener listener) {
- return true;
- }
-
- @Override
- public void changed(ResourceNotification notification) {}
- }
-
- org.springframework.core.io.Resource getFileContent(String path) throws IOException {
- return remoteStore.getFileContent(path);
- }
-
- void put(String path, ByteBuffer contents) {
- remoteStore.put(path, contents);
- }
-
- Stream list(String path) {
- return remoteStore.list(path).map(this::toResource);
- }
-
- CatalogClientResource toResource(ResourceDescriptor descriptor) {
- return new CatalogClientResource(descriptor, this);
- }
-
- /**
- * @param catalogServiceResource
- * @return
- */
- File file(@NonNull CatalogClientResource resource) {
- final Resource local = localStore.get(resource.path());
- final CatalogClientResource remote = get(resource.path());
-
- if (remote.isDirectory()) {
- throw new IllegalStateException(remote.path() + " is a directory");
- }
-
- boolean localIsFile = Type.RESOURCE.equals(local.getType());
- boolean localAndRemoteUpToDate = resource.lastmodified() == local.lastmodified();
-
- if (localIsFile && localAndRemoteUpToDate) {
- return local.file();
- }
- Lock lock = resource.lock();
- try {
- return updateLocalFile(local, remote);
- } finally {
- lock.release();
- }
- }
-
- File dir(@NonNull CatalogClientResource resource) {
- final Resource local = localStore.get(resource.path());
- final CatalogClientResource remote = get(resource.path());
- if (!remote.exists()) {
- ResourceDescriptor descriptor = resource.getDescriptor();
- descriptor.setType(Type.DIRECTORY);
- ResourceDescriptor created = remoteStore.create(resource.path(), descriptor);
- resource = toResource(created);
- }
- if (remote.isFile()) {
- throw new IllegalStateException(remote.path() + " is a file, not a directory");
- }
- Lock lock = local.lock();
- try {
- boolean localIsDirectory = Type.DIRECTORY.equals(local.getType());
- if (localIsDirectory && !local.delete()) {
- throw new IllegalStateException(
- "Unable to delete local copy of directory " + resource.path());
- }
- File localDirectory = local.dir();
- boolean localAndRemoteUpToDate = resource.lastmodified() == local.lastmodified();
- if (!localAndRemoteUpToDate) {
- localDirectory.setLastModified(remote.lastmodified());
- }
- return localDirectory;
- } finally {
- lock.release();
- }
- }
-
- private File updateLocalFile(Resource local, CatalogClientResource remote) {
- boolean localExists = local.getType() != Type.UNDEFINED;
- if (localExists && !local.delete()) {
- throw new IllegalStateException(
- "Unable to delete local copy of resource at " + local.path());
- }
- File file = local.file(); // forces creation if doesn't exist
- if (remote.exists()) {
- final long lastModified = remote.lastmodified();
- Assert.state(
- lastModified > 0L,
- "remote resource claims to exist but last-modified is not set");
- log.debug(
- "Updating remote resource {} to local cache: {}",
- remote.path(),
- file.getAbsolutePath());
- try (InputStream in = remote.in();
- OutputStream out = local.out()) {
- ByteStreams.copy(in, out);
- log.debug("Local cache updated: {}", file.getAbsolutePath());
- } catch (IOException | RuntimeException e) {
- log.error(
- "Error trying to copy remote resource {} to local cache {}",
- remote.path(),
- file.getAbsolutePath(),
- e);
- local.delete();
- throw e instanceof IOException
- ? new UncheckedIOException((IOException) e)
- : (RuntimeException) e;
- }
- file.setLastModified(remote.lastmodified());
- long localLastModified = file.lastModified();
- Assert.state(
- lastModified == localLastModified,
- String.format(
- "last-modified time mismatch, expected %d, was %d",
- lastModified, localLastModified));
- }
-
- return file;
- }
-}
diff --git a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/DeferredResolvingProxy.java b/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/DeferredResolvingProxy.java
deleted file mode 100644
index 5668c22f5..000000000
--- a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/DeferredResolvingProxy.java
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.catalog.client.impl;
-
-/** */
-public class DeferredResolvingProxy {}
diff --git a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/InnerResolvingProxy.java b/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/InnerResolvingProxy.java
deleted file mode 100644
index 77625d4fb..000000000
--- a/src/catalog/catalog-server/client/src/main/java/org/geoserver/cloud/catalog/client/impl/InnerResolvingProxy.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the
- * GPL 2.0 license, available at the root application directory.
- */
-package org.geoserver.cloud.catalog.client.impl;
-
-import lombok.NonNull;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-
-import org.geoserver.catalog.Catalog;
-import org.geoserver.catalog.CatalogFacade;
-import org.geoserver.catalog.CatalogInfo;
-import org.geoserver.catalog.CoverageInfo;
-import org.geoserver.catalog.CoverageStoreInfo;
-import org.geoserver.catalog.DataStoreInfo;
-import org.geoserver.catalog.FeatureTypeInfo;
-import org.geoserver.catalog.Info;
-import org.geoserver.catalog.LayerGroupInfo;
-import org.geoserver.catalog.LayerInfo;
-import org.geoserver.catalog.MapInfo;
-import org.geoserver.catalog.NamespaceInfo;
-import org.geoserver.catalog.PublishedInfo;
-import org.geoserver.catalog.ResourceInfo;
-import org.geoserver.catalog.StoreInfo;
-import org.geoserver.catalog.StyleInfo;
-import org.geoserver.catalog.WorkspaceInfo;
-import org.geoserver.catalog.impl.LayerGroupInfoImpl;
-import org.geoserver.catalog.impl.LayerInfoImpl;
-import org.geoserver.catalog.impl.ModificationProxy;
-import org.geoserver.catalog.impl.ResolvingProxy;
-import org.geoserver.catalog.impl.ResourceInfoImpl;
-import org.geoserver.catalog.impl.StoreInfoImpl;
-import org.geoserver.catalog.plugin.Patch;
-import org.geoserver.config.GeoServerFacade;
-import org.geoserver.config.GeoServerInfo;
-import org.geoserver.config.LoggingInfo;
-import org.geoserver.config.ServiceInfo;
-import org.geoserver.config.SettingsInfo;
-import org.springframework.lang.Nullable;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Proxy;
-import java.util.HashSet;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Resolves {@link ResolvingProxy} references based only on {@link CatalogInfo#getId() id} using
- * {@link CatalogFacade} instead of {@link Catalog} like {@link ResolvingProxy#resolve(Catalog,
- * Object)}
- */
-@Slf4j
-@RequiredArgsConstructor
-@Deprecated
-public class InnerResolvingProxy {
-
- private final @NonNull CatalogFacade catalog;
- private final @Nullable GeoServerFacade config;
-
- private boolean failOnNotFound = false;
-
- /**
- * @param fail if {@code true}, a proxied {@link Info} reference that's not found in the catalog
- * will result in an {@link IllegalStateException}
- * @return {@code this}
- */
- public InnerResolvingProxy failOnMissingReference(boolean fail) {
- this.failOnNotFound = fail;
- return this;
- }
-
- public Patch resolve(Patch patch) {
- Patch resolved = new Patch();
- for (Patch.Property p : patch.getPatches()) {
- resolved.add(p.getName(), resolvePatchPropertyValue(p.getValue()));
- }
- return resolved;
- }
-
- private Object resolvePatchPropertyValue(Object orig) {
- if (orig instanceof Info info) {
- return resolve(info);
- }
- if (orig instanceof List) {
- @SuppressWarnings("unchecked")
- List