Service properties

To function correctly, the FileStore service needs to know four things

  • The service configuration name
  • The IVO identifier for this service in the global registry
  • The base URL for HTTP access to files in the store
  • The location of the local repository

Service name

If you are only deploying one FileStore service, just set the service name to org.astrogrid.filestore and skip the rest of this section.

In order to support multiple FileStore services within one installation, each FileStore service can be given a different name.

Each service uses its name as a prefix to lookup the configuration properties for that service.

This feature is used primarily in the AGINAB test environment to enable multiple FileStore services to be configured from one shared configuration file.

If the service name is set to my.filestore

Then the service will then look for the rest of its configuration properties using this as a prefix.

my.filestore.service.ivorn=ivo://authority/resource
my.filestore.service.url=http://hostname:port/context/filestore
my.filestore.repository=/var/filestore/...
This means that one configuration file can support more than one FileStore service.
#
# Configuration for filestore one
test.one.service.ivorn=ivo://authority/resource
test.one.service.url=http://hostname:port/context/filestore
test.one.repository=/var/filestore/one
#
# Configuration for filestore two
test.two.service.ivorn=ivo://authority/resource
test.two.service.url=http://hostname:port/context/filestore
test.two.repository=/var/filestore/two

The IVO identifier

In order to generate the correct identifiers for containes within the store, the FileStore service needs to know its IVO registry identifier.

This should be set to the same IVO identifier used to register the service in the global registry.

ivo://authority/resource

The base URL

In order to generate URLs for external components to access data within the store, the FileStore service needs to know the base URL.

This should be set to the URL of the Tomcat server, the context for the deployed WebApplication, plus the servlet name, filestore.

Unless you are modifying the context yourself, the WebApplication context will be the same name as the deployed war file. If the war file is called astrogrid-filestore.war, then the WebApplication context will be astrogrid-filestore.

If the URL for your Tomcat server is http://example.org:8080/, and the deployed war file was called astrogrid-filestore.war, then the base URL will be

http://example.org:8080/astrogrid-filestore/filestore

The local repository

The FileStore service needs read and write access to a local directory on your system to store its data files. This directory should not be located within the WebApplication itself, otherwise deploying an updated war file may delete the stored data files.

Unix example :

/var/astrogrid/filestore/
Windows example :
C:\\astrogrid\\filestore\\

TODO - Need to check the syntax for a Windows file path.