phgrid wiki

Secure Simple Transfer Service

Description
The Secure Simple Transfer Service is grid based file transfer service.  This release of Secure Simple Transfer mimics a FTP interface without the need to open a dedicated port on the server.  This is a basic infrastructure service that can be deployed in any grid environment  with the proper setup.  The Secure Simple Transfer Service is composed of three components:

  1. Transfer Grid Service (caGrid_TransferService.gar)
  2. Transfer Service WebApp (caGridTransfer.war)
  3. Transfer Service Client (caGrid-Transfer-client-1.0.jar) (optional)
These files can be downloaded from https://sourceforge.net/project/showfiles.php?group_id=229594.



Deployment Environment


The Secure Simple Transfer Service is built on top of caGrid-Transfer-1.2 using Globus 4.0.5 deployed to a secured Tomcat 5.5.27 server.  The caGrid-Transfer-1.2 code requires that Globus be deployed into a web application container, please refer to the documentation on the caGrid-Transfer-1.2 page for more information.  To steps for deployment are:

  1. Deploy the gar to Globus
  2. Deploy Globus to Tomcat
  3. Deploy the Transfer Service war to Tomcat
To deploy a gar file use the globus-deploy-gar command.  To deploy Globus to the Tomcat container refer to the Globus documentation.  In addition to the gar file for the service the Transfer Service web app has to be deployed to Tomcat as well without it the transfers will not actually happen.  Check with your local system administrator for instructions on deploying the war file into your Tomcat installation. 


Location of Source Code

The source code is located on the phgrid sourceforge project space.

        http://phgrid.svn.sourceforge.net/viewvc/phgrid/SecureSimpleTransfer


The code can be checked out from SVN using the following command:

    svn co https://phgrid.svn.sourceforge.net/svnroot/phgrid phgrid



Building the Code

Service GAR: After the code has been downloaded from sourceforge, open a console window.  Change to the directory containing the source code.  Type: ant deployGlobus


Service WebApp: Change to the directory containging the source code.  Change to the webapp subdirectory.  Type ant deployTomcat. This will deploy the web app to the Tomcat web container.  Make sure that the CATALINA_HOME environment variable has been set properly.


Client Jar: Change to the directory containing the source code.  Type: ant dist this will create a runnable jar in the build/dist directory.  You can execute the client by typing:
java -jar build/dist/caGrid-Transfer-1.0.jar xxxxx xxxxx from the top level directory.  Edit the client.properties file to change any of the configurable settings, such as, the upload or download directory locations.



Service Configuration - storageDirectory

The service has one configurable paramter: storageDirectory.  storageDirectory is the location where files are stored when being uploaded to the server and downloaded from the server.  This directory can exist anywhere on the file system, the default location is /simpleTransfer.  Whether you decide to keep the default directory path or change it the directory must be created manually and writable by the owner of the Tomcat application. In order to change the storageDirectory location the following steps should be followed:

  1. Change to the Tomcat directory
  2. Change to the webapps/wsrf/WEB-INF/etc/cagrid-TransferService directory
  3. Open jndi-config.xml in a text editor
  4. Search for storageDirectory, the entry will look like the following:                                                                                                                                 <parameter>
              <name>storageDirectory</name>
              <value>/simpleTransfer</value>
    </parameter>
  5. Change the value /simpleTransfer to the desired value
  6. Close the text editor
  7. Stop and start the Tomcat container.

You may need to contact your system administrator for help in accessing the jndi-config.xml file.


Command Line Client

The command line interface for Secure Simple Transfer can process the following commands:

  • upload filename [directory]
  • download filename [directory]
  • list directory
  • create directory
  • delete filename [directory]
  • remove directory

Example Calls

List files in the default remote directory:

java -jar build/dist/caGrid-Transfer-client-1.0.jar list .


List files in a subdirectory

java -jar build/dist/caGrid-Transfer-client-1.0.jar list dir1


Create a remote directory:

java -jar build/dist/caGrid-Transfer-client-1.0.jar create dir1



Remove a remote directory:

java -jar build/dist/caGrid-Transfer-client-1.0.jar remove dir1


Upload a file to the default remote directory

java -jar build/dist/caGrid-Transfer-client-1.0.jar upload ThinWireBook.pdf


Upload a file to a subdirectory

java -jar build/dist/caGrid-Transfer-client-1.0.jar upload ThinWireBook.pdf dir1


Delete a file from the default remote directory

java -jar build/dist/caGrid-Transfer-client-1.0.jar delete ThinWireBook.pdf


Delete a file from a subdirectory

java -jar build/dist/caGrid-Transfer-client-1.0.jar delete ThinWireBook.pdf dir1


client.properties file


 Parameter Description Default Value
 uploadDirectory* Directory where files being sent to the server are located

 uploads
 downloadDirectory* Directory where files downloaded from the server are placed
 downloads
 url URL of of service
 n/a


The directories specified in the client.properties file may exist anywhere in the file system but they must exist on the file system prior to running the client.
The client will not create the directories.




SPECIAL NOTES

This service replaces the following GLOBUS library files:

  • globus_wsrf_mds_aggregator.jar
  • globus_wsrf_mds_aggregator_stubs.jar
  • globus_wsrf_servicegroup.jar
  • globus_wsrf_servicegroup_stubs.jar
When the service is undeployed these library files are removed, making the creation of other grid services impossible.  Make sure to make a back up copy of these files before deploying the service.  The backuplibs.sh is a Bourne shell script to create a backup of the libraries.


Attachments (3)

  • backuplibs.sh - on Oct 28, 2008 8:31 AM by Felicia Rosemond (version 1)
    1k Download
  • client.properties - on Nov 7, 2008 12:03 PM by Felicia Rosemond (version 3 / earlier versions)
    1k Download
  • log4j.properties - on Oct 28, 2008 10:04 AM by Felicia Rosemond (version 1)
    1k Download

Recent site activity

Disclaimer

Please note that as part of the collaborative nature of this initiative, the content in this site may include submissions from employees or contractors of the Centers for Disease Control and Prevention/the Agency for Toxic Substances and Disease Registry. The opinions / findings are those of the submitter(s), and do not necessarily represent the official position of the Centers for Disease Control and Prevention/the Agency for Toxic Substances and Disease Registry.

All submitters must agree and adhere to the Code of Conduct posted on this site. All submissions are examined in a timely fashion to assure compliance with the stated code of conduct. Those not found to be in compliance are promptly removed.