Deploying Data Service Resources via the Command-line

To deploy a data service resource:

  1. Take a copy of data.service.resource.properties in the OGSA-DAI WSRF distribution directory.
  2. Load the file into an editor and provide values specifying your data service resource - the comments in the file should help you.
  3. When done, save the file.
  4. Put all the JARs implementing the data resource driver (if required by your data resource) within the drivers directory within the OGSA-DAI WSRF binary distribution directory.
  5. Run the following command from within the OGSA-DAI WSRF binary distribution directory:
    $ ant deployResource -Ddai.container=/path/to/Web/services/container
      -Ddai.resource.file=DAI-SERVICE-RESOURCE-FILE
    
  6. The data service resource will be deployed. For example:
    $ ant deployResource -Ddai.resource.file=my.config 
      -Ddai.container=/path/to/Web/services/container
    ...
    [echo] Reading properties file my.config
    [echo] Data service resource ID: MySQLResource
    [echo] Data resource type: Relational
    [echo] Data resource product: MySQL
    [echo] Data resource vendor: MySQL
    [echo] Data resource version: 1.0
    [echo] Data resource URI: jdbc:mysql://myhost.example.com:3306/ogsadai/DATABASE
    [echo] Data resource credential: 
    [echo] Data resource user name: ogsadai
    [echo] Data resource password: ogsadai
    [echo] Data driver class: org.gjt.mm.mysql.Driver
    [echo] Deploying data service resource MySQLResource...
    ...
    [echo] Data service resource deployed!
    
    You may see warnings of the type:
    [copy] Warning: Could not find file /home/user/ogsadai-wsrf-2.2/${dai.driver.jars.0} to copy.
    
    You can ignore these.
  7. Values in the same data service resource file can be overridden at the command line via the use of -Dproperty=value flags.