How to Build

This page describes how to build GUMS and set up an environment for deploying it.

Download

The source will soon be downloadable from our Subversion repository at https://svn.usatlas.bnl.gov/svn/privilege. This has not been possible as of yet because of the difficulty in configuring Subversion with write SSL access for specific individuals and at the same time, read SSL access for everyone. You may request a tarball of the source in the meantime by contacting us at gums-dev-l@lists.bnl.gov.

Install Software

Install Java, Tomcat, MySQL, Maven 2, and Cargo. We recommend using YUM with the JPackage repository for installing these. Instructions can be found at http://www.racf.bnl.gov/experiments/usatlas/griddev/griddevhowto. Another good package to install is Eclipse, for which you can install the Maven Eclipse Plugin.

Configure

Follow the instructions at the manual installation page for configuring Tomcat, creating the database, and adding yourself as an administrator.

Unit Tests

Unit tests provide an easy way to make a change and quickly ensure you haven't broken anything. gums-core has three levels of unit tests:

  • no-test - only tests that do not require other services (best practice for JUnit).
  • standard-test - only tests that do not require other services (best practice for JUnit).
  • local-test - standard tests plus those that require Tomcat and MySQL to be installed and configured. Requires db.properties and hibernate.properties be correctly configured within the src/test/config directory.
  • external-test - standard and local tests plus those that rely on an external voms and ldap server. Requires voms.properties and ldap.properties be correctly configured within the src/test/config directory. The voms server should be named griddev and contain group /griddev/subgriddev and role griddevRole, for which should exist users "/DC=org/DC=griddev/OU=People/CN=John Smith" and "/DC=org/DC=griddev/OU=People/CN=Jane Doe 12345". The ldap server should be set up with the LDAP schema, gums.schema, and the ldif file, griddev.ldif, found in the src/main/ldap directory.

The default test is standard. To change this, add the following section to your ~/.m2/settings.xml file:

<settings>
        ...
        <profiles>
                <profile>
                        <id>local-test</id>
                        <activation>
                                <activeByDefault>true</activeByDefault>
                        </activation>
                </profile>
        </profiles>
</settings>

or with 'local-test' replaced by 'external-test' or 'no-test'.

Build

Build using Maven 2 with:

[root@privilege /]# cd gums-site
[root@gums-site /]# mvn install site
[root@gums-site /]# cd ../gums-service
[root@gums-service /]# mvn cargo:redeploy

or each invididual project as:

[root@privilege /]# cd gums-core
[root@gums-core /]# mvn install 
[root@gums-core /]# cd ../gums-service
[root@gums-service /]# mvn install cargo:redeploy
[root@gums-service /]# cd ../gums-client
[root@gums-client /]# mvn install
[root@gums-client /]# cd ../gums-site
[root@gums-site /]# mvn site

It is normal to see errors during the testing phase of GUMS since errors are purposefully being created to ensure GUMS catches them. However, you will know that the tests passed by output:

Results :

Tests run: 149, Failures: 0, Errors: 0, Skipped: 0