add documentation on s3-transfer cli option, and published dataset retrieve #27

Merged
zade_o merged 1 commits from api02-features into main 2026-11-24 13:16:31 +01:00
+75 -10
View File
@@ -344,20 +344,42 @@ You must have a valid kerberos ticket in order to be able to copy the
data to the intermediate storage server. You can use the kinit command
to get this ticket.
#### Outside the PSI network (S3 transfer)
!!! warning
The S3 transfer is not yet available in production. Until it is part of
a stable release, use the pre-release
[scicat-cli v3.5.1-alpha1](https://github.com/paulscherrerinstitute/scicat-cli/releases/tag/v3.5.1-alpha1).
The default copy step transfers the data via ssh/rsync to an intermediate
server inside the PSI network. If your machine cannot reach the PSI
network and has no VPN access (e.g. Renku sessions or cloud VMs), use the
S3 transfer instead. It uploads the data via HTTPS:
```sh
scicat-cli datasetIngestor --token SCICAT-TOKEN --copy --transfer-type s3 --ingest metadata.json [filelisting.txt]
```
Only the SciCat token is needed, with no Kerberos ticket or
username/password. The tool gets temporary upload credentials
automatically. Symbolic links are not uploaded, so only `--linkfiles delete`
is supported with this transfer type.
### Summary of the different use cases
The following table summarizes the different use cases
| OS | sourceLocation | Account-Type | Neededed parameters | Comment |
|---------|--------------------|--------------|---------------------|------------------------------------------------|
| Linux | central | User | token | Fetch token via Web GUI discovery.psi.ch |
| Linux | central | Functional | username/pw | The tool fetches token from API server |
| Linux | anywhere/decentral | User | token + Kerb ticket | Token for API, Kerb ticket for copying data |
| Linux | anywhere/decentral | Functional | not supported | Functional accounts not existing on ssh server |
| Windows | central | User | (token) | Needs mounting of Windows FS to Arema |
| Windows | central | Functional | (username/pw) | dito |
| Windows | anywhere/decentral | User | token + username/pw | Token for API, username/pw for copying data |
| Windows | anywhere/decentral | Functional | not supported | Functional accounts not existing on ssh server |
| OS | sourceLocation | Account-Type | Neededed parameters | Comment |
|---------|---------------------|--------------|-------------------------------------|---------------------------------------------------------|
| Linux | central | User | token | Fetch token via Web GUI discovery.psi.ch |
| Linux | central | Functional | username/pw | The tool fetches token from API server |
| Linux | anywhere/decentral | User | token + Kerb ticket | Token for API, Kerb ticket for copying data |
| Linux | anywhere/decentral | Functional | not supported | Functional accounts not existing on ssh server |
| Windows | central | User | (token) | Needs mounting of Windows FS to Arema |
| Windows | central | Functional | (username/pw) | dito |
| Windows | anywhere/decentral | User | token + username/pw | Token for API, username/pw for copying data |
| Windows | anywhere/decentral | Functional | not supported | Functional accounts not existing on ssh server |
| Any | outside PSI network | User | token + `--copy --transfer-type s3` | Data uploaded via HTTPS (S3), no VPN or Kerberos needed |
## Archive
@@ -672,6 +694,45 @@ whenever necessary. In future in addition an automated publication
after the embargo period (default 3 years after data taking) will be
implemented (details to be defined)
### Retrieving published data
minotti_c marked this conversation as resolved
Review

using s3 clients works also for non public DS I guess? Would it make sense to add an explanation for that too?

using s3 clients works also for non public DS I guess? Would it make sense to add an explanation for that too?
Review

right now, it is not possible. The read option in s3-broker https://scicat-s3-broker.psi.ch/docs/index.html#/default/get_datasets_s3_creds issues short term creds for the psi-retrieve-* buckets, which are supposed to be used for untarred retrieve of private DS's in the future (ceph-s3-notes).

The current URL retrieve for private DS's just sends pre-signed URLs via email. The DS's are in psi-download-* bucket.
We can make a small change to s3-broker and let it also issue short term credentials for psi-download-* bucket. Then one could configure rclone / AWS SDK with the credential_process client.

But currently there's no use case for this.

If e.g. Renku would also mount private DS's, then this would become useful.

Should we still add something to the docs?

right now, it is not possible. The `read` option in s3-broker https://scicat-s3-broker.psi.ch/docs/index.html#/default/get_datasets_s3_creds issues short term creds for the `psi-retrieve-*` buckets, which are supposed to be used for untarred retrieve of private DS's in the future ([ceph-s3-notes](https://gitea.psi.ch/data-catalog-services/ceph-s3-notes/#ceph-s3-profiles)). The current URL retrieve for private DS's just sends pre-signed URLs via email. The DS's are in `psi-download-*` bucket. We can make a small change to s3-broker and let it also issue short term credentials for `psi-download-*` bucket. Then one could configure rclone / AWS SDK with the [credential_process](https://github.com/paulscherrerinstitute/scicat-s3-broker/blob/main/cmd/client/credential_process.go) client. But currently there's no use case for this. If e.g. Renku would also mount private DS's, then this would become useful. Should we still add something to the docs?
Review

ah I see. I think this would be useful in general as it would enable users to use s3 clients on private retrieves, which would unblock multipart downloads and recovery. But it's true it's not implemented. Maybe this should go as a comment either in the s3 code or in the private docs you put together? I agree here is not the right place

ah I see. I think this would be useful in general as it would enable users to use s3 clients on private retrieves, which would unblock multipart downloads and recovery. But it's true it's not implemented. Maybe this should go as a comment either in the s3 code or in the private docs you put together? I agree here is not the right place
Review

Good point. I've added this to the private docs here (commit), and opened https://github.com/paulscherrerinstitute/scicat-s3-broker/issues/55 in scicat-s3-broker, which documents the missing pieces needed to support this.

Good point. I've added this to the private docs [here](https://gitea.psi.ch/data-catalog-services/ceph-s3-notes/#access-for-users-without-the-ceph-credentials) ([commit](https://gitea.psi.ch/data-catalog-services/ceph-s3-notes/commit/c211239b7f58e37d1bb01c204fb0aedbe9c2213c)), and opened https://github.com/paulscherrerinstitute/scicat-s3-broker/issues/55 in scicat-s3-broker, which documents the missing pieces needed to support this.
Anyone, including users without a PSI account, can request the
data of a published dataset from its landing page on <https://doi.psi.ch>.
The data is then retrieved from tape and stored as tar files in a public
S3 bucket for **7 days**. You will receive an email with the download link.
PSI users with access to the data can also use the regular
[Retrieve](#retrieve) procedure.
Instead of downloading through the browser, you can access the bucket
anonymously with any S3-compatible tool. This is useful for large
datasets, because transfers can be resumed and run in parallel:
- Endpoint: `https://rgw.cscs.ch`
- Bucket: `psi:psi-public-tar` (the `psi:` prefix is required)
- Layout: `<datasetPid>/<files>.tar`, e.g. `20.500.11935/<uuid>/`
Example with [RClone](https://rclone.org). Add an anonymous remote to
your `rclone.conf` (`rclone config file` shows its location):
```ini
[psi-public]
type = s3
provider = Ceph
endpoint = https://rgw.cscs.ch
```
Then list, copy or mount the retrieved data:
```sh
# list the files of a dataset
rclone ls psi-public:psi:psi-public-tar/<datasetPid>/
# copy them to a local folder
rclone copy -P psi-public:psi:psi-public-tar/<datasetPid>/ ./my-dataset/
# or mount the bucket read-only (shows the tar files, not their contents)
rclone mount --read-only psi-public:psi:psi-public-tar /mnt/psi-public
```
## Cleanup and Retention
This part is not yet defined.
@@ -1319,6 +1380,10 @@ the latter case it will, after a confirmation by the user, copy the
data automatically to the rsync cache server, even if the copy flag is
not provided.
If your machine has no access to the PSI network (e.g. Renku sessions),
use the S3 transfer described in
[Outside the PSI network (S3 transfer)](#outside-the-psi-network-s3-transfer).
#### Use Case: Ingest datasets from simulations/model calculations
These can be treated like datasets of type "base" or "raw". In the