Alert.png The wiki is deprecated and due to be decommissioned by the end of September 2022.
The content is being migrated to other supports, new updates will be ignored and lost.
If needed you can get in touch with EGI SDIS team using operations @ egi.eu.

Difference between revisions of "HOWTO13 EUDAT B2STAGE cookbook for EGI VOs"

From EGIWiki
Jump to navigation Jump to search
Line 43: Line 43:
ekar@ekar-VirtualBox:~# mkdir DSS
ekar@ekar-VirtualBox:~# mkdir DSS
ekar@ekar-VirtualBox:~# sudo cd DSS
ekar@ekar-VirtualBox:~# sudo cd DSS
ekar@ekar-VirtualBox:~/DSS$ git clone https://github.com/EUDAT-B2STAGE/B2STAGE-DataStaging-script.git
ekar@ekar-VirtualBox:~/DSS# git clone https://github.com/EUDAT-B2STAGE/B2STAGE-DataStaging-script.git
ekar@ekar-VirtualBox:~/DSS$ cd B2STAGE-DataStaging-script
ekar@ekar-VirtualBox:~/DSS# cd B2STAGE-DataStaging-script
ekar@ekar-VirtualBox:~/DSS/B2STAGE-DataStaging-script$ sudo cp m2.py /usr/local/lib/python2.7/dist-packages/globusonline/transfer/api_client/x509_proxy/m2.py
ekar@ekar-VirtualBox:~/DSS/B2STAGE-DataStaging-script# sudo cp m2.py /usr/local/lib/python2.7/dist-packages/globusonline/transfer/api_client/x509_proxy/m2.py
</pre>
</pre>



Revision as of 09:32, 18 August 2014

About

B2STAGE service from EUDAT supports all known GridFTP command line and graphical or web based user clients (globus-url-copy, uberftp, WebFTS, globusonline, XSEDE-EUDAT File Manager).

DSS (Data Staging Script) is a command line tool which is recommended to be used if user would like to benefit from PIDs (Persistent Identification of the files which are stored on a dedicated server named EPIC server).

This cookbook provides the information about how EGI communities can benefit from the B2STAGE service offered by EUDAT.

EUDAT B2STAGE

List of EUDAT B2STAGE service endpoints.


[1] User documentation about B2STAGE service. (EUDAT website)

[2] Site Administrator documentation about B2STAGE service. (EUDAT website)

EGI VOs

Installing Data Staging Script

1. Install Python pip

ekar@ekar-VirtualBox:~# sudo apt-get install python-pip

2. Install Globus Online API

ekar@ekar-VirtualBox:~# sudo pip install globusonline­-transfer­-api­-client

3. Install dependencies

ekar@ekar-VirtualBox:~# sudo apt-get install swig python-dev 
ekar@ekar-VirtualBox:~# sudo pip install m2crypto

4. Download Data Staging Script from GitHub

ekar@ekar-VirtualBox:~# mkdir DSS
ekar@ekar-VirtualBox:~# sudo cd DSS
ekar@ekar-VirtualBox:~/DSS# git clone https://github.com/EUDAT-B2STAGE/B2STAGE-DataStaging-script.git
ekar@ekar-VirtualBox:~/DSS# cd B2STAGE-DataStaging-script
ekar@ekar-VirtualBox:~/DSS/B2STAGE-DataStaging-script# sudo cp m2.py /usr/local/lib/python2.7/dist-packages/globusonline/transfer/api_client/x509_proxy/m2.py

Configuring Data Staging Script

1. Ask for access to one of B2STAGE service provided endpoints.

2. datastager.cfg


[Defaults]
user =  ekarolis (Your GlobusOnline.eu account name)
cert =  ~/.globus/usercert.pem
key  =  ~/.globus/userkey.pem
certdir=~/.globus/certificates
rmode=  DSSfile
#rmode=  icommands
ipath=  /home/jack/CINECA/GridTools/iRODS/iRODS/clients/icommands/bin/

src_site = None
src_dir  = ~/
dst_site = None
dst_dir  = ~/

GClocalhost=mylaptop (Your GlobusOnline.eu Connect endpoint)
DSSfilePath=/CINECA01/home/EUDAT_STAFF/keigelis/.DSSfile (Path of the EUDAT storage server to .DSSfile)

Note: If you are using MyProxy Tool GUI you can retrieve your uploaded VOMS proxy and put it to current directory of DSS to a file named: credential-<Your GlobusOnline.eu account name>.pem. Example:


ekar@ekar-VirtualBox:~# myproxy-get-delegation -l ekarolis -s px.grid.sara.nl --voms biomed
Your identity: /O=dutchgrid/O=users/O=egi/CN=Karolis Eigelis/CN=467317771/CN=1594137829/CN=2054790710/CN=456155345/CN=1233761789
A credential has been received for user ekarolis in /tmp/x509up_u1000.

ekar@ekar-VirtualBox:~# cp /tmp/x509up_u1000 credential-ekarolis.pem
ekar@ekar-VirtualBox:~# chmod 600 credential-ekarolis.pem

Using Data Staging Script

1. Generating random file to be used for the transfers.


ekar@ekar-VirtualBox:~# dd if=/dev/urandom of=1M.rand bs=1M count=1

2.1 Upload randomly generated file from your laptop to EUDAT endpoint (storage endpoint) using GlobusConnect client and DSS.


ekar@ekar-VirtualBox:~/DSS/B2STAGE-DataStaging-script# ./datastager.py in issue -p 1M.rand --ss mylaptop --sd /home/ekar/DSS/B2STAGE-DataStaging-script/data --ds B2STAGE --dd /CINECA01/home/EUDAT_STAFF/keigelis/

Hello, welcome to data staging!

Loading....   You are staging in so save the taskID in order to know the PID(s).
/
=== Before transfer ===
=== Activate endpoints ===
Please enter your myproxy username ('none' if you do not have one).
ekarolis
==Activating mylaptop ==
==Activating B2STAGE ==
=== Prepare transfer ===
=== Submit transfer ===
=== Checking completion ===
Task 97f656c2-26b0-11e4-b5ca-12313940394d complete!
 Task 97f656c2-26b0-11e4-b5ca-12313940394d is still under process 
=== Exiting ===
The task ID for this operation is: 97f656c2-26b0-11e4-b5ca-12313940394d

Its status is SUCCEEDED

2.2 Upload randomly generated file from your laptop to EGI endpoint (storage endpoint) using GlobusConnect client and DSS.


ekar@ekar-VirtualBox:~/DSS/B2STAGE-DataStaging-script# ./datastager.py in issue -p 1M.rand --ss mylaptop --sd /home/ekar/DSS/B2STAGE-DataStaging-script/data --ds PUC --dd /dpm/fis.puc.cl/home/biomed/

Hello, welcome to data staging!

You are staging in so save the taskID in order to know the PID(s).
 Loading.... /

=== Before transfer ===
=== Activate endpoints ===
Please enter your myproxy username ('none' if you do not have one).
ekarolis
==Activating mylaptop ==
==Activating PUC ==
=== Prepare transfer ===
=== Submit transfer ===
=== Checking completion ===
Task b51a250c-26b1-11e4-b5ca-12313940394d complete!
 Task b51a250c-26b1-11e4-b5ca-12313940394d is still under process 
=== Exiting ===
The task ID for this operation is: b51a250c-26b1-11e4-b5ca-12313940394d

Its status is SUCCEEDED

3. Staging-in 1M.rand file to EUDAT server from EGI storage endpoint (PUC) (third party transfer).


ekar@ekar-VirtualBox:~# ./datastager.py in issue -p 1M.rand --ss PUC --sd /dpm/fis.puc.cl/home/biomed/ --ds B2STAGE --dd /CINECA01/home/EUDAT_STAFF/keigelis/

Hello, welcome to data staging!

Loading.... /You are staging in so save the taskID in order to know the PID(s).

=== Before transfer ===
=== Activate endpoints ===
Please enter your myproxy username ('none' if you do not have one).
ekarolis
==Activating PUC ==
==Activating B2STAGE ==
=== Prepare transfer ===
=== Submit transfer ===
=== Checking completion ===
Task f00a7bb4-2452-11e4-b5c1-12313940394d complete!
 Task f00a7bb4-2452-11e4-b5c1-12313940394d is still under process 
=== Exiting ===
The task ID for this operation is: f00a7bb4-2452-11e4-b5c1-12313940394d

Its status is SUCCEEDED

3.

Setting up GlobusOnline.eu

Please consult Globus Online cookbook for EGI VOs. Information about how to configure EGI storage endpoints and other relevant information is briefly described. If your VO Manager does not provide you with public storage endpoints at GlobusOnline.eu, you can follow the procedure to set them up by yourself.