Copyright (C) 2010 SURFnet BV
All rights reserved.

RELEASE INFORMATION

Project:           COIN-Teams
Date:              2010-11-04

Content:

    1.  Unpack tarball

    2.  Prepare Tomcat
      2.1 Stop Tomcat
      2.2 Undeploy a previous version
      2.3 Copy / edit property files

    3.  Deploy war file

    4.  Start tomcat

    5.  Configure the OAuth key/secret for the Teams application SP


1. UNPACK TARBALL
=================

Unpack the provided tarball on the server that you want to deploy
the application on. e.g. extract the tarball in /tmp


2. PREPARE TOMCAT
=================

This installation document only provides documentation for the Tomcat 
application server.

If you already have deployed a previous version of the COIN Teams application
you must follow step 2.2 to undeploy the previous version

2.1 Stop Tomcat

Stop the tomcat application server

2.2 Undeploy a previous version (optional)

Navigate to the '<<CATALINA_HOME>>/wars/'
(e.g. /opt/tomcat/wars/)
delete the 'coin-teams-war-<<VERION>>.war' file. 
(e.g. coin-teams-war-0.1-SNAPSHOT.war)

Navigate to '<<CATALINA_HOME>>/work/teams.{dev,test,acc}.surfconext.nl/
Delete the entire teams directory listed there.

2.3 Copy / edit property files

Out-of-the-box the tarball comes with a number of different property files. 
A number of property files are delivered:

- coin-teams.properties.acc
- coin-teams.properties.prod
- coin-teams.properties.test


- grouper.client.properties.acc
- grouper.client.properties.prod
- grouper.client.properties.test

For different environments different property files are delivered. Pick the 
appropriate property files (one coin-teams and one grouper.client property file) for your environment from the following directory:
<<EXTRACTED_TAR_BALL_PATH>>/tomcat/conf/classpath_properties

Copy the chosen property files to <<CATALINA_HOME>>/conf/classpath_properties/coin-teams.properties and grouper.client.properties

Edit the values of the property files according to your environment.


3. DEPLOY WAR FILE
==================

Copy the provided context descriptor from 
<<EXTRACTED_TAR_BALL_PATH>>/tomcat/conf/context
to 
<<CATALINA_HOME>>/conf/Catalina/<<TEAMS-VIRTUAL-HOST-DIRECTORY>>
(e.g. /opt/tomcat/conf/Catalina/teams.dev.surfconext.nl)

Now, copy the coin-portal war located at
<<EXTRACTED_TAR_BALL_PATH>>/tomcat/webapps
to
<<CATALINA_HOME>>/wars/
(e.g. /opt/tomcat/wars/


4. START TOMCAT
===============

Start tomcat again.

5. CONFIGURE THE OAUTH KEY/SECRET FOR THE TEAMS APPLICATION SP
==============================================================

The property file coin-teams.properties (see step 2.3) contains the following two entries:

# Oauth properties
oauthKey=https://gui.dev.coin.surf.net/teams/media/teams.xml
oauthSecret=mysecret

These key/value pairs need to be registered in the service-registry (e.g. Janus). The value of the
property oauthKey maps to the metadata entry 'coin:gadgetbaseurl' with the exception it needs to be a 
regular expression that matches the value of the oauthKey (e.g. https://gui.dev.coin.surf.net/.*). 

The value of the oauthSecret is the value of the 
metadata entry coin:oauth:secret. The metadata entries should be added to the portal SP. 

