|
|
|
# General purpose
|
|
|
|
To have a possibility to use B2SAFE as storage of objects referenced in B2SHARE a connection between these two systems was evaluated. So the B2SAFE user can trigger a set of iRODS rules that are calling the b2safe_b2share_client python script that connects to the HTTP API of B2SHARE and performs actions requested from the user.
|
|
|
|
It is not an official part of B2SAFE and can be found in a separate development branch “b2share” of B2SAFE-core package.
|
|
|
|
|
|
|
|
# Installation
|
|
|
|
B2SHARE connection component is an extension of the B2SAFE core package (https://github.com/EUDAT-B2SAFE/B2SAFE-core), so following software are expected to be in place before installation:
|
|
|
|
* iRODS
|
|
|
|
* B2SAFE
|
|
|
|
* python
|
|
|
|
|
|
|
|
To install the component you have to do following steps:
|
|
|
|
* clone “b2share” branch of the B2SAFE core from GitHub https://github.com/EUDAT-B2SAFE/B2SAFE-core.git to get the scripts and rules you need for B2SHARE connection establishing.
|
|
|
|
* add following scripts to <your path to B2SAFE>/B2SAFE-core/cmd:
|
|
|
|
* b2shareclient.py
|
|
|
|
* b2shareclientworker.py
|
|
|
|
* configuration.py
|
|
|
|
* create_md_file.py
|
|
|
|
* and the whole directory “manifest”
|
|
|
|
* add the rule “b2share.re” from B2SAFE-core/rulebase folder to the "rulebase" folder of your iRODS instance <your path to B2SAFE>/B2SAFE-core/rulebase
|
|
|
|
* modify configuration files according to your environment as described in "Configuration files" section of this wiki page
|
|
|
|
* check for missing python libraries trying to run the major scripts with -d (dry run) option
|
|
|
|
* b2shareclient.py
|
|
|
|
* create_md_file.py
|
|
|
|
Try to install missing packages with the standard package manager like apt, yum, zypper etc.
|
|
|
|
If packages are not within the standards install and use pip to install the missing packages.
|
|
|
|
As described in the “Example Workflow” section, the iRODS rules will trigger these scripts according to the flags user specify in the imeta of the collection.
|
|
|
|
|
|
|
|
# Configuration
|
|
|
|
|
|
|
|
# Example Workflow
|
|
|
|
|
|
|
|
# Available functions of the python scripts |