CVRG Portal

From CVRG Wiki

Jump to: navigation, search

Overview 

Below you will find a list of technologies used by the CVRG to create both the portal and portlets. These technologies have all been deployed/tested in CentOS 5.2(RHEL) running in VMWare on Windows XP as the host OS:

Technology Version URL
Liferay 4.4.2 http://www.liferay.com/web/guest/home
MySQL 5.0.28 http://dev.mysql.com/doc/
Apache Ant 1.7.0 http://ant.apache.org/
Java SE 5.0 http://java.sun.com/j2se/1.5.0/
Globus ws-core-enum-4.0.3 http://www.globus.org/
Tomcat 6.0 http://tomcat.apache.org/tomcat-6.0-doc/
ICEfaces 1.7.1 http://www.icefaces.org/main/home/index.jsp
Java EE 2.5 http://java.sun.com/javaee/
JSP 2.1 http://java.sun.com/products/jsp/
JSF 1.2 http://java.sun.com/javaee/javaserverfaces/
Spring 2.5 http://www.springframework.org/documentation
Eclipse 3.3.2 (Europa Java EE Edition) http://www.eclipse.org/europa/
Subclipse 1.2.4 http://subclipse.tigris.org/

Once the portal is installed and active, information regarding User and Permissions administration can be obtained here: http://wiki.cvrgrid.org/index.php/PortalAdministrationGuide-CVRG


CVRG Workstation and Deployment Server Hardware Requirements 

CVRG Developer Workstation Hardware Requirements
We recommend the following minimum hardware configuration if you are a developer looking to extend the portal's functionality or to create portlets.

Current CVRG Workstation Configuration (07/30/2008)
OS Windows XP Service Pack 2
CPU Dual Core Intel-based 2.80GHz processor
RAM 4 GB of RAM
HDD 2 - 143GB (7200 RPM SATA drives)


CVRG Server Hardware Requirements
We recommend the following minimum hardware configuration if you deploying the CVRG portal at your institution.

Current CVRG Deployment Server Configuration
OS TBD
CPU TBD
RAM TBD
HDD TBD


Installing the CVRG Portal Using Ant 

Contents

CVRG Portal Ant Build Script


build.xml Target Interaction Graph


  • Orange boxes depict ant condition properties(tests that evaluate to true/false)
  • Blue boxes are ant targets

Digraph of the Ant Build file and associated targets.

Ant Target Target Description
all Main deployment script -Download/Install Liferay/Tomcat bundle - then clean-compile-build-distribute CVRG centric code finally create Liferay's backend database schema (lportal)
clean Removes /build and all documentation stored under /docs within the project
compile This target creates the /build/classes directory in the project and compiles all code found in /src. It also copies client-config.wsdd from the /src/org/cvrgrid/portal/liferay/util/ directory to to the newly created /build/classes directory.
createDatabase This target creates database for the Liferay portal named lportal running: "create database lportal character set utf8;"
createTomcatPortalKeystore This target creates a Java keystore based upon a user's host certificate and key certificate. The name and password of the keystore, and location of the host certificate and key certificate are located in the build.properties file. This keystore will be used for the tomcat container housing the portal.
dist This target copies all necessary configuration files into the liferay/tomcat container. Using filtersets, the target copies user customizable parameters from the main build file ("build.properties") into the configuration files necessary to customize the installation. Some of the items that are copied are the liferay administrator userID and password, the portal db driver used, the userID and password to be used for accessing the back-end database, location of the keystore file and its password, to secure the Tomcat container, trusted certificates for the CVRG Dorian, and the url of the WebSSO server. This target also copies all necessary jars/classes needed to extend the Liferay portal's basic functionality for use with CVRG resources and the caGrid framework.
download-liferay-bundle Downloads liferay from Liferay SVN unless the liferay/tomcat6 bundle has already been downloaded (check property - has-liferay-bundle-downloaded) after the file has downloaded a liferay-downloaded.log file is created to let the system know that the download is complete. The property file build.properties set the bundle name, the url of the download, and where you would like to download the application.
has-liferay-bundle-download-completed This is a conditional target that checks to see if the liferay/tomcat bundle download has completed, evaluating to true if the "liferay-downloaded.log" file is located in the download directory set by the user. A time datestamp is inserted into this log to let the user know when the download successfully completed
has-liferay-bundle-downloaded This is a conditional target that checks to see if the liferay/tomcat bundle has been downloaded, evaluating to true if the "liferay-portal-tomcat-x.x-x.x.x.zip" file is located in the download directory set by the user.
installCaCerts Allows portal developer/admin to add the WebSSO Server's Public CA certificate into the portal server's truststore. Source code (InstallCert.java) used by this target was adapted from a Sun blog by Andreas Sterbenz. (http://blogs.sun.com/andreas/entry/no_more_unable_to_find). You may need to use the linux command "sudo" in order to add an entry into the java security cacerts file.
install-liferay-bundle This target check to see if the liferay-downloaded.log has been created (test to make sure that the complete download was successful). After this check, the target unpacks the zip into the directory specified by the user in the build.properties file and then renames the container to tomcat-cvrgportal. All /.sh scripts within the container build directory have their permissions changed to "755".
jar This target creates 2 jars (classes and documents) derived from files within the /build/classes and /docs directory, respectively. The name of the jars are: "CVRG-portal-core-x.x.jar" and CVRG-portal-core-x.x-docs.jar".
javadoc Creates javadoc on all of the files located under /src. The docs can be located in the /docs folder.
redeploy This target is very important for CVRG portal and portlet developers. This target allows the developer quickly redeploy the CVRG Portal. This target would most certainly be used in an integration test environment, where a developer may be testing how a portlet works within the environment. Quickly, the target, checks the status of the portal container, stops it if necessary then removes the portal container from the system. Then runs runs the "all" target which reinstalls the CVRG-portal.
removeCVRGPortal This target removes the directory tomcat-cvrgportal. It does this by first checking the status of the tomcat container, if it is started it will stop it, if it is stopped it will just remove the directory from the system.
-started This conditional target will check to see if the tomcat container is started by checking to see if the socket 8443 is occupied, resulting in true if it is occupied.
startTomcat This target starts the tomcat container using the appropriate startup script, if the OS is Windows 2000/ Windows XP, or Windows 2003 it will use the startup.bat script and if the OS is Linux, it will use the startup.sh script. The script will first check to see if the container is already running checking the value returned from the -started target.
-stopped This conditional target will check to see if the tomcat container is stopped.
stopTomcat This target shutdown the tomcat container using the appropriate shutdown script, if the OS is Windows 2000/ Windows XP, or Windows 2003 it will use the shutdown.bat script and if the OS is Linux, it will use the shutdown.sh script. The script will first check to see if the container is already stopped by checking the value returned from the -stopped target. This target also has a sleep mechanism that waits 20 seconds after the system has shutdown to make sure all I/O has completed, this is necessary if you are going to remove the tomcat-cvrgportal folder from the system, failing to do so can cause socket issues.


CVRG Portal Ant Build Properties


The following properties will need to be updated in order to deploy the CVRG Portal on your system, not all the properties have been listed here only those that need to be updated by the end user/developer/administrator. We RECOMMEND deploying the CVRG portal on a Linux Environment.

Ant Build Property Name Ant Build Property Description Linux Example Value
tomcat.liferay.download.dir Download location of the tomcat/liferay bundle /home/user/Desktop
tomcat.liferay.bundle.root.dir Root folder to unpack the downloaded liferay/tomcat bundle to. /opt
liferay.company.webID This is the name of your community for instance its defaulted to cvrgrid.org. cvrgrid.org
liferay.admin.username Administrator's username for the Liferay CVRG Portal. This name must also be registered with the CVRG Dorian. It is suggested that you make a omniadmin user account for your community to use as the super user and register this user with Dorian. YourCommunityAdmin
liferay.admin.password Administrator's password for the Liferay CVRG Portal. This password corresponds to the password registered with the CVRG Dorian for your community's omniadmin user. Anumber1password!
liferay.admin.firstname OmniAdmin user first name. YourCommunity
liferay.admin.lastnamename OmniAdmin user last name Admin
mail.transport.protocol Mail transportation protocol used for Liferay to send notices. smtp--(default)
mail.smtp.host Host name of your email server. smtp.yourMailserver.com
liferay.db.host Host where you will install Liferay DB localhost--(default)
liferay.db.port Port used to access Liferay DB 3306--(default-mySQL)
liferay.db.admin.username Administrator username for the Liferay portal database. This value is different than the omniAdmin username; this is a user created for the database only! communityDBAdmin
liferay.db.admin.password Administator password for the Liferay portal database. This value is different than the omniAdmin user's password this password is for access to the lportal (Liferay portal) database only! communityDBpassword
globus.dir.location Location of the ws-core-4.0.3 (globus) directory. If you are using the image the location is /opt/ws-core-4.0.3 otherwise you may need to download the globus files, in this case this value is the location of where you unpacked the zip. /opt/ws-core-4.0.3--(default)
user.home.dir Location of the your home directory. /home/userhome
tomcat.server.keystore.location Location of the keystore directory that you created/will create with the ant script createPortalKeystore. The name of the keystore will always be .keystore /home/user/portalKeystore
tomcat.keystore.password Password for the portal keystore as described above myPortalKeystorePasswd
host.certificate.file.path File Location of the host certificate you received from a CVRG admin, this is the location of your FQDN-cert.pem file /home/userDir/.globus/certificates/yourPortal.yourDomain.com-cert.pem
host.key.file.path File Location of the key to your host certificate you received from a CVRG admin, this is the location of your FQDN-key.pem file /home/userDir/.globus/certificates/yourPortal.yourDomain.com-key.pem
user.globus.credential.path.dir For development purposes saves a single hard copy of the current users grid credential, the eventual credential will be found in this directory with the name theUserCreds.globus /home/userDir/userCreds
cas.client.serverName The host name of your portal server or application server including the port. yourPortalServer.yourdomain.com:8443


Installing the CVRG Portal

  1. Obtain host certificate and key certificate from a CVRG Certificate Authority (CA) Administrator (currently Stephen Granite CVRG CA Admin). Please include a the following in the email:
    1. subject line - "Request for Host Certificate"
    2. body
      1. Fully qualified domain name (FQDN) ex. (aHost.adomain.com)
      2. Your First Name:
      3. LastName:
      4. Organization:
      5. Project:
      6. Phone Number:
      7. Reason for requesting a host certificate:
  2. From the CVRG CA Administrator's perspective, they will need to use the CVRG User Interface (UI) to generate the requested certificates: Creating a CVRG Host Certificate
    1. Go to the CVRG UI folder (e.g. /home/sgranite/Desktop/Software/CVRG_Dev_SoftwareStack/applications/cvrg-ui) and type "ant ui".
    2. Once the interface comes up properly, click the "Login" button.
    3. Enter your CVRG username and password and click the "Authenticate" button.
    4. If the username exists and the password entered is correct, the "Proxy Manager" window will appear.
    5. Click the "Set Default" button.
    6. Click "OK" on the prompt screen that appears and then close the "Proxy Manager" window.
    7. Under the "My Account" Menu, select "Request Host Certificate" item.
    8. In the "Request Host Certificate" window that appears, replace the "Host" entry with the FQDN in the e-mail.
    9. Click the "Request Certificate" button.
    10. By default, the host and the key will save in the .cagrid/certificates directory (e.g. /home/sgranite/.cagrid/certificates). E-mail both of these files to the requester and store the files in a secure location.
  3. You will need to place the certificates into your /home/userDir/.globus/certificates directory (you may need to create this directory), this includes the CVRG Root Trust Certificate, and both the host and host key certificate. The CVRG administrators will need to add your host to the CVRG WebSSO server.
  4. Check out the CVRG Portal using SVN from the following location https://project.bmi.ohio-state.edu/svn/cvrg/trunk/dev/portal/cvrgPortal-1.1
  5. Install Globus (Media:Ws-core-4.0.3.zip). Unpack the zip into a location of your choice. This location will be configured into the build.properties file. If you are using the CVRG Development Image, globus is already installed.
  6. Create mysql user for the portal DB admin, unless it already exists. Instructions to create a mysql user can be found here: Adding a mysql user account.
  7. Update properties file (cvrgPortal-1.1/build.properties)
    1. All properties shown directly above need to be updated in the cvrgPortal-1.1 project that you just checked out from SVN.
  8. Verify that your group for your local user has full access to the ${tomcat.liferay.bundle.root.dir} (as shown above in the build.properties settings) directory. If not, run sudo chmod -R 775 ${tomcat.liferay.bundle.root.dir} (e.g. /opt).
  9. Open a terminal window and change your working directory to the location where you checked out the CVRG source code.
    1. [type] sudo ant installCaCerts - hit enter at the end (the 1 is assumed)
    2. [type] ant createTomcatPortalKeystore
      1. All values needed for the application have been printed to the console window in order. Just copy and paste them at each prompt. They are derived from the values that you set in the build.properties file above.
      2. At last prompt, hit enter (no password is necessary for the private key).
    3. [type] ant all - Deploys the CVRG portal to the location of the directory chosen in the property file.
    4. Verify that ${CATALINA_HOME} is set to ${tomcat.liferay.bundle.root.dir}/tomcat-cvrgportal. If not, edit your .bash_profile.
      1. gedit (or vi) /home/userDir/.bash_profile.
      2. Restart the system.
    5. Once installed type ant startTomcat to start the CVRG Tomcat container.
  10. To access the your portal, go to your fully qualified domain name(aHost.adomain.com):8443/web/guest/home
    1. Example: https://myPortalRocks.mydomain.com:8443/web/guest/home
  11. To add the CVRG logo add the Enterprise Admin portlet to the page
    1. Click the ">> Tab" -> "Settings Tab" -> Under the Display tab and Just Under the default liferay logo click the change link -> Browse for your Logo -> Click Save
  12. To add a favicon drop your own icon with the same name as the Liferay icon, your icon will appear as the bookmark/favorites icon instead of the Liferay icon. (See below)
CVRG LOGO
${cvrgPortal-1.1/WebContent/images/CVRG_logo_final.png
CVRG Favicon
${cvrgPortal-1.1/WebContent/images/liferay.ico
Where to place favicon
/Your_Theme/html/themes/example/images/liferay.ico 
(eg. /opt/tomcat-cvrgportal/webapps/ROOT/html/themes/classic/images if you are using the classic theme which is the default.
Project Infrastructures