Skip to content

Commit

Permalink
add node services URI and fields (#445)
Browse files Browse the repository at this point in the history
## Overview

Add node services URI and fields.

## Changes

**Non-breaking changes**
- Node Services: Add definitions and variables for every service represented by
  the [DACCS-Climate/Marble-node-registry](https://github.com/DACCS-Climate/Marble-node-registry).

  - Add `version` field using the corresponding `<SERVICE>_VERSION` variables.
  - Add `types` field restricted by specific values instead of previous `keywords` expected to be extendable.
  - Add `<SERVICE>_IMAGE_URI` variables to provide `rel: service-meta` link for every service.

**Breaking changes**
- n/a

## Related Issue / Discussion

- Resolves #441
- Depends on DACCS-Climate/Marble-node-registry#40 to enforce validation
  • Loading branch information
fmigneault authored Apr 18, 2024
2 parents 9aa96cd + 5249a6b commit 5a54a1f
Show file tree
Hide file tree
Showing 37 changed files with 633 additions and 321 deletions.
6 changes: 3 additions & 3 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.1.3
current_version = 2.2.0
commit = True
tag = False
tag_name = {new_version}
Expand Down Expand Up @@ -30,11 +30,11 @@ search = {current_version}
replace = {new_version}

[bumpversion:file:RELEASE.txt]
search = {current_version} 2024-04-09T00:40:41Z
search = {current_version} 2024-04-18T15:04:09Z
replace = {new_version} {utcnow:%Y-%m-%dT%H:%M:%SZ}

[bumpversion:part:releaseTime]
values = 2024-04-09T00:40:41Z
values = 2024-04-18T15:04:09Z

[bumpversion:file(version):birdhouse/components/canarie-api/docker_configuration.py.template]
search = 'version': '{current_version}'
Expand Down
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@

[//]: # (list changes here, using '-' for each new entry, remove this when items are added)

[2.2.0](https://github.com/bird-house/birdhouse-deploy/tree/2.2.0) (2024-04-18)
------------------------------------------------------------------------------------------------------------------

## Changes

- Node Services: Add definitions and variables for every service represented by
the [DACCS-Climate/Marble-node-registry](https://github.com/DACCS-Climate/Marble-node-registry).

- Add `version` field using the corresponding `<SERVICE>_VERSION` variables.
- Add `types` field restricted by specific values instead of previous `keywords` expected to be extendable.
- Add `<SERVICE>_IMAGE_URI` variables to provide `rel: service-meta` link for every service.
- Update all `$schema` references of service node registry
to [1.2.0](https://github.com/DACCS-Climate/Marble-node-registry/releases/tag/1.2.0) instead of `main`.
During unit tests, specific `$schema` reference in the respective service configuration will be used for validation.

See [bird-house/birdhouse-deploy#441](https://github.com/bird-house/birdhouse-deploy/issues/441) for more details.

[2.1.3](https://github.com/bird-house/birdhouse-deploy/tree/2.1.3) (2024-04-09)
------------------------------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Generic variables
override SHELL := bash
override APP_NAME := birdhouse-deploy
override APP_VERSION := 2.1.3
override APP_VERSION := 2.2.0

# utility to remove comments after value of an option variable
override clean_opt = $(shell echo "$(1)" | $(_SED) -r -e "s/[ '$'\t'']+$$//g")
Expand Down
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ for a full-fledged production platform.
* - citation
- | |citation|

.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/2.1.3.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/2.2.0.svg
:alt: Commits since latest release
:target: https://github.com/bird-house/birdhouse-deploy/compare/2.1.3...master
:target: https://github.com/bird-house/birdhouse-deploy/compare/2.2.0...master

.. |latest-version| image:: https://img.shields.io/badge/tag-2.1.3-blue.svg?style=flat
.. |latest-version| image:: https://img.shields.io/badge/tag-2.2.0-blue.svg?style=flat
:alt: Latest Tag
:target: https://github.com/bird-house/birdhouse-deploy/tree/2.1.3
:target: https://github.com/bird-house/birdhouse-deploy/tree/2.2.0

.. |readthedocs| image:: https://readthedocs.org/projects/birdhouse-deploy/badge/?version=latest
:alt: ReadTheDocs Build Status (latest version)
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.3 2024-04-09T00:40:41Z
2.2.0 2024-04-18T15:04:09Z
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ SERVICES = {
# NOTE:
# Below version and release time auto-managed by 'make VERSION=x.y.z bump'.
# Do NOT modify it manually. See 'Tagging policy' in 'birdhouse/README.rst'.
'version': '2.1.3',
'releaseTime': '2024-04-09T00:40:41Z',
'version': '2.2.0',
'releaseTime': '2024-04-18T15:04:09Z',
'institution': '${SERVER_INSTITUTION}',
'researchSubject': '${SERVER_SUBJECT}',
'supportEmail': '${SUPPORT_EMAIL}',
Expand Down Expand Up @@ -142,8 +142,8 @@ PLATFORMS = {
# NOTE:
# Below version and release time auto-managed by 'make VERSION=x.y.z bump'.
# Do NOT modify it manually. See 'Tagging policy' in 'birdhouse/README.rst'.
'version': '2.1.3',
'releaseTime': '2024-04-09T00:40:41Z',
'version': '2.2.0',
'releaseTime': '2024-04-18T15:04:09Z',
'institution': '${SERVER_INSTITUTION}',
'researchSubject': '${SERVER_SUBJECT}',
'supportEmail': '${SUPPORT_EMAIL}',
Expand Down
13 changes: 12 additions & 1 deletion birdhouse/components/finch/default.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
# are applied and must be added to the list of DELAYED_EVAL.

export FINCH_VERSION=0.9.2
export FINCH_IMAGE="birdhouse/finch:version-${FINCH_VERSION}"
export FINCH_DOCKER=birdhouse/finch
export FINCH_IMAGE='${FINCH_DOCKER}:version-${FINCH_VERSION}'
export FINCH_IMAGE_URI='registry.hub.docker.com/${FINCH_IMAGE}'

# This tells the postgres service to create a database on startup
export POSTGRES_DATABASES_TO_CREATE="
Expand All @@ -25,7 +27,16 @@ COMPONENT_DEPENDENCIES="
./components/postgres
"

export DELAYED_EVAL="
$DELAYED_EVAL
FINCH_IMAGE
FINCH_IMAGE_URI
"

OPTIONAL_VARS="
$OPTIONAL_VARS
\$FINCH_VERSION
\$FINCH_DOCKER
\$FINCH_IMAGE
\$FINCH_IMAGE_URI
"
61 changes: 36 additions & 25 deletions birdhouse/components/finch/service-config.json.template
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
{
"$schema": "https://raw.githubusercontent.com/DACCS-Climate/Marble-node-registry/main/node_registry.schema.json#service",
"name": "finch",
"keywords": [
"service-wps"
],
"description": "A Web Processing Service for Climate Indicators.",
"links": [
{
"rel": "service",
"type": "text/xml",
"href": "https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/finch?service=WPS&request=GetCapabilities"
},
{
"rel": "service-doc",
"type": "text/html",
"href": "https://finch.readthedocs.io"
},
{
"rel": "service-desc",
"type": "text/xml",
"href": "https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/finch?service=WPS&request=GetCapabilities"
}
]
}
[
{
"$schema": "https://raw.githubusercontent.com/DACCS-Climate/Marble-node-registry/1.2.0/node_registry.schema.json#service",
"name": "finch",
"version": "${FINCH_VERSION}",
"types": [
"wps"
],
"keywords": [
"service-wps"
],
"description": "A Web Processing Service for Climate Indicators.",
"links": [
{
"rel": "service",
"type": "text/xml",
"href": "https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/finch?service=WPS&request=GetCapabilities"
},
{
"rel": "service-doc",
"type": "text/html",
"href": "https://finch.readthedocs.io"
},
{
"rel": "service-desc",
"type": "text/xml",
"href": "https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/finch?service=WPS&request=GetCapabilities"
},
{
"rel": "service-meta",
"type": "application/vnd.oci.image.index.v1+json",
"href": "${FINCH_IMAGE_URI}"
}
]
}
]
6 changes: 5 additions & 1 deletion birdhouse/components/geoserver/default.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
export GEOSERVER_DOCKER=pavics/geoserver
export GEOSERVER_VERSION=2.22.2
export GEOSERVER_TAGGED=2.22.2-kartoza-build20230226-r7-allow-change-context-root-and-fix-missing-stable-plugins-and-avoid-chown-datadir
export GEOSERVER_IMAGE="${GEOSERVER_DOCKER}:${GEOSERVER_TAGGED}"
export GEOSERVER_IMAGE='${GEOSERVER_DOCKER}:${GEOSERVER_TAGGED}'
export GEOSERVER_IMAGE_URI='registry.hub.docker.com/${GEOSERVER_IMAGE}'

export GEOSERVER_ADMIN_USER="admin"

Expand All @@ -34,6 +35,8 @@ export DELAYED_EVAL="
$DELAYED_EVAL
GEOSERVER_DATA_DIR
GEOSERVER_SKIP_AUTH_PROXY_INCLUDE
GEOSERVER_IMAGE
GEOSERVER_IMAGE_URI
"

# add any new variables not already in 'VARS' or 'OPTIONAL_VARS' that must be replaced in templates here
Expand All @@ -49,5 +52,6 @@ OPTIONAL_VARS="
\$GEOSERVER_VERSION
\$GEOSERVER_TAGGED
\$GEOSERVER_IMAGE
\$GEOSERVER_IMAGE_URI
\$GEOSERVER_SKIP_AUTH_PROXY_INCLUDE
"
60 changes: 37 additions & 23 deletions birdhouse/components/geoserver/service-config.json.template
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
{
"$schema": "https://raw.githubusercontent.com/DACCS-Climate/Marble-node-registry/main/node_registry.schema.json#service",
"name": "geoserver",
"keywords": [
"data",
"service-wms",
"service-wfs",
"service-wps"
],
"description": "GeoServer is a server that allows users to view and edit geospatial data.",
"links": [
{
"rel": "service",
"type": "text/html",
"href": "https://${PAVICS_FQDN_PUBLIC}/geoserver/"
},
{
"rel": "service-doc",
"type": "text/html",
"href": "https://docs.geoserver.org/"
}
]
}
[
{
"$schema": "https://raw.githubusercontent.com/DACCS-Climate/Marble-node-registry/1.2.0/node_registry.schema.json#service",
"name": "geoserver",
"version": "${GEOSERVER_VERSION}",
"types": [
"data",
"wms",
"wfs",
"wps"
],
"keywords": [
"data",
"service-wms",
"service-wfs",
"service-wps"
],
"description": "GeoServer is a server that allows users to view and edit geospatial data.",
"links": [
{
"rel": "service",
"type": "text/html",
"href": "https://${PAVICS_FQDN_PUBLIC}/geoserver/"
},
{
"rel": "service-doc",
"type": "text/html",
"href": "https://docs.geoserver.org/"
},
{
"rel": "service-meta",
"type": "application/vnd.oci.image.index.v1+json",
"href": "${GEOSERVER_IMAGE_URI}"
}
]
}
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
HUMMINGBIRD_TAGGED = "${HUMMINGBIRD_TAGGED}"
HUMMINGBIRD_VERSION = "${HUMMINGBIRD_VERSION}"
HUMMINGBIRD_RELEASE = get_release_time_from_repo_tag("docker", "pavics/hummingbird", HUMMINGBIRD_VERSION)
HUMMINGBIRD_RELEASE = get_release_time_from_repo_tag("docker", "pavics/hummingbird", HUMMINGBIRD_TAGGED)

SERVICES['hummingbird'] = {
'info': {
Expand Down
19 changes: 18 additions & 1 deletion birdhouse/components/hummingbird/default.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
export HUMMINGBIRD_VERSION=0.5_dev
# note: minor adjustments for 'version' field of service
# - version must include patch (https://semver.org/#spec-item-2)
# - pattern does not allow '_' (https://semver.org/#spec-item-9)
export HUMMINGBIRD_VERSION=0.5.0-dev
export HUMMINGBIRD_TAGGED=0.5_dev
export HUMMINGBIRD_DOCKER=pavics/hummingbird
export HUMMINGBIRD_IMAGE='${HUMMINGBIRD_DOCKER}:${HUMMINGBIRD_TAGGED}'
export HUMMINGBIRD_IMAGE_URI='registry.hub.docker.com/${HUMMINGBIRD_IMAGE}'

# This tells the postgres service to create a database on startup
export POSTGRES_DATABASES_TO_CREATE="
Expand All @@ -19,7 +26,17 @@ COMPONENT_DEPENDENCIES="
./components/data-volume
"

export DELAYED_EVAL="
$DELAYED_EVAL
HUMMINGBIRD_IMAGE
HUMMINGBIRD_IMAGE_URI
"

OPTIONAL_VARS="
$OPTIONAL_VARS
\$HUMMINGBIRD_VERSION
\$HUMMINGBIRD_DOCKER
\$HUMMINGBIRD_TAGGED
\$HUMMINGBIRD_IMAGE
\$HUMMINGBIRD_IMAGE_URI
"
2 changes: 1 addition & 1 deletion birdhouse/components/hummingbird/docker-compose-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ x-logging:

services:
hummingbird:
image: pavics/hummingbird:${HUMMINGBIRD_VERSION}
image: ${HUMMINGBIRD_IMAGE}
container_name: hummingbird
environment:
HOSTNAME: $HOSTNAME
Expand Down
61 changes: 36 additions & 25 deletions birdhouse/components/hummingbird/service-config.json.template
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
{
"$schema": "https://raw.githubusercontent.com/DACCS-Climate/Marble-node-registry/main/node_registry.schema.json#service",
"name": "hummingbird",
"keywords": [
"service-wps"
],
"description": "A WPS for metadata compliance checks used in the climate science community.",
"links": [
{
"rel": "service",
"type": "text/xml",
"href": "https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/hummingbird?service=WPS&request=GetCapabilities"
},
{
"rel": "service-doc",
"type": "text/html",
"href": "https://birdhouse-hummingbird.readthedocs.io"
},
{
"rel": "service-desc",
"type": "text/xml",
"href": "https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/hummingbird?service=WPS&request=GetCapabilities"
}
]
}
[
{
"$schema": "https://raw.githubusercontent.com/DACCS-Climate/Marble-node-registry/1.2.0/node_registry.schema.json#service",
"name": "hummingbird",
"version": "${HUMMINGBIRD_VERSION}",
"types": [
"wps"
],
"keywords": [
"service-wps"
],
"description": "A WPS for metadata compliance checks used in the climate science community.",
"links": [
{
"rel": "service",
"type": "text/xml",
"href": "https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/hummingbird?service=WPS&request=GetCapabilities"
},
{
"rel": "service-doc",
"type": "text/html",
"href": "https://birdhouse-hummingbird.readthedocs.io"
},
{
"rel": "service-desc",
"type": "text/xml",
"href": "https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/hummingbird?service=WPS&request=GetCapabilities"
},
{
"rel": "service-meta",
"type": "application/vnd.oci.image.index.v1+json",
"href": "${HUMMINGBIRD_IMAGE_URI}"
}
]
}
]
Loading

0 comments on commit 5a54a1f

Please sign in to comment.