diff --git a/README.md b/README.md index 83166ad40026c3ca1d527bd6c9188530b6924e78..ddc168ea1b15e99c13b4118b48bab23a1f319c89 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,64 @@ theia_dumper publish /data/stac/collection.json # Publish collection theia_dumper publish /data/stac/item_collection.json # Publish item collection ``` +## Usage + +### Prerequisites + +The user must be allowed to push files and metadata into the spatial data infrastructure: + +- Files +- STAC objects + +In order to ask the permission to do so, the user must perform a [merge request](https://docs.gitlab.com/ee/user/project/merge_requests/) +in [this repository](https://gitlab.irstea.fr/umr-tetis/cdos-ops), modifying two files +(here we assure that the user is named `jacques.chirac`!): + +- `buckets.json`: add a bucket and a path prefix where the files will be uploaded, + +Typically, one should use the `gdc-sm1` bucket, with a path prefix which is not already +used, e.g.: + +```json + ..., + "jacques.chirac": [ + { + "s3_endpoint": "s3-data.meso.umontpellier.fr", + "buckets": [ + "sm1-gdc/collection1234", + "sm1-gdc/collection4567", + "sm1-gdc/collection_chirac/1", + "sm1-gdc/collection_chirac/2" + ] + } + ], + ... +``` + +- `transations_rules.json`: itemize the STAC collections IDs that will be created and modified. + +```json + ..., + "jacques.chirac": [ + "collectionXYZ", + "collection123" + ], + ... +``` + +Note that collections IDs and buckets/paths prefixes are completely independant. + +### CLI + +In the `theia-dumper` CLI, the `--storage_bucket` argument concatenates the actual bucket and +the path prefix. + +For instance if jacques wants to upload a collection in `sm1-gdc/collection1234`, he will have to call: + +```commandLine +theia-dumper /home/jacques/stac/collection.json --storage_bucket sm1-gdc/collection1234 +``` + ## Contact remi cresson @ inrae