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

add node services URI and fields #445

Merged
merged 12 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@
[Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest)
------------------------------------------------------------------------------------------------------------------

[//]: # (list changes here, using '-' for each new entry, remove this when items are added)
## 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
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
fmigneault marked this conversation as resolved.
Show resolved Hide resolved
\$HUMMINGBIRD_IMAGE_URI
"
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}"
}
]
}
]
6 changes: 6 additions & 0 deletions birdhouse/components/jupyterhub/default.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

export JUPYTERHUB_DOCKER=pavics/jupyterhub
export JUPYTERHUB_VERSION=4.1.4-20240408
export JUPYTERHUB_IMAGE='${JUPYTERHUB_DOCKER}:${JUPYTERHUB_VERSION}'
export JUPYTERHUB_IMAGE_URI='registry.hub.docker.com/${JUPYTERHUB_IMAGE}'

# Jupyter single-user server images, can be overriden in env.local to have a space separated list of multiple images
export DOCKER_NOTEBOOK_IMAGES="pavics/workflow-tests:py39-230601-1-update240116"
Expand Down Expand Up @@ -75,6 +77,8 @@ export DELAYED_EVAL="
$DELAYED_EVAL
JUPYTERHUB_USER_DATA_DIR
JUPYTERHUB_ADMIN_USERS
JUPYTERHUB_IMAGE
JUPYTERHUB_IMAGE_URI
"

# add any new variables not already in 'VARS' or 'OPTIONAL_VARS' that must be replaced in templates here
Expand All @@ -93,6 +97,8 @@ OPTIONAL_VARS="
\$JUPYTERHUB_CONFIG_OVERRIDE
\$JUPYTERHUB_DOCKER
\$JUPYTERHUB_VERSION
\$JUPYTERHUB_IMAGE
\$JUPYTERHUB_IMAGE_URI
\$JUPYTERHUB_AUTHENTICATOR_AUTHORIZATION_URL
\$JUPYTERHUB_AUTHENTICATOR_REFRESH_AGE
\$JUPYTER_IDLE_SERVER_CULL_TIMEOUT
Expand Down
2 changes: 1 addition & 1 deletion birdhouse/components/jupyterhub/docker-compose-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ x-logging:

services:
jupyterhub:
image: ${JUPYTERHUB_DOCKER}:${JUPYTERHUB_VERSION}
image: ${JUPYTERHUB_IMAGE}
container_name: jupyterhub
hostname: jupyterhub
environment:
Expand Down
51 changes: 31 additions & 20 deletions birdhouse/components/jupyterhub/service-config.json.template
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
{
"$schema": "https://raw.githubusercontent.com/DACCS-Climate/Marble-node-registry/main/node_registry.schema.json#service",
"name": "jupyterhub",
"keywords": [
"jupyterhub"
],
"description": "An interactive development environment use to create and share documents that contain live code.",
"links": [
{
"rel": "service",
"type": "text/html",
"href": "https://${PAVICS_FQDN_PUBLIC}/jupyter"
},
{
"rel": "service-doc",
"type": "text/html",
"href": "https://jupyter.org/hub"
}
]
}
[
{
"$schema": "https://raw.githubusercontent.com/DACCS-Climate/Marble-node-registry/1.2.0/node_registry.schema.json#service",
"name": "jupyterhub",
"version": "${JUPYTERHUB_VERSION}",
"types": [
"jupyterhub"
],
"keywords": [
"jupyterhub"
],
"description": "An interactive development environment use to create and share documents that contain live code.",
"links": [
{
"rel": "service",
"type": "text/html",
"href": "https://${PAVICS_FQDN_PUBLIC}/jupyter"
},
{
"rel": "service-doc",
"type": "text/html",
"href": "https://jupyter.org/hub"
},
{
"rel": "service-meta",
"type": "application/vnd.oci.image.index.v1+json",
"href": "${JUPYTERHUB_IMAGE_URI}"
}
]
}
]
Loading
Loading