Skip to content

Adding a new data repository

Maria Paola Ferri edited this page Nov 5, 2025 · 2 revisions

This guide explains how to register a new external data repository in the openVRE MongoDB configuration.
Each site describes an external data repository that can host data (big data volumes also) through the Get Data/Data Archives/External Storage component of the platform. Here, once configured and registered the credentials to the Linked Accounts profile section, all the containers and files are going to be listed to be downloaded locally to the workspace.

A data repository site defines:

  • the data repository metadata (name, ID, type, etc.)
  • the connection details, which describes the configuration needed from the VRE to interact with that resource (e.g. password, Application Credentials)

Each entry is stored as a JSON object in the MongoDB collection.

Base Schema

Below is the generic structure of a computational site entry:

{
  "_id": "mynewrepository", 
  "name": "My New Repository Name",
  "type": 1,
  "description": "A short explanation of what this repository provides or connects to.",
  "access_credentials": {
    "authorization_type": "password", 
    "app_id": "<app-id-if-required>", 
    "app_secret": "<app-secret-if-required>",
    "user_key": "<username-or-api-key>",
    "password": "<password-if-required>",
    "domainName": "<domain-or-auth-scope>",
    "projectName": "<project-name>",
    "projectId": "<project-id>",
    "projectDomainId": "<domain-id-or-default>",
    "interface": "<public|internal|admin>",
    "region_name": "<region-name>",
    "host": "<hostname-or-endpoint>",
    "port": "<port-number>",
    "zone": "<zone-name-if-applicable>",
    "defaultResc": "<default-resource-if-applicable>",
    "token": "<optional-auth-token>"
  },
  "sigla": "<SHORT_CODE>",
 
}

Example - Openstack Object Storage

This represents a BSC located Object Storage (active in ncloud1) used as big data storage.

{
  "_id": "objectstorage",
  "name": "OpenStack Object Storage",
  "type": 1,
  "description": "OpenStack Swift Object Storage at BSC",
  "access_credentials": {
    "app_id": "your-app-id-here",
    "app_secret": "your-app-secret-here",
    "authorization_type": "password",
    "domainName": "Default",
    "interface": "public",
    "projectDomainId": "default",
    "projectId": "1234567890abcdef1234567890abcdef",
    "projectName": "MyProject",
    "user_key": "myuserkey123",
    "region_name": "RegionOne"
  },
  "sigla": "BSCOS",
}

Adding a new site

To add your own infrastructure:

  1. Update the JSON file with your new configuration (e.g. /openVRE-core-dev/mongodb/init_documents/sites.json).

  2. Adapt one of the above examples to match your system parameters.

  3. Insert it into MongoDB, for example using the Mongo shell or mongosh:

    mongo
    use openvre
    db.sites.insertOne(<path_to_sites.json>)

    or, if using mongosh and the file is stored locally:

    mongosh "mongodb://localhost:27017/open-vre4" --eval 'db.sites.insertOne($(cat sites.json))'
  4. Restart the VRE backend so it can load the new configuration.

Clone this wiki locally