Configuration

Setup

  • 1.) Go to the Administration gui for the servlet container.
  • 2.) Go to the Environment Entries for your context. In Tomcat this is Service->Host(LocalHost)->{context name}->Resources->Environment entries.
  • 3.) Change all the environment entries, to have the community id, and the endpoints to the registry, also define the registry identifier for a vospace/myspace used for accounts. (Hit Save after each of your changes, see "Note" at the end of this section.)
  • 4.) After Environment Entries are changed go to the "DataSources" (same area as Environment Entries) (see the sample DataSource config below.) Because of a resource-ref element inside the web.xml a DataSource with only a name filled out may be present.
  • 5.) Change the URL to not have "@WORKDIR@" but to a appropriate directory that will keep your database data and information. (Hit Save)
  • 6.) In Tomcat hit "Commit Changes" at the top.
  • 7.) Open up a web browser and go to your new community ex: http://localhost:8080/{context}
  • 8.) Go to the Admin pages, there it will report if your database is healthy or not, if this is the first time then it should NOT be healthy.
  • 9.) If not healthy go to "Reset DB" this essentially deletes everything from the db and recreates all tables and a small amount of test data to check if it is healthy. (This of course assumes if your not using hsqldb that you gave the user permission to create tables, if not you will need to take the sql file and create tables manually. See below on "Customize")
  • 10.) Reset the db and verify it is healthy, a message should say if it is healthy or not.
  • 11.) Now click on "Register Metadata" Fill in the Form details and the version of the type of Registry you wish to publish/register to. (hit Submit). Normal current registry version in use is 0.10
  • 12.) Verify the XML looks correct and hit (Register).
  • 13.) Your Setup is now complete you may begin adding accounts, groups, and others.
Note: Only the latest tomcat will let you change the value field past 70 characters. You may go into your server.xml and change or more preferred is in tomcat you may go to tomcat/conf/Catalina/localhost/{context}.xml file and change the properties manually. A restart of tomcat is not required in this method but may take up to 30 seconds for tomcat to catch your new changes to this file.

*A final note; if you do not see your file in there, then you need to go to the Administration GUI and just hit commit changes, servlet containers such as tomcat only creates the file after a commit changes button is hit; only needs to be done this first time.

Properties

  • org.astrogrid.community.ident - community identifier, must be changed.
  • org.astrogrid.community.default.vospace - default vospace identifier (normally a filemanger)
  • org.astrogrid.registry.query.endpoint - regustry query endpoint normally.
  • org.astrogrid.registry.admin.endpoint - your publishing registry to send your registry. (may be or may not be the same as the query endpoint)

Customize

See the "{context app location}/WEB-INF/classes" directory for configuration files if you need to change the sql used to create tables, or possibly even the JDO mapping. The sql file below is for hsqldb sql syntax which is slightly different than other databases hence it is expected you will need to change the sql file. There are 3 files.

  • astrogrid-community-database.sql -- SQL used to create table data.
  • astrogrid-community-database.xml -- no real need to change it points to the mapping file in the same directory.
  • astrogrid-community-mapping.xml -- most likely no need to change -- JDO mapping for Castor. See Castor for more information on the mapping.

Sample Database Config

Sample DataSource Config for hsqldb

Data Source PropertyExample Value
JNDI Name:jdbc/org.astrogrid.community.database
Data Source URL:jdbc:hsqldb:/data/workarea/community/org.astrogrid.community
JDBC Driver Class:org.hsqldb.jdbcDriver
User Name:sa
Password: