Copyright (C) 2010 SURFnet BV
All rights reserved.

RELEASE INFORMATION

Project:           COIN Shindig Server
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.  Prepare database

    4.  Update database

    5.  Deploy war file

    6.  Start tomcat


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 Shindig Server 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 'shindig-server-<<VERION>>.war' file. 
(e.g. shindig-server-2.0.0-COIN-SNAPSHOT.war)

Navigate to '<<CATALINA_HOME>>/work/os.{dev,test,acc}.surfconext.nl/
Delete all the contents in the ROOT directory.

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-shindig.properties
- coin-shindig.properties.acc
- coin-shindig.properties.prod
- coin-shindig.properties.test

For different environments different property files are delivered. Pick the 
appropriate property file for your environment from the following directory:
<<EXTRACTED_TAR_BALL_PATH>>/tomcat/conf/classpath_properties

Copy the chosen property file to <<CATALINA_HOME>>/conf/classpath_properties/coin-shindig.properties

2.4 Copy the private RSA key

The file keys/oauthkey.pem must be copied to the tomcat directory (<<EXTRACTED_TAR_BALL_PATH>>/tomcat/conf/classpath_properties/keys).
In the coin-shindig.properties file the location of the oauthkey.pem file is defined with the key/value 'shindig.signing.key-file=keys/oauthkey.pem'
'
2.5 Copy the blobkey.txt

The file keys/blobkey.txt must be copied to a directory on the server. In the coin-shindig.properties file the 
location of the blobkey.txt file is defined with the key/value 'gadgets.securityTokenKeyFile=/????/blobkey.txt'

3. PREPARE DATABASE
===================

coin-shindig uses a mysql database with the innodb engine. 

If this is the first time that you install the coin-shindig, you have to 
create a database for the coin-portal. For security reasons also create
a database user for the coin-shindig.

The database must be called: shindig

The database create script can be found here:
<EXTRACTED_TARBALL_PATH>>/db

4. UPDATE DATABASE
==================

If you are upgrading Shindig it may be necessary to update the database. 
Please see the update scripts that are located in the following location:
<<EXTRACTED_TAR_BALL_PATH>>/db/coin-shindig-update-scripts/

NB. Please select the appropriate update scripts for the release you are installing / upgrading.
    
e.g. If you are updating from release 1.x to release  1.5.x and the following update files are provided:
- update-version-1.0.0-1.0.1.sql
- update-version-1.0.1-1.3.0.sql
- update-version-1.3.0-1.4.0.sql
- update-version-1.4.0-1.5.0.sql

You should execute all the sql files in the sequence stated above. 

5. DEPLOY WAR FILE
==================

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

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


Empty work / webapps directory (os.{dev,test,acc,prod}.surfconext.nl)


6. START TOMCAT
===============

Start tomcat again.
