/
Gridsphere Infrastructure
Gridsphere Infrastructure
Installing software and important system commands
- update /etc/sysconfig/rhn/sources to use a closer up2date mirror, e.g., http://mirrors.usc.edu/pub/linux/distributions/centos/ or http://mirror.stanford.edu/yum/pub/centos/
- up2date <package-name>, e.g.,
up2date -v subversion
- to set up yum, first need to do an
up2date yum
, then configure yum repos if necessary in/etc/yum.repos.d
and then run ayum update
oryum install|update foo
chkconfig
for setting up boot-time services
Setting up tomcat+apache integration via mod_jk
- download tomcat-connector-src
- standard
./configure --with-apxs=/usr/sbin/apxs && make && make install
incantation - create and set up mod_jk configuration files:
/etc/httpd/conf.d/88mod_jk.conf
which contains a reference to/etc/httpd/jk-workers.properties
- set up default virtual host on apache in
/etc/httpd/conf/httpd.conf
and add appropriate JkMount directives for the URLs we want to be handled by Tomcat. - ensure that Tomcat is listening on port 8009 (or whatever port was specified in the httpd jk-workers.properties file) with an AJP13 connector.
- Had to fix existing
/etc/httpd/conf/httpd.conf
and change theDefaultType text/plain
toDefaultType text/html
- restart httpd + tomcat
- Finally, http://portal.tdar.org/gridsphere works
- update: In order to get myProjects functionality working also have to JkMount /CorePortlet/* and /team/* - there may be more.
Configure databases
- dump/restore geonportaldb and geoncat databases, createuser geonportaluser
- make sure pg_hba.conf is set to trusted connections from localhost
Hardening the machines
- SSH: remove root ssh access, limit ssh access by IP/user for all nodes
- Apache: limit access to sysinfo apps by IP by adding new Directory directive(s). These include tripwire, phpSysInfo, phpMyAdmin, and ganglia.
- Data node does not need to have any webservices running. Stop httpd and remove it via chkconfig
- configure tripwire more... don't know much about it yet.
Deployment from SVN
- master ant build.xml at the top level should run ant deploy on all portlets in the portlets directory?
Software notes and issues
Java 1.5+ compliance
- CorePortlet has a dependency on Axis 1.2 which doesn't work with Java 1.5 due to enum keywords. (fixed by removing enum keyword and changing references to org.apache.axis.enum to org.apache.axis.constants and using axis 1.4 jar)
- CorePortlet does not compile due to a missing dependency on IdentityAuthorization (fixed by adding ogsa.jar and cog-jglobus.jar to CorePortlet/lib)
- reference to UUID ambiguous due to java.util.UUID - bad implementation in several classes that import package.name.* instead of fully expanding package imports. This is a general code smell in the codebase - import foo.com.* should not exist in a production codebase, with modern IDEs' (e.g., Eclipse) organize imports feature, there is no reason why this even exists.
- putting shared jar dependencies in a shared lib folder - there are many redundant jars in the portlets, and even in the gridsphere lib.
- separate Gridsphere source tree/jars from the actual portlets
- current deployment process appears to be - deploy gridsphere, gridportlets, and then all the individual portlets. Should attempt to write a script that goes through all portlets in the portlet directory and attempts to deploy them all? This is clumsy in ant, perhaps a perl/python/etc. script would be more suitable.
Improvements to the GEON codebase
org.geongrid.sdsc.portlets.data.RegistrationPortlet
is where all the URL mappings are placed for some reason. This should really be in an external config file somewhere. Furthermore, the mappings are reset/reinitialized on every request, as opposed to just once when the webapp starts up. See what alternative models, if any, are supported by Gridsphere.- "GEON" is used all over the place. It would be nice if there were a central configuration file/registry that is used to provide the project name (geon, tdar, etc.), and everything just knows how to look it up. As it stands now we still need to fix a few places in the registration process where GEON is used instead of tdar.
DataCatalog.java
uses thecatalog.database.connection
to connect to the geon catalog and acts as a DAO for certain project-related metadata stored in the geoncat postgres database. We may want to replace this class entirely with our own- import fully qualified package names instead of .*
- org.geongrid.sdsc.portlets.data.RegistrationHelpInfo has a hardcoded reference to http://www.geongrid.org/portal/resource_reg/help_info.xml - probably is not something we want/need.
- why does webapp/js/jsp have the same files as webapp/js (with some slight modifications to xtree.js, popcalendar.js, also jsp/portal_search_results.js does not exist in the js folder)
Making GEON compatible/installable with a clean version of tomcat
Tomcat 6
- change classpath to look in
lib
instead ofcommon/lib
(change from tomcat 5.X to tomcat 6) - modify SportletContext and add
String getContextPath()
to delegate tocontext.getContextPath()
Bundled GEON portlets
attrauth
- used for authentication?
CorePortlet
- Cleaning up jar dependencies: Added a "shared.lib" property to the ant build.xml that points to a shared library folder with jars that are common to multiple portlets. Next up is cleaning up the jar dependencies so CorePortlet has just the appropriate jars in its lib folder.
- Cleaning up codebase:
- removed webapp/WEB-INF/classes/org - no reason source files should be in there, and generated classfiles should not be in source control.
forumportlet
gama
- handles user account registration/authentication - need to modify the email that gets sent out on new account registration
GEONHyperlinkPortlets
GEONIframePortlets
LidarPortlet
PIAreaPortlet
portalstatusportlet
PortalUsePortlet
RssPortlet
SYNSEISPortlet
SystemPortlet
userprofilemanager
Questions
- Where should jarfiles live? I.e., if portlet A and portlet B have a dependency on log4j, where should log4j be placed?
- what is the purpose of gama's tomcat-non-secure and tomcat-secure tomcat containers?
- What's the best way to include team elements and any other 3rd-party libraries/dependencies?
- How to set up the database schema automatically?
- geon.properties exists in team/WEB-INF/classes and CorePortlet/WEB-INF/classes/geon.properties - is this necessary to include teamelements?
- is greceptor a necessary service?