The rule code : cURL (Moving Data): filename : irods_curl_get.r
$ make curl_get
This should create a shared object: libirods_curl_get.so
Copy libirods_curl_get.so to the microservices plugin directory (as irods):
$ sudo -u irods cp -f libirods_curl_get.so /var/lib/irods/plugins/microservices/
Edit the rulefile irods_curl_get.r to make sure that the
destination object path (*dest_object) is valid in your environment
Run the rulefile:
$ irule -F irods_curl_get.r
Check if the new object is there:
$ ils -L PATH_OF_DEST_OBJECT
$ iget PATH_OF_DEST_OBJECT -
Note the - at the end of the iget command.
This simply puts the retrieved file into stdout
and will print the file contents to your screen.
irods_curl_get_test { irods_curl_get(*url, *dest_object); } input *url=” ftp://ftp-npp.class.ngdc.noaa.gov/20151015/VIIRSI-EDR/ VIIRS-Image-Bands-EDR-GTM-Geo/VIIRSI-EDR_VIIRS-Image-Bands-EDR-GTM-Geo_20151015_00001.tar", *dest_object="/DTU/home/public/geodata_noaa.tar" output ruleExecOut
Linux/Mac Command:(you need the iCommands package!)
irule -F irods_curl_get.r
Rules and Microservices API : https://wiki.irods.org/doxygen/
Resources
used:
SSH :
putty (Windows)
Github:
https://github.com/DICE-UNC
iRODs
manual : https://docs.irods.org/master/