Development Environment

Ensure you have all required development dependencies installed on your machine, version numbers listed on the dependencies page are important. 

The following are some helpful links to acquire said software:
Ensure the Grails binaries in $grails/bin are available on your path.

Acquiring Federation Registry

To acquire the Federation Registry code itself you'll need to decide if you wish to be able to contribute changes back to the upstream project or if you wish to simply consume new releases.

As a contributor
  1. Navigate to https://github.com/ausaccessfed/federationregistrymaster
  2. Click the 'fork' button
  3. This will result in your own Federation Registry project which you can modify when necessary
  4. This repository will be available at https://github.com/<yourusername>/federationregistrymaster and you should execute your git pulls and pushes against this repository.
  5. Remember to utilize GIT Flow when you're working as described at http://nvie.com/posts/a-successful-git-branching-model/ your changes should go into feature and bug fix branches which stem from the develop branch
  6. When you have changes for Federation Registry administrators to consider push these to your local development branch on Github and send a pull request (currently to the user 'bradleybeddoes')

As a consumer

  1. Navigate to https://github.com/ausaccessfed/federationregistrymaster
  2. Click the 'Downloads' button
  3. Under "Download Packages" click on the most recent release version
  4. Extract the resultant tar file to your disk

Setting up the development database

To assist developers we've provided a sample, populated database dump for use with MySQL.
  1. Create the database 'federationregistry' along with an account that has full read/write privileges
  2. Using mysql tools import the development-fr-db.sql file e.g mysql -u fr -p federationregistry < ./testdata/development-fr-db.sql
  3. Validate the database has imported correctly

Setting up your development environment

To get federation registry up and running in development mode undertake the following
  1. Ensure your JAVA_HOME variable points to a JDK
  2. Navigate to <your local path>/federationregistrymaster/app/federationregistry
  3. Set an environment variable with the name "fr_config" to the full path of the current directory on your system
  4. Copy fr-config.groovy.example to fr-config.groovy
  5. Edit your fr-config.groovy file (The following documentation uses dot notation. In the configuration file itself different levels are shown within braces. For example fedreg.bootstrap is equivalent to fedreg { bootstrap = ... }):
    1. Set fedreg.enabledemonstration to true
    2. Update values which reference aaf.edu.au to something suitable in your environment
    3. Uncomment the dataSource indicated for use in development environments
    4. Remove the definition for dataSource in production environments
    5. Modify the dataSource username, password and url values to point to your local MySQL instance created above
    6. Update the logging location to a suitable place on your local disk
  6. Execute grails importtheme from the command line to get the default AAF branding as a temporary measure.
  7. Execute grails run-app from the command line resulting in a lot of output followed by:
2011-02-03 14:38:10,251 [main] INFO  resource.ResourceService  - Performing a full reload
Server running. Browse to http://localhost:8080/federationregistry

At this point you can access http://localhost:8080/federationregistry in your web browser and login as one of the base development user accounts. You now MUST continue onto updating your branding.

Learning Grails

If you're new to Grails the resources at http://www.grails.org/Tutorials will be of benefit in coming upto speed. Look for newer documents that deal with the 1.3 releases to get the most from your reading.

Comments