Skip to content

Commit

Permalink
Merge pull request #305 from groldan/build/upgrade_geoserver
Browse files Browse the repository at this point in the history
Upgrade geoserver to 2.22.2
  • Loading branch information
groldan authored Mar 1, 2023
2 parents b707879 + 3a48ecd commit ceecb70
Show file tree
Hide file tree
Showing 12 changed files with 116 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ on:

jobs:
build:
if: github.repository == 'geoserver/geoserver-cloud'
name: Build and Push
runs-on:
- ubuntu-latest
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Login to Docker Hub
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Validate source code formatting
run: make lint

- name: Build GeoServer 2.22.1-CLOUD
- name: Build customized GeoServer version
run: |
make deps
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Builds and pushes docker images on main and tags

name: Build on any branch
on:
push:
branches:
- '*'
- "!main"
paths:
- "Makefile"
- "pom.xml"
- ".github/workflows/build.yaml"
- "geoserver_submodule/**"
- "src/**"

jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'

- name: Validate source code formatting
run: make lint

- name: Build customized GeoServer version
run: |
make deps
- name: Build and test
run: |
make install test
- name: Build docker images
run: |
make build-image
- name: Remove project jars from cached repository
run: |
rm -rf .m2/repository/org/geoserver
6 changes: 3 additions & 3 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:

jobs:
build:
name: Build and Test
runs-on:
- ubuntu-latest
name: Build and Test Pull Request
if: github.repository == 'geoserver/geoserver-cloud'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all: deps install test docker
all: deps install test build-image

# run `make build-image[-*] SKIP_PUSH=false` to push the images to dockerhub
SKIP_PUSH?="true"
Expand Down
34 changes: 34 additions & 0 deletions docker-compose-jdbcconfig.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version: "3.8"

volumes:
postgresql_config_data: # volume for postgresql data, used to store the geoserver config through jdbcconfig

#
# Configures all geoserver services to use the postgresql database server with jdbcconfig as catalog backend.
# Run with `docker-compose --compatibility -f docker-compose.yml -f docker-compose-jdbcconfig.yml up -d`
Expand All @@ -8,45 +11,76 @@ version: "3.8"
services:
#catalog:
# command: echo "catalog-service disabled."
database:
# be sure geoserver.backend.jdbcconfig.initdb is set to true in application.yml at lease for the first app run
image: postgres:13-alpine
environment:
POSTGRES_DB: "${JDBCCONFIG_DBNAME}"
POSTGRES_USER: "${JDBCCONFIG_USERNAME}"
POSTGRES_PASSWORD: "${JDBCCONFIG_PASSWORD}"
ports:
- 54321:5432
networks:
- gs-cloud-network
volumes:
- postgresql_config_data:/var/lib/postgresql/data
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G


wfs:
environment:
SPRING_PROFILES_ACTIVE: "jdbcconfig"
JDBCCONFIG_URL: "${JDBCCONFIG_URL}"
JDBCCONFIG_USERNAME: "${JDBCCONFIG_USERNAME}"
JDBCCONFIG_PASSWORD: "${JDBCCONFIG_PASSWORD}"
depends_on:
- database

wms:
environment:
SPRING_PROFILES_ACTIVE: "jdbcconfig"
JDBCCONFIG_URL: "${JDBCCONFIG_URL}"
JDBCCONFIG_USERNAME: "${JDBCCONFIG_USERNAME}"
JDBCCONFIG_PASSWORD: "${JDBCCONFIG_PASSWORD}"
depends_on:
- database

wcs:
environment:
SPRING_PROFILES_ACTIVE: "jdbcconfig"
JDBCCONFIG_URL: "${JDBCCONFIG_URL}"
JDBCCONFIG_USERNAME: "${JDBCCONFIG_USERNAME}"
JDBCCONFIG_PASSWORD: "${JDBCCONFIG_PASSWORD}"
depends_on:
- database

rest:
environment:
SPRING_PROFILES_ACTIVE: "jdbcconfig"
JDBCCONFIG_URL: "${JDBCCONFIG_URL}"
JDBCCONFIG_USERNAME: "${JDBCCONFIG_USERNAME}"
JDBCCONFIG_PASSWORD: "${JDBCCONFIG_PASSWORD}"
depends_on:
- database

webui:
environment:
SPRING_PROFILES_ACTIVE: "jdbcconfig"
JDBCCONFIG_URL: "${JDBCCONFIG_URL}"
JDBCCONFIG_USERNAME: "${JDBCCONFIG_USERNAME}"
JDBCCONFIG_PASSWORD: "${JDBCCONFIG_PASSWORD}"
depends_on:
- database

gwc:
environment:
SPRING_PROFILES_ACTIVE: "jdbcconfig"
JDBCCONFIG_URL: "${JDBCCONFIG_URL}"
JDBCCONFIG_USERNAME: "${JDBCCONFIG_USERNAME}"
JDBCCONFIG_PASSWORD: "${JDBCCONFIG_PASSWORD}"
depends_on:
- database
21 changes: 0 additions & 21 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: "3.8"

volumes:
postgresql_config_data: # volume for postgresql data, used to store the geoserver config through jdbcconfig
rabbitmq_data: # volume for rabbitmq data, so it doesn't create an anonymous one on each container
postgis_data:
geowebcache_data:
Expand Down Expand Up @@ -47,25 +46,6 @@ services:
cpus: '2.0'
memory: 1G

database:
# be sure geoserver.backend.jdbcconfig.initdb is set to true in application.yml at lease for the first app run
image: postgres:13-alpine
environment:
POSTGRES_DB: "${JDBCCONFIG_DBNAME}"
POSTGRES_USER: "${JDBCCONFIG_USERNAME}"
POSTGRES_PASSWORD: "${JDBCCONFIG_PASSWORD}"
ports:
- 54321:5432
networks:
- gs-cloud-network
volumes:
- postgresql_config_data:/var/lib/postgresql/data
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G

# Eureka service discovery. This is a Discovery First Bootstrap configuration.
# The discovery service is the only fixed entry point.
# Browse to http://localhost:8761 to check all services are registered.
Expand Down Expand Up @@ -160,7 +140,6 @@ services:
# user: ${GS_USER}
# depends_on:
# - config
# - database
# - rabbitmq
# environment:
# # Force the max RAM (-XX:MaxRAM) seen by the JVM in case --compatibility wasn't used to launch the composition
Expand Down
2 changes: 1 addition & 1 deletion geoserver_submodule/geoserver
2 changes: 1 addition & 1 deletion geoserver_submodule/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<module>geoserver/src/community/jdbcconfig</module>
<module>geoserver/src/community/jdbcstore</module>
<module>geoserver/src/community/pgraster</module>
<module>geoserver/src/community/datadir-catalog-loader</module>
<!-- all other required deps -->
<module>geoserver/src/extension/authkey</module>
<module>geoserver/src/extension/web-resource</module>
Expand All @@ -28,6 +29,5 @@
<module>geoserver/src/community/flatgeobuf</module>
<module>geoserver/src/community/gwc-azure-blob</module>
<module>geoserver/src/community/cog</module>
<module>geoserver/src/community/datadir-catalog-loader</module>
</modules>
</project>
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,17 @@
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
</repository>
<repository>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
</repository>
<repository>
<releases>
<enabled>true</enabled>
Expand All @@ -238,6 +249,10 @@
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
</pluginRepository>
<pluginRepository>
<id>spring-snapshots</id>
<url>https://repo.spring.io/snapshot</url>
</pluginRepository>
</pluginRepositories>
<build>
<pluginManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
class CloudJdbcConfigDatabase extends ConfigDatabase {

public CloudJdbcConfigDatabase(
final CloudJdbcConfigProperties config,
final DataSource dataSource,
final XStreamInfoSerialBinding binding,
final CacheProvider cacheProvider) {
super(dataSource, binding, cacheProvider);
super(config, dataSource, binding, cacheProvider);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,12 @@ private ResourceCache jdbcResourceCache() {

@DependsOn({"jdbcConfigDataSourceStartupValidator", "jdbcConfigDataSource"})
public @Bean(name = "JDBCConfigDB") ConfigDatabase jdbcConfigDB() {
CloudJdbcConfigProperties config = jdbcConfigProperties();
DataSource dataSource = jdbcConfigDataSource();
XStreamInfoSerialBinding binding = jdbcPersistenceBinding();
CacheProvider cacheProvider = jdbcCacheProvider();
ConfigDatabase configDb = new CloudJdbcConfigDatabase(dataSource, binding, cacheProvider);
ConfigDatabase configDb =
new CloudJdbcConfigDatabase(config, dataSource, binding, cacheProvider);
return configDb;
}

Expand Down
6 changes: 3 additions & 3 deletions src/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<spring-cloud.version>2021.0.5</spring-cloud.version>
<spring-boot.version>2.6.14</spring-boot.version>
<feign-reactor.version>3.2.6</feign-reactor.version>
<gs.version>2.22.1-CLOUD</gs.version>
<gs.community.version>2.22.1-CLOUD</gs.community.version>
<gt.version>28.1</gt.version>
<gs.version>2.22.3-SNAPSHOT</gs.version>
<gs.community.version>2.22.3-SNAPSHOT</gs.community.version>
<gt.version>28-SNAPSHOT</gt.version>
<lombok.version>1.18.24</lombok.version>
<mapstruct.version>1.4.2.Final</mapstruct.version>
<fork.javac>true</fork.javac>
Expand Down

0 comments on commit ceecb70

Please sign in to comment.