Configuration
All TypeScript actions rely on a JSON configuration file that contains basic connection details for the various repository services, a section related to the mapping into repository objects and other settings. An example file is located in the config folder.
Configuration sections
The file contains the following sections:
- Connection details for docuteam box
- Connection details for Fedora 3 (if doing migrations)
- Connection details for Fedora 6
- Connection details for feeder
- Mapping table linking a given submission agreement to a Fedora 6 prefix (used in the Import Matterhorn RDF into Fedora action). The prefix indicates a top-level resource, to which the resources from a SIP are attached subsequently.
- Share configuration to transfer data to box (used in the Replace Fedora instantiation action). This action does not send data directly to box but instead sends box the path to the file and the metadata required by the replace API, which usually reside in a folder in the feeder workbench. This folder needs to be accessible to the server where box installed. When transferring this path to box, the part of the path defined as
absolutePathis replaced by the corresponding sharename. A similar configuration in box.yml then replaces thenamewith theabsolutePathvalid from the box server to access the files. - Connection details used in the Register URN with the German National Library action.
- Connection details for the customer-specific actions downloadDossierFromOpenText, listAvailableDossiersFromOpenText and updateDossierStatusToOpenText
- Connection details for the customer-specific actions listAvailablePackagesFromPreIngestComponent, downloadPackageFromPreIngestComponent and reportPackageStatusToPreIngestComponent
- Connection details for the customer-specific actions sendIngestsToAccessComponent, sendUpdatesToAccessComponent and checkForAndDeleteExistingPackagesByRefCode
- Connection details for the customer-specific actions sendIngestsToAccessComponent, sendUpdatesToAccessComponent
Here's an example of such a file:
{
"box": {
"baseUrl": "https://repository.docuteam.test/box",
"token": "secretKey"
},
"fedora3": {
"baseUrl": "https://repository.docuteam.test/fedora",
"password": "fedoraAdmin",
"username": "fedoraAdmin"
},
"fedora6": {
"baseUrl": https://repository.docuteam.test/fcrepo/rest",
"password": "fedoraAdmin",
"username": "fedoraAdmin"
},
"feeder": {
"baseUrl": "http://feeder:3000",
"token": "secretKey"
},
"shares": [
{
"name": "box_development_volume",
"absolutePath": "/some/path/to/folder"
}
],
"submissionAgreementsToPrefixMapping": [
{
"submissionAgreementId": "sa_006-01_dss-01",
"fedora6Prefix": "org_006"
},
{
"submissionAgreementId": "sa_it-01_dss-01",
"fedora6Prefix": "org_it"
},
{
"submissionAgreementId": "sa_all-formats-01_dss-01",
"fedora6Prefix": "org_123"
},
{
"submissionAgreementId": "sa_mus-2_dss-02",
"fedora6Prefix": "org_002"
}
],
"urnService": {
"apiBaseUrl": "https://api.nbn-resolving.org/sandbox/v2",
"credentials": [
{
"namespace": "urn:nbn:ch:bel1",
"username": "SLB31390",
"password": "xxxx"
},
{
"namespace": "urn:nbn:ch:bel2",
"username": "SLB31390",
"password": "xxxx"
}
]
},
"openTextService": {
"baseUrl": "https://opentext.docuteam.test",
"username": "admin",
"password": "admin",
"supId": "1234"
},
"preIngestComponent": {
"baseUrl": https://pre-ingest.docuteam.test,
"username": "admin",
"password": "admin"
},
"accessComponentQueue": {
"queueUrl": "https://dip-queue.docuteam.test/api/v2/dip/docuteam-abn",
"username": "admin",
"password": "admin"
},
"accessComponentS3": {
"baseUrl": "https://s3.docuteam.ch",
"region": "eu-west-1",
"username": "username",
"bucket": "bucket-name",
"folder": "folder-name",
"accessKey": "xxxx",
"secretKey": "xxxx"
}
}