Copyright (C) 2010 SURFnet BV
All rights reserved.

RELEASE INFORMATION

Project:           COIN-testsp
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 Test SP 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 Test SP 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-testsp-war-<<VERION>>.war' file.
(e.g. coin-testsp-war-0.1-SNAPSHOT.war)

Navigate to '<<CATALINA_HOME>>/work/testsp.{dev,test,acc}.surfconext.nl/
Delete the entire testsp 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-testsp.properties.dev
- coin-testsp.properties.acc
- coin-testsp.properties.prod
- coin-testsp.properties.test

For different environments different property files are delivered. Pick the 
appropriate property file (one coin-testsp 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-testsp.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/<<TESTSP-VIRTUAL-HOST-DIRECTORY>>
(e.g. /opt/tomcat/conf/Catalina/testsp.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 TEST SP APPLICATION SP
==============================================================

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

# Oauth properties
coin-container-key=https://testsp.dev.surfconext.nl/testsp/gadget-iframe.xml
coin-container-secret=mysecret

These key/value pairs need to be registered in the service-registry (e.g. Janus). The value of the
property coin-container-key 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://testsp.dev.surfconext.nl/.*).

The value of the coin-container-secret is the value of the
metadata entry coin:oauth:secret. The metadata entries should be added to the Test SP entry.
