Installation

History Key

  • New content
  • Removed content

Recent Versions

Choose two versions to compare, or click the link to view it.

  1. 5. 7 months by abta1978
  2. 4. 7 months by abta1978
  3. 3. 7 months by abta1978
  4. 2. 7 months by abta1978
  5. 1. 7 months by abta1978
 

Table Of Contents


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"

Overview top

!SocialGrail consists of four components/projects:

  • The !SocialGrail Web-Application, written in Groovy and the Groovy Web-Framework Grails.
  • The Apache Shindig Server, an !OpenSocial container that helps you to start hosting !OpenSocial apps quickly by providing the code to render gadgets, proxy requests, and handle REST and RPC requests

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

  • dblp Search all publications of an author
  • project Create, edit, delete your project information

Prerequisites top

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:

  • the !SocialGrail instance for the !SocialGrail Web-Application, running on port 8080, !MySQL Port 3306, shutdown port 8005, Tomcat SSL Port 8443 and Tomcat AJP Port 8009.
    We will refer to this as the SOCIALGRAIL_SERVER
  • the Apache Shindig Instance for our !OpenSocial Gadgets, running on port 9090, !MySQL Port 3307, shutdown port 8006, Tomcat SSL Port 8444 and Tomcat AJP Port 8010
    We will refer to this as the GADGET_SERVER

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

  • With this documentation you could e.g. shutoff the second !MySQL Server (running on port 3307) that was installed with the GADGET_SERVER.
  • What you definetly should is to shutdown both Tomcat Server with ./ctlscript.sh stop tomcat command in both Servers

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 installation top

Checkout the source code top

!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 setup top

Creating User and Schemas top

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 data top

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 Server top

Prepare the Apache Shindig Container top

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.

  • Configuration of IP/domain for gadget dblp:
    Open /social/dblp/web-app/gadget/publication1.1.xml replace all entries of localhost with YOUR_DOMAIN
  • Configuration of IP/domain for gadget project:
    Open /social/ project/web-app/gadget/project1.1.xml replace all entries localhost with YOUR_DOMAIN

Building and deploying the Gadgets top

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 SocialGrail top

Configure the SocialGrail Application top

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

  • Open /social/socialgrail/src/groovy/search/YSearchResultSet.groovy, find a variable named yAppID and set it's value to your Yahoo Boss App ID (Requesting a Yahoo Boss ID
  • Open /social/socialgrail/grails-app/conf/Config.groovy and:
    • (only if not on local environment) find a variable named inno.host, and set its value with YOUR_DOMAIN:8080
    • (only if not on local environment) find a variable named shindig.host, and set its value with YOUR_DOMAIN:9090
    • Find email configuration and set them with correct values provided by your email's service provider, the following is an example for the Googlemail server:
      See the Grails Mail Plugin for further configuration details
      grails {
         mail {
           host = "smtp.googlemail.com"               
           port = 465                                             
           username = "youracount@gmail.com"  
           password = "yourpassword"                 
           props = [
             "mail.smtp.auth":"true", 					   
             "mail.smtp.socketFactory.port":"465",
             "mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
             "mail.smtp.socketFactory.fallback":"false"
           ]
      } }
      

Adjust Database configuration top

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:

  • the dblp database with the config parameters inno.db.dblp.*
  • the project database with the config parameters inno.db.project.*
  • the socialgrail database with the config parameters inno.db.opensocial.*
  • and a dump database with the config parameters inno.db.dump.*

Build and deploy WAR-File top

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 Server top

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:

  • Username: socialgrail
  • Password: 111111

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