Skip to main content
Version: 2.0

Configuration Importation/Exportation

Request

To configure rs-storage settings, send a POST request on update operation of dynamic-tenant-setting-controller ( see rest api documentation) for each setting that needs to be set. The configuration is stored in database for each tenant or project.

This configuration can also be imported or exported through administrator HMI.

Configurable parameter

Configurable parameters

NameTypeDefault valueDescription
rateLimitInteger-1 (unlimited)Rate limit for file download
tenantCachePathPath (String)/cache/[tenant]Path where file will be temporarily saved when retrieved .
maxQuotaInteger (in kilobytes)-1 (unlimited)Default max quota (quantity of data that can be downloaded by a user) for RAWDATA download.
cacheMaxSizeInteger (in Bytes)500000000Maximum size of the cache before it is cleaned

Storage Location Configuration

NameTypeDescription
nameStringPrinted name of the storage location
storageTypeEnum (String)Online or Nearline
priorityPlugin configurationHigher priorities will be accessed first if a file is stored on multiple locations.
allocatedSizeInKoIntegerSize of the location. If full, no more file can be added.

Plugins configuration format

NameTypeDescription
pluginIdStringPlugin unique identifier. Used to identify which plugin to use
businessIdStringPlugin configuration unique identifier
labelStringPlugin configuration label.
versionStringPlugin configuration compatible version
priorityOrderIntegerplugin configuration priority.
activeBooleanEnable or disable plugin configuration
parametersObjectJson format of the plugin configuration parameters (specific for each plugin)

Local plugin specific parameters

Parameter NameTypeDefaultDescription
Storage_URLPath (String)Root path on the file system where the files will be stored (/rootPath/subdirectory/checksum)
Local_Delete_OptionBooleanfalseIf false, the files won't be deleted from the file system when they are deleted from regards
Local_Storage_Max_File_Size_For_ZipInteger (in bytes)1000Maximal size of a file to be considered a small file so it uses the small file archival system
Local_Storage_Max_Zip_SizeInteger (in bytes )500000000Maximal size of an archive, no more files will be added once it reaches this size
File_Naming_StrategyEnum (String)CHECKSUMEither CHECKSUM or FILENAME, determine how the file will be named on the file system

S3 plugin specific parameters

Parameter NameTypeDefaultDescription
S3_Server_EndpointUrl (String)Endpoint where to reach the desired S3 server, this should contain the whole url and stop just before the bucket
S3_Server_RegionStringRegion of the S3 server, this must match the region configured on the server
S3_Server_KeyStringKey (user) to access the server
S3_Server_SecretStringSecret (password) to access the server
S3_Server_BucketStringName of the S3 bucket where the files should be stored
Root_PathPath (String)/Root path on the S3 server where the files will be stored (host/pathtobucket/rootPath/subdirectory/checksum)
Upload_With_Multipart_Threshold_In_MbInteger (in megabytes)5For multipart upload, the file will be cut in part of this size
Upload_With_Multipart_Parallel_Part_NumberInteger5For multipart upload, number of parts that will be loaded in memory in REGARDS
S3_Allow_DeletionBooleanfalseIf false, the files won't be deleted from the file system when they are deleted from regards
File_Naming_StrategyEnum (String)CHECKSUMEither CHECKSUM or FILENAME, determine how the file will be named on the file system

S3 Glacier plugin specific parameters

Parameter NameTypeDefaultDescription
Glacier_Workspace_PathPath (String)Path to the workspace were the plugin will process the small files and regroup them in archives
Glacier_Small_File_Max_SizeInteger (in bytes)1048576Maximal size of a file to be considered a small file so it uses the small file archival system
Glacier_Small_File_Archive_Max_SizeInteger (in bytes)10485760Maximal size of an archive, the archive will be closed and stored when it reaches this size
Glacier_Small_File_Archive_Duration_In_HoursInteger (in hours)24Maximal age of an archive after which it will be closed and stored, even if it isn't full
Glacier_Parallel_Restore_NumberInteger20Number of files restoration in parallel, each restoration need an active thread idling until the file is restored
Glacier_Parallel_Upload_NumberInteger5Number of upload to process at the same time, an higher number will require more resources from the microservice
Glacier_Local_Workspace_File_Lifetime_In_HoursInteger (in hours)24How long will the restored small file archived will be kept in regards cache before being deleted
Glacier_S3_Access_Try_TimeoutInteger (in seconds)3600How long the restoration process will wait for the restored file to be available before failing
standardStorageClassNameStringSTANDARDThe name of the storage class were files are moved to be available (Tier 2)
useExternalCacheNameBooleanfalseIf true, this storage will use the cache of the S3 Server instead of the cache of REGARDS
S3_Server_EndpointUrl (String)Endpoint where to reach the desired S3 server, this should contain the whole url and stop just before the bucket
S3_Server_RegionStringRegion of the S3 server, this must match the region configured on the server
S3_Server_KeyStringKey (user) to access the server
S3_Server_SecretStringSecret (password) to access the server
S3_Server_BucketStringName of the S3 bucket where the files should be stored
Root_PathPath (String)/Root path on the S3 server where the files will be stored (host/pathtobucket/rootPath/subdirectory/checksum)
Upload_With_Multipart_Threshold_In_MbInteger (in megabytes)5For multipart upload, the file will be cut in part of this size
Upload_With_Multipart_Parallel_Part_NumberInteger5For multipart upload, number of parts that will be loaded in memory in REGARDS
S3_Allow_DeletionBooleanfalseIf false, the files won't be deleted from the file system when they are deleted from regards
File_Naming_StrategyEnum (String)CHECKSUMEither CHECKSUM or FILENAME, determine how the file will be named on the file system

Example

rs-storage configuration file example
{
"microservice": "rs-storage",
"modules": [
{
"module": {
"id": "storage",
"name": "Storage module",
"description": "Handle storage locations, and files management processes",
"version": "1.6.0",
"author": "REGARDS",
"legalOwner": "CNES",
"documentation": "https://github.com/RegardsOss"
},
"resetBeforeImport": false,
"configuration": [
{
"key": "fr.cnes.regards.framework.modules.tenant.settings.domain.DynamicTenantSetting",
"value": {
"name": "rateLimit",
"description": "Default rate limit for RAWDATA download. Must be \u003e -1.",
"value": "-1",
"defaultValue": "-1",
"className": "java.lang.Long",
"containsSensitiveParameters": false
}
},
{
"key": "fr.cnes.regards.framework.modules.tenant.settings.domain.DynamicTenantSetting",
"value": {
"name": "tenantCachePath",
"description": "Cache path for this tenant. The path does not need to exist but it has to be readable and writable if it does.",
"value": "\"/cache/tenant1\"",
"defaultValue": "\"/cache/tenant1\"",
"className": "sun.nio.fs.UnixPath",
"containsSensitiveParameters": false
}
},
{
"key": "fr.cnes.regards.framework.modules.tenant.settings.domain.DynamicTenantSetting",
"value": {
"name": "maxQuota",
"description": "Default max quota for RAWDATA download. Must be \u003e -1.",
"value": "-1",
"defaultValue": "-1",
"className": "java.lang.Long",
"containsSensitiveParameters": false
}
},
{
"key": "fr.cnes.regards.framework.modules.tenant.settings.domain.DynamicTenantSetting",
"value": {
"name": "cacheMaxSize",
"description": "Cache max size for this tenant in kilo-bytes. it has to be \u003e0",
"value": "500000000",
"defaultValue": "500000000",
"className": "java.lang.Long",
"containsSensitiveParameters": false
}
},
{
"key": "fr.cnes.regards.modules.storage.domain.database.StorageLocationConfiguration",
"value": {
"name": "Local",
"pluginConfiguration": {
"pluginId": "Local",
"label": "Local",
"businessId": "Local",
"version": "1.0",
"priorityOrder": 0,
"active": true,
"parameters": [
{
"name": "Storage_URL",
"type": "STRING",
"value": "/storages/tenant1/local",
"dynamic": false
},
{
"name": "Local_Delete_Option",
"type": "BOOLEAN",
"value": true,
"dynamic": false
}
]
},
"storageType": "ONLINE",
"priority": 0,
"allocatedSizeInKo": 150000000
}
},
{
"key": "fr.cnes.regards.modules.storage.domain.database.StorageLocationConfiguration",
"value": {
"name": "S3-Minio",
"pluginConfiguration": {
"pluginId": "S3",
"label": "S3-Minio",
"businessId": "S3-Minio",
"version": "1.0",
"priorityOrder": 0,
"active": true,
"parameters": [
{
"name": "S3_Server_Bucket",
"type": "STRING",
"value": "bucket-tenant1",
"dynamic": false
},
{
"name": "S3_Server_Region",
"type": "STRING",
"value": "fr",
"dynamic": false
},
{
"name": "S3_Server_Secret",
"type": "STRING",
"value": "abcdefghijklmnopqrstuvwxyz",
"dynamic": false
},
{
"name": "S3_Server_Endpoint",
"type": "STRING",
"value": "http://rs-minio:9000",
"dynamic": false
},
{
"name": "Upload_With_Multipart_Threshold_In_Mb",
"type": "INTEGER",
"value": 5,
"dynamic": false
},
{
"name": "S3_Allow_Deletion",
"type": "BOOLEAN",
"value": false,
"dynamic": false
},
{
"name": "Upload_With_Multipart_Parallel_Part_Number",
"type": "INTEGER",
"value": 5,
"dynamic": false
},
{
"name": "S3_Server_Key",
"type": "STRING",
"value": "regards",
"dynamic": false
}
]
},
"storageType": "ONLINE",
"priority": 3,
"allocatedSizeInKo": 5000000
}
},
{
"key": "fr.cnes.regards.modules.storage.domain.database.StorageLocationConfiguration",
"value": {
"name": "S3-Glacier",
"pluginConfiguration": {
"pluginId": "S3Glacier",
"label": "S3-Glacier",
"businessId": "S3-Glacier",
"version": "1.0",
"priorityOrder": 0,
"active": true,
"parameters": [
{
"name": "S3_Server_Bucket",
"type": "STRING",
"value": "bucket-glacier-tenant1",
"dynamic": false
},
{
"name": "Glacier_Small_File_Archive_Duration_In_Hours",
"type": "INTEGER",
"value": 24,
"dynamic": false
},
{
"name": "S3_Server_Secret",
"type": "STRING",
"value": "abcdefghijklmnopqrstuvwxyz",
"dynamic": false
},
{
"name": "S3_Server_Region",
"type": "STRING",
"value": "fr",
"dynamic": false
},
{
"name": "S3_Server_Endpoint",
"type": "STRING",
"value": "http://rs-minio:9000",
"dynamic": false
},
{
"name": "Glacier_Workspace_Path",
"type": "STRING",
"value": "/storages/glacier/tenant1",
"dynamic": false
},
{
"name": "Glacier_S3_Access_Try_Timeout",
"type": "INTEGER",
"value": 3600,
"dynamic": false
},
{
"name": "Glacier_Local_Workspace_File_Lifetime_In_Hours",
"type": "INTEGER",
"value": 24,
"dynamic": false
},
{
"name": "Upload_With_Multipart_Threshold_In_Mb",
"type": "INTEGER",
"value": 5,
"dynamic": false
},
{
"name": "Upload_With_Multipart_Parallel_Part_Number",
"type": "INTEGER",
"value": 5,
"dynamic": false
},
{
"name": "Glacier_Parallel_Upload_Number",
"type": "INTEGER",
"value": 20,
"dynamic": false
},
{
"name": "Glacier_Small_File_Max_Size",
"type": "INTEGER",
"value": 1024,
"dynamic": false
},
{
"name": "Root_Path",
"type": "STRING",
"value": "tenant1/example",
"dynamic": false
},
{
"name": "File_Naming_Strategy",
"type": "STRING",
"value": "CHECKSUM",
"dynamic": false
},
{
"name": "Glacier_Parallel_Restore_Number",
"type": "INTEGER",
"value": 20,
"dynamic": false
},
{
"name": "useExternalCacheName",
"type": "BOOLEAN",
"value": false,
"dynamic": false
},
{
"name": "S3_Allow_Deletion",
"type": "BOOLEAN",
"value": true,
"dynamic": false
},
{
"name": "Glacier_Small_File_Archive_Max_Size",
"type": "INTEGER",
"value": 20000,
"dynamic": false
},
{
"name": "S3_Server_Key",
"type": "STRING",
"value": "regards",
"dynamic": false
}
]
},
"storageType": "NEARLINE",
"priority": 1,
"allocatedSizeInKo": 500000000
}
}
]
}
]
}