Difference between revisions of "D4Science Portal Installation"

From Gcube Wiki
Jump to: navigation, search
(Install Tomcat)
(Install Gridsphere)
Line 46: Line 46:
  
 
Now, you have a portal instance!
 
Now, you have a portal instance!
Some more steps are still needed:
+
However, this gridsphere version has a bug regarding static content (htmls), so some more steps are still needed:
 
* start tomcat and finish portal setup (database, first login account, etc). After setup nothing will be displayed, follow the next instruction.  
 
* start tomcat and finish portal setup (database, first login account, etc). After setup nothing will be displayed, follow the next instruction.  
 
* stop tomcat
 
* stop tomcat

Revision as of 15:25, 6 November 2008

Alert icon2.gif THIS SECTION OF GCUBE DOCUMENTATION IS CURRENTLY UNDER UPDATE.

Install gCore

In order to install D4Science Portal, you need to install gCore. You can download the last version of gCore from here. Instuctions about how to install gCore can be found here

Install Tomcat

If there is no tomcat installation on your node, you need to download and install it. You should use tomcat v. 5.5.20. You can download tomcat from here.
After installing tomcat, you should edit $CATALINA_HOME/conf/server.xml file:

  1. Change the listener port in <Connector> for http from 8080 to whatever you want (if needed).
  2. In the same <Connector>, add the statement emptySessionPath="true". This forces all web-applications to use the same session ID.

Setup Tomcat

In order to enable tomcat to consume WSRF services, you have to apply some changes on tomcat's files:

  1. modify $CATALINA_HOME/bin/setclasspath.sh => Remove the line where the classpath is reset (CLASSPATH=)
  2. around line 72 of $CATALINA_HOME/bin/setclasspath.sh modify the CALSSPATH like this CLASSPATH="$CLASSPATH":"$JAVA_HOME"/lib/tools.jar
  3. add the mail.jar in $CATALINA_HOME/common/endorsed

Setup Environment

  1. The new D4Science portal requires a Gridsphere 3.1. Installation. You can download a clean version of Gridsphere 3.1 from ETICS ). Then unzip - untar the file.
  2. You will also need this sh file. This is a replacement of the original globus-devel-env.sh which excludes some jars from gCore (because they are older than the needed by the portal and they create conflicts). Download it and store it in $CATALINA_HOME.
  3. Clone the current ~/.bashrc to ~/.bashrc_portal, and modify the following:
    1. clean CLASSPATH: "export CLASSPATH="
    2. add CATALINA_HOME evn. variable (the home directory of tomcat)
    3. add GRIDSPHERE_HOME env. variable (the home directory of gridpshere)
    4. add JAVA_HOME env. variable (the home directory of java)
    5. add GLOBUS_LOCATION env. variable (the home directory of gCore)
    6. add CATALINA_OPTS env. variable "export CATALINA_OPTS=-DGLOBUS_LOCATION=$GLOBUS_LOCATION"
    7. add CATALINA_PID env. variable "export CATALINA_PID=~/pid.txt"
    8. remove the "source" command of globus-devel-env
    9. add a new "source" command for the modifies globus-devel-env script: "source $CATALINA_HOME/globus-devel-env-local.sh"
  4. Some jars of gCore create conflicts that can only be resolved by removing them... These are the naming*.jar jars and can be found in $GLOBUS_LOCATION/lib folder. So you have to remove these jars and then add the jars found here.

Install Gridsphere

If you want to have the D4Science look and fell, you have to apply the theme patch. You can download it from here. Then unzip - untar the file and from the D4Science-ThemesAndLayouts directory execute: "source patch.sh".

Now you are ready to deploy gridsphere!!! (If you want to deploy gridsphere on a different context that "/gridsphere/gridsphere", then you have to modify $GRIDSPHERE_HOME/build.properties file). Execute the following command:

  • source ~/.bashrc_portal
  • cd $GRIDSPHERE_HOME
  • ant install

Now, you have a portal instance! However, this gridsphere version has a bug regarding static content (htmls), so some more steps are still needed:

  • start tomcat and finish portal setup (database, first login account, etc). After setup nothing will be displayed, follow the next instruction.
  • stop tomcat
  • execute the following command: "rm -rf ~/.gridsphere/content/repository; cp -Rf $GRIDSPHERE_HOME/webapps/gridsphere/WEB-INF/CustomPortal/content/ ~/.gridsphere/"
    => This command replaces the content so it correctly render header and footer...
  • start tomcat again

Start /Stop Tomcat

In order to start / stop tomcat, you should execute the following commands correspondingly:

  • source ~/.bashrc_portal; $CATALINA_HOME/bin/catalina.sh start
  • source ~/.bashrc_portal; $CATALINA_HOME/bin/catalina.sh stop -force

Install ASL

If dynamic deployment is available, then you should prefer it.
Otherwise, in order to install ASL, you have to execute a set of steps:

  1. Download its lastest version from distribution site.
  2. Copy its dependency jars to $GLOBUS_LOCATION/lib folder.
    The set of these jars for 1.0.4 version can be found here. However, they can be stale. In this case, you have to go to ETICS Reports and download their latest version.
  3. Create a new directory "$CATALINA_HOME/shared/d4s"
  4. Add to $CATALINA_HOME/shared/d4s a vomsAPI.properties file containing information described here

Deploy Basic Portlets

In order to be able to login on a VRE, and to administer users and VREs, you have to deploy two portlets. Follow these steps:

  1. Download org.gcube.portlets-admin.user-management-0.0.0-0.tar.gz and org.gcube.portlets-user.login-portlet-0.0.0-0.tar.gz
  2. Create two new folders: "login-portlet", and "usermanagement-portlet"
  3. Extract each of these files to the corresponding newly created folder.
  4. Go to each of the folder and execute the command: "ant"
  5. Restart tomcat

Applications Needed

Apache Tomcat 5.5.26. You also need to download a org.postgresql.Driver (download jdbc driver from http://jdbc.postgresql.org/).

Install the GS Portal

You may want to follow instructions from http://www.gridsphere.org/

You should also place the required JDBC driver jar file in the $CATALINA_HOME/common/lib directory of Tomcat.


First Run Of the Portal

GS will ask you to decide which database you want to make it using. D4Science is going to use a centralized PostgreSQL DB. Ask me directly for its location and connection data.

Changing Gridsphere DB Location once portal is installed

You should stop Tomcat, change the file located in $portaluser/.gridsphere/database/hibernate.properties Startup Tomcat

For info on the Authorative LDAP DB please refer to the next section in this guide.