new tenant model adaptation
tenant model has changed to support new search features (index single dataflows, multi-tenant sfs)
// tenants.json
{
"tenant1": {},
"tenant2": {
label: "label of tenant 2 for UI",
spaces: {},
datasources: {},
scopes: {}
}
}
A space is the definition of an SDMX endpoint with attributes to customize handling by the suite (previously defined in datasources.json):
// spaces inside tenants.json
{
"spaces": {
"space1": {},
"qa-reset": {
"label": "SIS-CC-reset",
"hasRangeHeader": true,
"supportsReferencePartial": true,
"hasLastNObservations": true,
"transferUrl": "https://transfer-qa.siscc.org/",
"url": "https://nsi-qa-reset.siscc.org"
}
}
}
note: transfer url is now defined in space, was previously defined in dlm at server level (kubernetes strategy), changed to avoid involving dlm in the binding since it's defined in transfer kube strategy.
A datasource is a subset of a space (previously defined in datasources.json):
// datasources inside tenants.json
{
"datasources": {
"datasource1": {},
"indexed-qa-reset": {
"dataSpaceId": "qa-reset",
"indexed": true,
"dataqueries": [
{"version": "1.0", "categorySchemeId": "OECDCS1", "agencyId": "OECD"},
],
}
}
}
A scope is dedicated to apps (DE, DLM) and allow to configure transversal aspect of the multi-tenant architecture such as spaces, datasources or auth:
// scopes inside tenants.json
{
"scopes": {
"scope1": {},
"de-qa": {
"type": "de",
"label": "DE QA",
"keycloak": {"realm": "OECD", clientId: "app"},
"datasources": ["indexed-qa-reset"],
},
"dlm-qa": {
"type": "dlm",
"label": "DLM QA",
"keycloak": {"realm": "OECD", clientId: "app"},
"spaces": ["qa-reset"],
}
}
}
note: there are several types of scope because there are several types of apps.
TASKS:
-
authz url to handle like transfer url (in kube.yaml) -
in config repo, getDataSources
to rm -
rm datasourceIds from settings -
transfer url at space level, confirmed? -
update documentation (and add a thing about manuel migration)
DOC:
- de and dlm requires a scope, dv is scopeless
- if proxy then updates routes with scopes: tenant id becomes a slug
oecd:de
- transfer url was at dlm server level, it's now defined in dlm scope in tenants.json
- tenants.json has been updates, datasources.json has been removed (included in tenants.json)
- settings.json files don't contain anymore references to spaces/datasources (defined in tenants.json through scopes)