Installation

Table Of Contents

Overview
Prerequisites
Step-by-step installation
Checkout the source code
Database setup
Creating User and Schemas
Load the sample data
Build and deploy gadgets on the Shindig Server
Prepare the Apache Shindig Container
Adjust gadget configuration (if not on local environment)
Building and deploying the Gadgets
Build and deploy SocialGrail
Configure the SocialGrail Application
Adjust Database configuration
Build and deploy WAR-File
Start Social Grail Server

var orderNumber = null;
var resString = '';
$('a[name]').each(function(index){
  // console.log($(this).parent().prop('tagName'));
  var tagName = $(this).parent().prop('tagName');
  var marginLeft = 10;
  
  if(tagName.length == 2 && tagName[0].toLowerCase() == 'h'){
    orderNumber = parseInt(tagName[1]);
    if($(this).attr('name') != 'toc')
      resString += '<div style="margin-left:'+((orderNumber-1)*marginLeft)+'px"> <a href="#'+$(this).attr('name')+'">"+$(this).text()+'</a></div>'+"\r\n";
  }
});

console.log(resString);
Don't delete: For TOC generating just open jqueryify this page, open Firebug, make the code-element above visible and paste its content into the console. Then copy the console output between the DIV element with id "toc_content"

Overviewtop

SocialGrail consists of four components/projects:

The Apache Shindig Server is used for hosting two OpenSocial Gadgets (more on Gadgets):

Prerequisitestop

The requirements for running SocialGrail are:

These three required components are the stack that SocialGrail will be installed on. To quickly install we recommend you to take use of the Bitnami Tomcat Stack:
Download the appropriate stack for your operating system (Mac OS X User: Since Mac OS X has a built-in Java SDK, the stacks comes without the JAVA SDK) and install two Tomcat Server instances:

Please note: To control the Tomcat Server provided with the BitNami Tomcat Stack, you could use the BitNami Wiki for Apache Tomcat.

Also important: Please note the passwords for MySQL's root and Tomcat's manager which you will choose during the installation, which we will use later as MYSQL_ROOT and TOMCAT_MANAGER

Step-by-step installationtop

Checkout the source codetop

SocialGrail is based on several sources. Create a folder on your server, e.g. /social. Then checkout the projects as mentioned:

$> svn co http://subversion.assembla.com/svn/socialgrail/webapp/trunk /social/socialgrail
$> svn co http://subversion.assembla.com/svn/socialgrail/webapp/shindig/shindig-1.1 /social/shindig
$> svn co http://subversion.assembla.com/svn/socialgrail/webapp/dblp /social/dblp
$> svn co http://subversion.assembla.com/svn/socialgrail/webapp/project /social/project

Database setuptop

Creating User and Schemastop

We will create one database user named socialgrail with a default password 123456.
If you choose a different name or password, you'll have to adjust it to your user/password combination when we configure the SocialGrail-Application.

To create the databases and users by shell you can use these sample command lines:

 // in the normal shell type
mysql --host=127.0.0.1 --port=3306 -u MYSQL_ROOT  -pMYSQL_ROOT_PASSWORD
-- Create the user
create user 'socialgrail'@'localhost' IDENTIFIED BY '123456';
create schema socialgrail CHARACTER SET=utf8;
create schema socialgrail_test CHARACTER SET=utf8;
create schema dblp CHARACTER SET=utf8;
create schema project CHARACTER SET=utf8;
-- Grant the necessary rights with the following commands
grant all privileges on socialgrail.* to 'socialgrail'@'%' identified by '123456';
grant all privileges on socialgrail_test.* to 'socialgrail'@'%' identified by '123456';
grant all privileges on dblp.* to 'socialgrail'@'%' identified by '123456';
grant all privileges on project.* to 'socialgrail'@'%' identified by '123456';

This results in the following database setup:

database name user name password
socialgrail socialgrail 123456
socialgrail-test socialgrail 123456
dblp socialgrail 123456
project socialgrail 123456

Load the sample datatop

After databases and users are created some sample data should be initialized. With help of dblp-Gadget the user is able to search all publications of an author. Therefore we need to import data of all publications and their authors into the dblp database. On FacetedDBLP website select "Getting the database dump" to retrieve sample data for the dblp database. Currently it has the size of about 100Mb. After downloading this file, extract it and import it to the dblp database by the following command:

$> mysql -u socialgrail -p dblp < dblp-YYYY-MM-DD.sql

The data and content of the other databases, as socialgrail and socialgrail-test will be generated automatically by bootstrap of SocialGrail application.

Build and deploy gadgets on the Shindig Servertop

Prepare the Apache Shindig Containertop

Before deploying gadgets on gadget-server you have to deploy the gadget container – in our case the Shindig Server – on gadget-server.

rm -rf /PATH_TO_GADGET_SERVER/webapps/ROOT/
cp /social/shindig/java/server/target/shindig-server-1.1-BETA5-incubating.war /PATH_TO_GADGET_SERVER/webapps/ROOT.war

This removes the old ROOT directory from the webapps folder and copies the WAR-file that is shipped with the Shindig Server as the new ROOT Application.

Adjust gadget configuration (if not on local environment)top

Before building the two gadgets "dblp" and "project" for each gadget you have to configure IP or domain of the gadget-server.

Building and deploying the Gadgetstop

To deploy the two gadgets on gadget-server, you need to build and copy the WAR-files of each of the gadgets to the webapps folder of your gadget-server.

Build and copy "dblp" to gadget server

cd /social/dblp
grails prod war
cp /social/dblp/target/dblp-0.1.war /PATH_TO_GADGET_SERVER/webapps/dblp.war

Build and copy "project" to gadget server

cd /social/project
grails prod war
cp /social/project/target/project-0.1.war /PATH_TO_GADGET_SERVER/webapps/project.war

Your gadget-server should contain now three war files ROOT.war, dblp.war and project.war. You can start now the gadget-server (depends on your tomcat installation) to deploy the war files.

Build and deploy SocialGrailtop

Configure the SocialGrail Applicationtop

Before building the war-file for "socialgrail" the following minimum configuration must be done:

Adjust Database configurationtop

In /social/socialgrail/grails-app/conf/Config.groovy there are 4 sets of database credentials that can be provided, each consisting of name, user name and password.
If you didn't use socialgrail and 123456as the password you need to adjust the user/password combination here:

Build and deploy WAR-Filetop

Now under socialgrail folder you can compile the project and build/generate the WAR-file with the following Grails command:

Please note: The SocialGrail installation is currently running on Grails 1.3.4. Since this is the first time that we are building the WAR-file after the checkout, we need to upgrade the socialgrail from it's current version to Grails 1.3.7, the one we installed earlier in this guide.

cd /social/socialgrail
grails upgrade

Now we are ready:

cd /social/socialgrail
grails prod war
rm -rf /PATH_TO_SOCIALGRAIL_SERVER/webapps/ROOT/
cp /social/socialgrail/target/ROOT-0.2.war /PATH_TO_SOCIALGRAIL_SERVER/webapps/ROOT.war
This copies the built WAR-File to the webapps Folder of the Tomcat Server. The old ROOT is deleted before to have clean sheet.

Start SocialGrail Servertop

Now start your socialgrail server instance (remember that we need two tomcat server, as mentoined above) and go to the URL http://localhost:8080 (or your chosen URL if you're not working locally).

If everything went fine, you have now the possibility to login to SocialGrail with the following credentials:

If you have any problems with the installation please do not hesitate to contact the SocialGrail Team socialgrail (at) volzinnovation.com.
If you’re using SocialGrail in your enterprise you can contact us for Support