cubi-tk setup
Setup for Sodar API access
cubi-tk will in many cases access SODAR (through its web API)
and the connected iRODS file system.
To be able to access the SODAR API you will need an API token. For token creation and management in SODAR, please consult the
respective documentation
There are two options how to supply the API token and the sodar server url, but only one is needed. The options are the following:
configure
~/.cubitkrc.toml.[global] sodar_server_url = "https://sodar.bihealth.org/" sodar_api_token = "<your API token here>"
pass via command line.
$ cubi-tk sodar ingest-data --sodar-url "https://sodar.bihealth.org/" --sodar-api-token "<your API token here>"
Setup for irods access
In order for cubi-tk to upload and download files to or from SODAR it also needs to authenticate with the irods server
used by SODAR. This requires a specific file ~/.irods/irods_environment.json which can be
obtained form Sodar.
Once this file is present, cubi-tk will then attempt a login on the irods server, which still requires you to enter your password.
The login token is cached, so that a re-authentication is only rarely needed.
Setup for multiple SODAR instances
cubi-tk supports easy switching between different SODAR instances and their respective irods servers. To use this
feature you need to use the ~/.cubitkrc.toml file, where you can enter additional sodar server profiles:
[global]
sodar_server_url = "https://sodar.bihealth.org/"
sodar_api_token = "<your API token here>"
[staging]
sodar_server_url = "https://sodar-staging.bihealth.org/"
sodar_api_token = "<your 2nd API token here>"
In addition to the additional server URL and API token, you will also need an additional „irods_environment“ file. Download this file from the new SODAR server as usual, but then change the name you place it under in your home directory: ~/.irods/irods_environment_staging.json, the file name addition needs to match the entry in the toml file for cubi-tk to properly allocate it.
When you have multiple servers defined like this, you can easily switch using the --config-profile option, which takes
the name of a profile (i.e. staging). The global profile is always used a default, if nothing else is specified.
Changing the sodar profile will generally require re-authentication in irods.