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.
  • ** Newer tomcat 5.5 does not install Administratin GUI so you much change the context.xml file yourself. See "JDBC Resources" for Tomcat 5.5 or manually for tomcat 5.0 is Tomcat 5.0
  • 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

These are required for the community to function.

  • 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)

These are to do with the certificate authority and MyProxy service, which are experimental. Don't bother setting these in a production community.

org.astrogrid.community.cacert
The absolute name of the file containing the certificate authority's root certificate. The file should be a PEM file.
org.astrogrid.community.cakey
The absolute name of the file containing the certificate authority's private key. The file should be a PEM file. Don't make this file world-readable.
org.astrogrid.community.caserial
The absolute name of the file containing the certificate authority's serial-number record. The file should be a text file containing one line. That line contains the last serial number to be used in an issued certificate (which is zero for a new certificate authority, since the authority's own certificate is number zero). The number must be written as hexidecimal digits, padded on the left with zeros to make an even number of digits. E.g., 00, 01, 42 and 0fff are all valid; 1 and 123 are not as they have odd numbers of digits.
org.astrogrid.community.myproxy
The absolute name of the directory in which MyProxy keeps its records. By convention, this is /var/myproxy for a MyProxy installation owned by root or $GLOBUS_LOCATION/var/myproxy for a MyProxy installation owned by another user.

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:

Castor Engine Types

Engine Type NameDatabase Full Name
mysqlMySQL
db2DB/2
genericGeneric JDBC support
hsqlHypersonic SQL (default)
informixInformix
instantdbInstantDB
interbaseInterbase
oracleOracle 7 - Oracle 9i
postgresqlPostgreSQL 7.1
sapdbSAP DB
sql-serverMicrosoft SQL Server
sybaseSybase 11

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. You should find a "mysql" example file in this directory where by you could copy it over the original "astrogrid-community-database.sql" if you have mysql. There are 3 files.

  • astrogrid-community-database.sql -- SQL used to create table data.
  • astrogrid-community-database.xml -- By default this is setup for hsqldb, but for other databases change the engine type attribute, a list of the engine types are given below.
  • astrogrid-community-mapping.xml -- most likely no need to change -- JDO mapping for Castor. See Castor for more information on the mapping.