Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates #14

Merged
merged 9 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
112 changes: 112 additions & 0 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Build docker images

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
BRANCH: ${{ github.head_ref || github.ref_name }}

jobs:
build-geoserver-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get geoserver version from dockerfile
id: package_version
run: echo "version=$(grep -Pio '(?<=ARG VERSION=).*' ./geoserver/Dockerfile)" >> $GITHUB_OUTPUT

# On pull request
- name: Build and push GeoServer Docker image with version tag
uses: docker/build-push-action@v6
if: github.event_name == 'pull_request'
with:
context: "${{ github.workspace }}/geoserver/"
file: "${{ github.workspace }}/geoserver/Dockerfile"
push: true
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ghcr.io/geoblacklight/geoserver:${{ steps.package_version.outputs.version }}-dev

# On push to main
- name: Build and push GeoServer Docker image with version and latest tags
uses: docker/build-push-action@v6
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
with:
context: "${{ github.workspace }}/geoserver/"
file: "${{ github.workspace }}/geoserver/Dockerfile"
push: true
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/geoblacklight/geoserver:${{ steps.package_version.outputs.version }}
ghcr.io/geoblacklight/geoserver:latest

build-solr-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get solr version from dockerfile
id: package_version
run: echo "version=$(grep -Pio '(?<=ARG VERSION=).*' ./solr/Dockerfile)" >> $GITHUB_OUTPUT

# On pull request
- name: Build and push Solr Docker image with version tag
uses: docker/build-push-action@v6
if: github.event_name == 'pull_request'
with:
context: "${{ github.workspace }}/solr/"
file: "${{ github.workspace }}/solr/Dockerfile"
push: true
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ghcr.io/geoblacklight/solr:${{ steps.package_version.outputs.version }}-dev

# On push to main
- name: Build and push Solr Docker image with version and latest tags
uses: docker/build-push-action@v6
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
with:
context: "${{ github.workspace }}/solr/"
file: "${{ github.workspace }}/solr/Dockerfile"
push: true
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/geoblacklight/solr:${{ steps.package_version.outputs.version }}
ghcr.io/geoblacklight/solr:latest
19 changes: 19 additions & 0 deletions .github/workflows/prune-containers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Prune containers

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * SUN" # every sunday at midnight

jobs:
clean:
runs-on: ubuntu-latest
name: Delete old dev images
steps:
- uses: snok/[email protected]
with:
account: geoblacklight
image-names: "geoserver solr"
token: ${{ secrets.GITHUB_TOKEN }}
image-tags: "*dev"
cut-off: 2w
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.tool-versions
.DS_Store

# GeoServer
/geoserver/geoserver_data/logs/*.log
/geoserver/geoserver_data/gwc/tmp
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Docker Images for GeoBlacklight

- Solr
- GeoServer
4 changes: 4 additions & 0 deletions geoserver/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG VERSION=2.25.3
FROM docker.osgeo.org/geoserver:$VERSION
RUN rm -rf $GEOSERVER_DATA_DIR
ADD geoserver_data/ /opt/geoserver_data/
14 changes: 14 additions & 0 deletions geoserver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# GeoServer Docker Image for GeoBlacklight

## To update or add layers:
1. Run geoserver and mount geoserver_data directory
```
docker run -it -p8080:8080 \
--mount type=bind,src=./geoserver_data,target=/opt/geoserver_data \
ghcr.io/geoblacklight/geoserver:latest
```
1. Open localhost:8080/geoserver and login:
- user: admin
- pass: geoserver
1. Add any new data to the local geoserver_data/data/ directory
1. Update, add, or remove layers in the GeoServer UI.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[ERROR] - ESRITranslator - Error [InvalidForOne]: fragment[MD_MaintenanceInformation] clause: for-one clause: em:maintenanceAndUpdateFrequency(v:Subject, v:Code), v:CodeList = gmxRes:MD_MaintenanceFrequencyCode CallTemplateNode:58022302

[ERROR] - ESRITranslator - Error [InvalidForSome]: fragment[MD_FeatureCatalogueDescription] clause: for-some clause: em:featureCatalogueCitation(v:Resource, v:Object) <catCitation>

[ERROR] - ESRITranslator - Error [InvalidForOne]: fragment[MD_Distributor] clause: for-one clause: em:distributorContact(v:Subject, v:Object) <distorCont>

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PROJCS["NAD_1983_StatePlane_New_York_Long_Island_FIPS_3104_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",984250.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-74.0],PARAMETER["Standard_Parallel_1",40.66666666666666],PARAMETER["Standard_Parallel_2",41.03333333333333],PARAMETER["Latitude_Of_Origin",40.16666666666666],UNIT["Foot_US",0.3048006096012192]]
Binary file not shown.
Binary file not shown.
381 changes: 381 additions & 0 deletions geoserver/geoserver_data/data/nyu_2451_34564/nyu_2451_34564.shp.xml

Large diffs are not rendered by default.

Binary file not shown.
19 changes: 19 additions & 0 deletions geoserver/geoserver_data/demo/WCS_describeCoverage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- A sample describe request. The schema is generated automatically by -->
<!-- GeoServer. You can modify the schema with the web interface to hide -->
<!-- and/or require certain attributes. -->
<!--
If you change the "<Coverage>" tag below to the name of another
coverage, you can see the GML Schema for that layer.
The getCapabilities demo will tell you the names of all the layers!
-->
<DescribeCoverage
version="1.0.0"
service="WCS"
xmlns="http://www.opengis.net/wcs"
xmlns:nurc="http://www.nurc.nato.int"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wcs http://schemas.opengis.net/wcs/1.0.0/describeCoverage.xsd">

<Coverage>nurc:Pk50095</Coverage>

</DescribeCoverage>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wcs?service=WCS&version=2.0.1&request=describecoverage&coverageid=nurc__mosaic
9 changes: 9 additions & 0 deletions geoserver/geoserver_data/demo/WCS_describeCoverage_2.0.1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<wcs:DescribeCoverage service="WCS" version="2.0.1"
xmlns:wcs="http://www.opengis.net/wcs/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wcs/2.0 http://schemas.opengis.net/wcs/2.0/wcsAll.xsd">

<wcs:CoverageId>nurc__mosaic</wcs:CoverageId>
</wcs:DescribeCoverage>

18 changes: 18 additions & 0 deletions geoserver/geoserver_data/demo/WCS_getCapabilities.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- Gets the WCS capabilities. For WMS capabilities, see WMS_getCapabilities demo-->
<!--

This will briefly describe all the layers (Coverages) in that you have
in your WCS server, plus more generic information about what your server
supports.

For more information about a particular Coverage, use the
WCS_describeCoverage.xml demo!

-->
<GetCapabilities
service="WCS"
version="1.0.0"
xmlns="http://www.opengis.net/wcs"
xmlns:nurc="http://www.nurc.nato.int"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wcs http://schemas.opengis.net/wcs/1.0.0/wcsCapabilities.xsd"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wcs?SERVICE=WCS&REQUEST=GetCapabilities&VERSION=2.0.1
9 changes: 9 additions & 0 deletions geoserver/geoserver_data/demo/WCS_getCapabilities_2.0.1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<GetCapabilities
version="2.0.1"
service="WCS"
xmlns="http://www.opengis.net/wcs/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wcs/2.0 http://schemas.opengis.net/wcs/2.0/wcsGetCapabilities.xsd" />


38 changes: 38 additions & 0 deletions geoserver/geoserver_data/demo/WCS_getCoverage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!-- Performs a get coverage. Feel free to play with the elements, -->
<!-- to get different results. -->
<GetCoverage service="WCS" version="1.0.0"
xmlns="http://www.opengis.net/wcs"
xmlns:nurc="http://www.nurc.nato.int"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wcs http://schemas.opengis.net/wcs/1.0.0/getCoverage.xsd">
<sourceCoverage>nurc:Pk50095</sourceCoverage>
<domainSubset>
<spatialSubset>
<gml:Envelope srsName="EPSG:32633">
<gml:pos>347649.93086859107 5176214.082539256</gml:pos>
<gml:pos>370725.976428591 5196961.352859256</gml:pos>
</gml:Envelope>
<gml:Grid dimension="2" srsName="EPSG:4326">
<gml:limits>
<gml:GridEnvelope>
<gml:low>0 0</gml:low>
<gml:high>545 490</gml:high>
</gml:GridEnvelope>
</gml:limits>
<gml:axisName>E</gml:axisName>
<gml:axisName>N</gml:axisName>
</gml:Grid>
</spatialSubset>
</domainSubset>
<rangeSubset>
<axisSubset name="Band">
<singleValue>1</singleValue>
</axisSubset>
</rangeSubset>
<output>
<crs>EPSG:32633</crs>
<format>image/png</format>
</output>
</GetCoverage>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wcs?SERVICE=WCS&REQUEST=GetCoverage&VERSION=2.0.1&CoverageId=nurc__mosaic&compression=LZW&tiling=true&tileheight=256&tilewidth=256
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<wcs:GetCoverage service="WCS" version="2.0.1"
xmlns:wcs="http://www.opengis.net/wcs/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wcs/2.0 http://schemas.opengis.net/wcs/2.0/wcsAll.xsd">

<wcs:CoverageId>nurc__mosaic</wcs:CoverageId>
<wcs:format>application/gml+xml</wcs:format>

</wcs:GetCoverage>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wcs?SERVICE=WCS&REQUEST=GetCoverage&VERSION=2.0.1&CoverageId=nurc__mosaic&SCALEEXTENT=http://www.opengis.net/def/axis/OGC/1/i(0,1024),http://www.opengis.net/def/axis/OGC/1/j(0,1024)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wcs?SERVICE=WCS&REQUEST=GetCoverage&VERSION=2.0.1&CoverageId=nurc__mosaic&SCALEFACTOR=0.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Demonstrates use of WCS scale factor -->
<wcs:GetCoverage service="WCS" version="2.0.1"
xmlns:wcs="http://www.opengis.net/wcs/2.0" xmlns:scal="http://www.opengis.net/WCS_service-extension_scaling/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wcs/2.0 http://schemas.opengis.net/wcs/2.0/wcsAll.xsd">
<!--
The full schemaLocation permits schema-validation but causes the
request to fail [GEOS-7779]:
xsi:schemaLocation="http://www.opengis.net/wcs/2.0 http://schemas.opengis.net/wcs/2.0/wcsAll.xsd
http://www.opengis.net/WCS_service-extension_scaling/1.0 http://schemas.opengis.net/wcs/scaling/1.0/wcsScal.xsd">
-->
<wcs:Extension>
<scal:Scaling>
<scal:ScaleByFactor>
<scal:scaleFactor>0.5</scal:scaleFactor>
</scal:ScaleByFactor>
</scal:Scaling>
</wcs:Extension>
<wcs:CoverageId>nurc__mosaic</wcs:CoverageId>
</wcs:GetCoverage>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wcs?SERVICE=WCS&REQUEST=GetCoverage&VERSION=2.0.1&CoverageId=nurc__mosaic&SCALESIZE=http://www.opengis.net/def/axis/OGC/1/i(100),http://www.opengis.net/def/axis/OGC/1/j(100)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wcs?SERVICE=WCS&REQUEST=GetCoverage&VERSION=2.0.1&CoverageId=nurc__mosaic&subset=http://www.opengis.net/def/axis/OGC/0/E(412801.12,580844.55)&subset=http://www.opengis.net/def/axis/OGC/0/N(4261767.16,4816827.04)&SUBSETTINGCRS=http://www.opengis.net/def/crs/EPSG/0/32632&OUTPUTCRS=http://www.opengis.net/def/crs/EPSG/0/32632
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<wcs:GetCoverage service="WCS" version="2.0.1"
xmlns:wcs="http://www.opengis.net/wcs/2.0"
xmlns:crs="http://www.opengis.net/spec/WCS_service-extension_crs/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wcs/2.0 http://schemas.opengis.net/wcs/2.0/wcsAll.xsd">

<wcs:CoverageId>nurc__mosaic</wcs:CoverageId>
<wcs:DimensionTrim>
<wcs:Dimension>E</wcs:Dimension>
<wcs:TrimLow>412801.12</wcs:TrimLow>
<wcs:TrimHigh>580844.55</wcs:TrimHigh>
</wcs:DimensionTrim>
<wcs:DimensionTrim>
<wcs:Dimension>N</wcs:Dimension>
<wcs:TrimLow>4261767.16</wcs:TrimLow>
<wcs:TrimHigh>4816827.04</wcs:TrimHigh>
</wcs:DimensionTrim>
<wcs:Extension>
<crs:subsettingCrs>
http://www.opengis.net/def/crs/EPSG/0/32632
</crs:subsettingCrs>
<crs:outputCrs>
http://www.opengis.net/def/crs/EPSG/0/32632
</crs:outputCrs>
</wcs:Extension>

</wcs:GetCoverage>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wcs?SERVICE=WCS&REQUEST=GetCoverage&VERSION=2.0.1&CoverageId=nurc__mosaic&subset=http://www.opengis.net/def/axis/OGC/0/Long(8.0,10.0)&subset=http://www.opengis.net/def/axis/OGC/0/Lat(38.5,43.5)&SUBSETTINGCRS=http://www.opengis.net/def/crs/EPSG/0/4326
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<wcs:GetCoverage service="WCS" version="2.0.1"
xmlns:wcs="http://www.opengis.net/wcs/2.0"
xmlns:crs="http://www.opengis.net/spec/WCS_service-extension_crs/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wcs/2.0 http://schemas.opengis.net/wcs/2.0/wcsAll.xsd">

<wcs:CoverageId>nurc__mosaic</wcs:CoverageId>
<wcs:DimensionTrim>
<wcs:Dimension>Long</wcs:Dimension>
<wcs:TrimLow>8</wcs:TrimLow>
<wcs:TrimHigh>10</wcs:TrimHigh>
</wcs:DimensionTrim>
<wcs:DimensionTrim>
<wcs:Dimension>Lat</wcs:Dimension>
<wcs:TrimLow>38.5</wcs:TrimLow>
<wcs:TrimHigh>43.5</wcs:TrimHigh>
</wcs:DimensionTrim>
<wcs:Extension>
<crs:subsettingCrs>
http://www.opengis.net/def/crs/EPSG/0/4326
</crs:subsettingCrs>
</wcs:Extension>

</wcs:GetCoverage>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wcs?SERVICE=WCS&REQUEST=GetCoverage&VERSION=2.0.1&CoverageId=nurc__mosaic&RANGESUBSET=RED_BAND
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wcs?SERVICE=WCS&REQUEST=GetCoverage&VERSION=2.0.1&CoverageId=nurc__mosaic&RANGESUBSET=RED_BAND,BLUE_BAND,GREEN_BAND
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wcs?SERVICE=WCS&REQUEST=GetCoverage&VERSION=2.0.1&CoverageId=nurc__mosaic&RANGESUBSET=RED_BAND:GREEN_BAND
Loading