SocialGrail consists of four components/projects:
The Apache Shindig Server is used for hosting two OpenSocial Gadgets (more on Gadgets):
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:
SOCIALGRAIL_SERVER
GADGET_SERVER
Please note: To control the Tomcat Server provided with the BitNami Tomcat Stack, you could use the BitNami Wiki for Apache Tomcat.
GADGET_SERVER. ./ctlscript.sh stop tomcat command in both ServersAlso 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
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
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 |
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.
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.
Before building the two gadgets "dblp" and "project" for each gadget you have to configure IP or domain of the gadget-server.
/social/dblp/web-app/gadget/publication1.1.xml replace all entries of localhost with YOUR_DOMAIN
/social/ project/web-app/gadget/project1.1.xml replace all entries localhost with YOUR_DOMAIN
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.
Before building the war-file for "socialgrail" the following minimum configuration must be done:
/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
/social/socialgrail/grails-app/conf/Config.groovy and:inno.host, and set its value with YOUR_DOMAIN:8080
shindig.host, and set its value with YOUR_DOMAIN:9090
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"
]
} }
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:
inno.db.dblp.*
inno.db.project.*
inno.db.opensocial.*
inno.db.dump.*
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.
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