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:
- Transfer Grid Service (caGrid_TransferService.gar)
- Transfer Service WebApp (caGridTransfer.war)
- 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:
- Deploy the gar to Globus
- Deploy Globus to Tomcat
- 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:
- Change to the Tomcat directory
- Change to the webapps/wsrf/WEB-INF/etc/cagrid-TransferService directory
- Open jndi-config.xml in a text editor
- Search for storageDirectory, the entry will look like the following: <parameter>
- <name>storageDirectory</name>
- <value>/simpleTransfer</value>
- </parameter>
- Change the value /simpleTransfer to the desired value
- Close the text editor
- 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
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.