Configuring the VOSpace service for testing
Note - These notes are specific to the current development code, and will be out of date within a few days.
The current configuration pages supplied with the VOSpace service are very very basic, and somewhat fragile.
They are enough to get the service up and running to enable us to test it with a live client and server.
Eventually, all of these instructions will be redundant, as the VOSpace service webapplication will eventually contain a full set of
user-friendly pages that will guide the user through the configuration process.
Resetting the database
If you have an updated copy of the source tree, then the database table structure may have changed.
Run the following commands to drop the existing database tables.
#
# To drop and re-create the JUnit test database.
psql template1 postgres
\c template1
DROP DATABASE IF EXISTS vospacejunit ;
CREATE DATABASE vospacejunit ;
GRANT ALL ON DATABASE vospacejunit TO junit ;
\c vospacejunit
\q
#
# To drop and re-create the live database.
psql template1 postgres
\c template1
DROP DATABASE IF EXISTS vospace ;
CREATE DATABASE vospace ;
GRANT ALL ON DATABASE vospace TO junit ;
\c vospace
\q
Deploying the service
- Run all the sub-project build scripts in sequence (see buildall.sh in the top level directory).
- Copy the war file into tomcat as
astrogrid-vospace.war.
Configuring the service
Load the
configuration page to list the steps.
This should only be run once for a deployment.
WARNING : If you trigger this page on a live system, it will delete all of the data.
In the future, this page should only be accessible via a confirmation page.
This page contains links to the two initialiser servlets that configure the myspace and vospace endpoints.
You should only need to open each page once per deployment.
The initialiser servlets capture the webapp URL and generate the endpoint URLs for the services.
This page contains links to the two initialiser servlets that configure the http get and put transfer endpoints.
You should only need to open each page once per deployment.
The initialiser servlets capture the webapp URL and generate the endpoint URLs for the handlers.
Accessing the current data
- The last link lists the root nodes and their file store directories.
Registering a myspace service
The following assumes that you have a test environment configured using the
install scripts
provided in the vospace source tree.
- First create a root node, using the Create new tree link at the bottom of the node list page.
- Set the tree name to home.
- Change the registry authority to
org.astrogrid.demo (this is to match the way the registry eployed by the current install scripts)
- Set the file repository to point to a directory on your local machine (the permissions on this directory must be set to allow Tomcat to read and write new files).
- Creating the node should move you to the Node Details page, displaying details for the new
ROOT_NODE.
- The next step is to assign one or more services to the node, using the Add Service link at the bottom of the Node Details page.
- Add a MySpace? service to the node by clicking the Add button for the
urn:myspace-1.0 service.
- Assigning the service should move you to the Node service page, showing details of the node and the associated service.
- The next step is to create a tree node to represent the home directory for a user account.
- To navigate back to the Node Details page, click the Node identifier link in the Node details section of the Node service page.
- This should move you back to the Node Details page for the
ROOT_NODE.
- To add a tree node, click the Add child link at the bottom of the Children section.
- This should move you to the Create tree node form.
- Set the name to toad.
- Check the node type is set to
TREE_NODE.
- Creating the tree node should move you to the Node details page for the new
TREE_NODE.
- Check the node path is set to home/toad.
We should now have a
ROOT_NODE called
home and a
TREE_NODE called
toad.
To complete the configuration, we need to register the node service with the local Registry and Community.
To access all of the registration information, we first need to move back to the
ROOT_NODE using the
Parent link on
TREE_NODE page.
Then select the identifier link for the
urn:myspace-1.0 service in the list of
Services.
This should move you to the
Node Service page, showing details of the
ROOT_NODE, the
urn:myspace-1.0 service, and ivorns for the child node(s).
- The Reg link in the Web service details section should point to a JSP page that generates the registration resource for the MySpace? service.
- Copy the URL and paste it into the Upload from URL section of the Add Entry page on the local Registry.
The last step is to set the
MySpace? home folder for the test user.
- Goto the Account Admin page on the local Community service.
- Create a new user account called toad if there isn't one already.
Note - at the moment, the local Communuty service is configured to create
MySpace? home folders on the local
FileManager? service, so the
Home Space ivorn should be something like
ivo://org.astrogrid.demo/filemanager#node-100.
- To get the ivorn of the
TREE_NODE in the VOSpace service, go back to the Node Service page, for the ROOT_NODE.
- The Child node ivorns section at the bottom of the page should display the ivorn for the toad
TREE_NODE
- The ivorn for toad should look something like this
ivo://org.astrogrid.demo/8a80808816673a980116673beae50007#8a80808816673a9801166742ddab000a
- Copy the ivorn and paste it into the Home Space for the toad user in the Community Account Admin page.
You should now have a user account called
toad that uses the
MySpace? interface on the VOSpace service to store data.
To test the new configuration ...
- Run the AstroGrid wirkbench, and change the Registry Endpoints to point to the local Registry service.
- Login as user toad with community org.astrogrid.demo.
--
DaveMorris - 22 Nov 2007