Prepare Your Service Info¶
Synopsis¶
Every GA4GH service answers GET /service-info with what it says about
itself: its identifier, name, API type, organization, contacts and
environment. The Cloud Registry of the ELIXIR
On-Cloud reads it when you register a service, and again every day to keep
the entry up to date.
Importing your service's own service info, with sync on, is the way to register a service here. This page tells you how to set the service info so that the import passes the rules of this deployment, how to check it before you import, and what to do where the service info can't be set yet. Entering the values by hand is the fallback.
For how the import and sync work, see Using the Cloud Registry and the registry's docs on Importing service info and Synced services.
The rules of this deployment¶
The registry publishes the rules that it enforces in its own service info,
under registrationRules (see Registration rules). Read them
there rather than from this page, as admins can change them:
At the time of writing, the rules are:
environments:prodandtestonly;urlSchemes:httpsonly;serviceTypes:controlled: only admins add API types, so your service's type must be one of the registered types. The types are a controlled, case-sensitive vocabulary: the admins don't add case variants of registered types (for example,TESnext totes), so your service must report the type exactly as registered.
List the registered types with:
Checklist¶
The endpoint:
-
GET <base URL>/service-infoanswers200 OKwithout a token: the registry never sends one. With access control on, keep this endpoint public. - The address is an
httpsURL, with a valid certificate for the host, and the host has public addresses only. - It answers without redirects, within 10 seconds, with at most 256 KiB.
- The base URL is the URL of your API, for example,
https://tes.example.org/ga4gh/tes/v1: the registry registers the import address without/service-info.
The fields (see Registrations for the limits of their lengths):
-
id: unique and stable, in reverse domain notation, for example,org.example.tes, not the default of your product. The import needs it, and sync checks that it stays the same. -
name: the name of your service, following the recommended naming, for example, "TESK". -
description: what the service offers, and to whom. -
type:group,artifactandversionof one of the registered types, for example,org.ga4gh,tes,1.1.0, as registered here at the time of writing. Types are compared as written, so report the type exactly as registered: case variants such asTESaren't added. If your service implements an API, or a version of it, that isn't registered yet, ask the admins to add it before you import. -
organization: thenameandurlof the organization that hosts your service (see Names and organizations), and no other fields. -
contactUrl: where users get support, an HTTP(S) ormailto:URL, for example,mailto:tes@example.org. -
documentationUrl: documentation for the users of your service. -
environment: one of the allowed environments,prodfor a production service,testfor a test service. The values are case-sensitive. -
version: the version of your service's software.
The import needs id, name, type, organization and version. It
reads and checks all the fields above, environment too, and ignores fields
that aren't on this list (for example, createdAt or storage).
Names and organizations¶
Users find services in the registry and in clients by their names. We recommend the following, so that entries look alike; it is a recommendation, not a rule, and the registry doesn't enforce it: you may name your service and your organization as you like.
Services of a Node: name is the name of the implementation only, as
its project writes it, for example, TESK, Poiesis or Funnel. organization
is the organization that actually hosts the service, with its name and URL
as it writes them. For example:
| Service | name |
organization |
|---|---|---|
| TESK at CSC in Finland | TESK |
CSC – IT Center for Science, https://www.csc.fi |
| TESK at CERIT-SC in the Czech Republic | TESK |
CERIT Scientific Cloud, https://www.cerit-sc.cz/ |
| TESK at MyUni in the United Kingdom | TESK |
My University, https://example.org/ |
Don't repeat in name what other fields already say: the host is in
organization, and environment says whether it is a test service, so
leave out the host, its country, "test" and the name of the cluster. Say
more in description, for example, the cluster and who can use the service.
Central services of the ELIXIR On-Cloud, such as the Service Registry,
the Tool Registry and the TES Gateway, keep names that start with
"ELIXIR On-Cloud" and carry ELIXIR On-Cloud and
https://elixir-on.cloud/ as organization, although the ELIXIR On-Cloud
doesn't host them itself.
Setting it per product¶
TESK¶
From chart 0.3.0, set the service info in the chart's values, under
serviceInfo (see Service info in the TESK docs). The
chart sets type and version itself:
serviceInfo:
id: org.example.tes
name: TESK
description: TES of MyUni for the members of its research groups
organization:
name: My University
url: https://example.org/
contactUrl: mailto:tes@example.org
documentationUrl: https://example.org/tes/
environment: prod
The chart's defaults describe no particular deployment, and its default
environment, dev, isn't allowed here. Keep auth.serviceInfoPublic at its
default, true, so that the endpoint stays public with auth.mode: auth.
TESK serves the registered type org.ga4gh / tes, as the TES
specification requires.
proTES, TRS-Filer and other FOCA apps¶
Apps built with FOCA serve the service info from
service_info.service of their config, and set version from the
installed package. Their base config describes the app, with placeholders:
set id, name, description, organization, contactUrl and
environment in a config overlay.
- proTES: in the chart's values, under
config.service_info.service(see Service info). - TRS-Filer 0.5.0: in a config overlay of your own, as the chart has no value for it yet (see Service info).
Funnel, Poiesis and TESP API¶
The service info of these products can't be set yet: their code fixes the identifier, the organization and other fields for every deployment. Register them by hand until the linked issues are resolved.
| Product | What it serves | Import | Issue |
|---|---|---|---|
| Funnel 0.12.3 | id: org.ga4gh.funnel, environment: development; only name can be set |
refused (environment) |
calypr/funnel#1493: fixed by calypr/funnel#1495, not released after 0.12.3 |
| Poiesis 0.2.0 | id: org.ga4gh.poiesis and the project's organization and contacts, no environment |
can pass, but describes the project, not your Node | JaeAeich/poiesis#112 |
| TESP API 0.2.0 | id: fi.muni.cz.tesp, environment: dev |
refused (environment) |
CESNET/tesp-api#62 |
The default branch of Poiesis, which has no release yet, sets the service
info with the Helm values serviceInfo.* (see
Poiesis): if you run it,
import it with sync (see Check before you import).
Check before you import¶
Check the endpoint without a token, and without following redirects, with the address of your service:
SERVICE_INFO=https://tes.example.org/ga4gh/tes/v1/service-info
curl -sS -o /dev/null -w '%{http_code} %{redirect_url}\n' "$SERVICE_INFO"
curl -fsS "$SERVICE_INFO" | jq '{id, name, description, type,
organization, contactUrl, documentationUrl, environment, version}'
The first command must print 200 and nothing else. Compare the second
with the checklist and the rules.
Register by import, and keep sync on¶
- Log in to the Cloud Registry with LS Login, open Services and select Register Service.
- Under Import from service info, enter the address of your service
info and select Import. The form takes the values; the Service
URL is the address without
/service-info. - Check the values, and don't change them: change the service info instead, and import again. Changed values grey out sync.
- Keep Keep this service in sync with its service info ticked, and select Create Service.
If the registry can't fetch the service info, the form says so, but not why: go through the checklist again. Service info that doesn't pass the rules is refused, naming the field. See Importing from service info in the UI's user guide; scripts use the API, as described in Using the Cloud Registry.
Once sync is on, keep the service info right: the registry applies it every
day, and labels the entry out-of-sync if it can't (see Out-of-sync
reasons). Keep id and the
API type (type.group and type.artifact) as they were at the import: if
either changes, sync stops with identity mismatch, and the reasons table
says how to recover. If you change them between the import and Create
Service, import again.
Manual entry, the fallback¶
Enter the values by hand only if the import can't work or doesn't fit:
- the service info can't be set yet: Funnel, Poiesis and TESP API;
- the service info isn't public;
- a quick test with values that differ from the service info.
A manual entry has no sync, so it can drift from what the service says, and an entry without publicly readable service info is never verified here (see Verified services). Ask the admins how to proceed with one of the products above.
To register by hand, fill in the form of Register Service with the values of the checklist (see Registering a service in the UI's user guide):
- Service URL: the base URL of your API, for example,
https://tes.example.org/ga4gh/tes/v1. - Service Type: the registered type that your service implements, for example,
org.ga4gh · tes · 1.1.0. - Environment:
prodortest. - Organization Name and Organization URL: those of the organization that hosts your service, not of the product (see Names and organizations).
- Service Name: following the recommended naming.
- Service Version, Contact URL, Documentation URL and Description: as in the checklist.
Leave sync off: with Funnel and TESP API, the first sync would fail, and with Poiesis 0.2.0, it would replace your values with those of the project. Once your product lets you set the service info, set it, and turn sync on in the details of the entry (Turn sync on; see Syncing services).