| |
|
|
Site Last Modified |
|
Site Last Modified:Friday 2 December 2011, 15:30 |
|
|
|
Written by Mylah Anacleto
|
|
Friday, 14 November 2008 |
Deploying Zeus Websites
Deploying Zeus websites involves setting up the different layers of the system. First is the data layer which needs the MySQL server and databases (with appropriate user accesses granted). Second is the Zeus Web Application. Third is the Joomla! CMS for the Look and Feel / GUI. All of these then make up the ICIS Website (illustration provided below).
The Web Application (i.e. GCP Zeus) is a java-based web application and the preferred and tested container for the web application is the Apache Tomcat Server. For the deployment of the web application, the source codes need to be downloaded from the SVN using an SVN client. The third-party libraries then needs to be downloaded from the maven
repository. The building/compiling of code follows and then the
deployment. The Java standard development kit (Java SDK) and Apache Ant are needed for this.
One ICIS-Zeus application is able to discover multiple data sources. Hence, to provide a query facility for multiple databases, there is no need to install many ICIS-Zeus'. By configuring the ICIS-Zeus application, multiple target data sources can be made discoverable by the web application.
Crop-specific sites may be loaded on user browsers by accessing the same, one, ICIS-Zeus application and with the crop name as a parameter in the URL(if this is not specified, the crop 'rice' is the default). So if you have more than datasource, the system will
check each one of them to see if the crop is supported and query from all datasources that can produce the data needed in the particular query context.
So if you have more than 1 datasource for the same crop, the system will
query from all datasources and present the results for each one of them.
There are cases wherein for a single crop, there is more than 1 database and certain databases are restricted to a set of users. In these cases, you will need separate ICIS-Zeus (or Zeus-Germplasm) installations for each level of access.
For the site's Look and Feel, user and content management, the Joomla! CMS needs to be installed. A pre-configured, generic ICIS-Zeus package is available for download so any ICIS site manager can build on it.
A step-by step procedure is provided in this page. Please feel free to contact us for any problems and clarification about the installation.
Step 1: Install Apache, PHP, MySQL and Graphviz
Preferred versions:
Apache: 2.0 or later
PHP: 4.0 or later.
MySQL: 5.0.32 (this is the only version that can be used)
Graphviz from http://graphviz.org
Some notes on mysql installation:
- Adjust the maximum number of connections to accomodate the expected number of simultaneous users for the website
On Graphviz:
On debian linux OS, this can be easily done with apt-get.
For windows, installer may be downloaded from its website.
The dot.exe is what is needed and have to be in the path
Step 2: Set up the ICIS databases
For installation of database for public, central and private access, this step involves simply getting a copy of the sql text files (mysqldump) and adding the data through these files.
If you have your existing ICIS database, you will need to create the datawarehouse for some study and rice mutant queries. Please see documentation here: link to ICIS wiki
Step 3: Install Java SDK, Apache Ant, Tomcat and SVN Client
Java SDK 5.0 : Sun's Java SDK download site
Tomcat 5.5 : Apache Tomcat 5.5 download site
Ant 1.7 : Apache Ant binary distribution download site
SVN client
For windows: Tortoise SVN
It is recommended to enable http compression on your Tomcat via server.xml found under <tomcat installation dir>/conf . This results to faster loading time of the web application on user browsers. Example is provided below (this is from a default tomcat installation). Set compression to "on" and specify the compressable mime types:
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" compression="on"
compressableMimeType="text/html,text/xml,text/css,text/plain,text/javascript,application/javascript,application/x-javascript"
/>
Step 4: Checkout, configure and deploy the Pedigree Viewer Web Application
(tutorial writing in progress. You may contact us for any query about this.)
Step 5: Checkout, configure and deploy the ICIS/Zeus Web Application
The source codes need to be downloaded from the SVN repository using an SVN client. The third-party libraries then needs to be downloaded from the maven repository. The building/compiling of code follows and then the deployment. For the deployment, there is no need to transfer
packages, the transferring of
packages and libraries can be handled using the Apache Ant. An illustration of the build process is shown below(steps for and leading to deployment in blue - this is the build process in general, not only for Zeus but for data source development as well):
5.1. Login as a user with write access to the tomcat server directories.
5.2. Checkout the following projects from cropforge :
ICIS web project from svn:
For development releases (these were already tested):
https://svn.cropforge.org/svn/pantheon/branches/ZeusICIS-releases -- look for the latest version. You will need to checkout both the Zeus2Portal and Zeus2-Extjs projects (these are tagged projects) under the directory.
To try out the latest copy (not guaranteed to result to a production-ready application):
https://svn.cropforge.org/svn/pantheon/Belenus/projects/zeus2/Applications/Zeus2Portal
needs the Zeus Extjs common files as well and can be found here:
https://svn.cropforge.org/svn/pantheon/Belenus/projects/zeus2/Commons/Zeus2-Extjs
You may use any of the following commands:
svn checkout --username <developername> <repository location-highlighted in yellow above>
anonymous access is also pssible by using: username:anonsvn password:anonsvn
5.3. Copy deployment.properties.template as deployment.properties
Modifying this property file changes the way Zeus is deployed, the application name and where it is deployed.
It is important to specify the value for common.web-- this the location of the Zeus2-Extjs files (the other project checkout from pantheon SVN). There is a default value specified (as is with all other properties in this file) -- it is the Zeus2-Extjs folder one folder up (relative to this file's location - i.e. it is in the same level as Zeus2Portal). If this is not the case for you, specify the correct location for Zeus2-Extjs using the common.web property.
Other than the above, it is only the following that are most likely to be changed from the default to a custom value:
- the email address that the user will use to send his or her bug report or feedback
- most people would also want their own application name (the default value is "ICIS" and the version).
If you would like to put in your own settings, edit deployment.properties
## # build properties ##
# --- where is the (outside) directory for docs #dist.docs.dir =
## Contact Email Address ## Value for contact.email required
#contact.email = <email address of the person to contact by website users> pedigree.url = http://koios.generationcp.org/pedigreeviewer/index-show.jsp
## Link to Users Manual, Web Application Bugs and Feature Requests Trackers ## Value for the links needed and used in replacing tokens in ## - src/web-customsite/config/about.html.template. ## - src/web-customsite/config/faqs.html.template. ## Default values provided. Please do not remove these. ## If appropriate values are not yet available, the links may be changed by ## manually modifying the links in the about.html ## and faqs.html pages after deployment:
users_manual.link = http://pantheon.generationcp.org/index.php?option=com_content&task=view&id=87&Itemid=74 bug_tracker.link = http://cropforge.org/tracker/?func=add&group_id=110&atid=556 feature_requests_tracker.link = http://cropforge.org/tracker/?func=add&group_id=110&atid=557
## Location of common javascripts (common across all Zeus web apps) ## Default value is the project name Zeus-Extjs located one folder up. ## Change this value to the location of common files Zeus-Extjs ## You will need to check out the Zeus common files from pantheon SVN. ## The repository location is ## /Belenus/projects/Zeus/Commons/Zeus-Extjs ## example for windows: ## common.web=C:/eclipse/workspace/Zeus-Extjs
#common.web = E:/dev/eclipse-galileo/workspace3/Zeus2-Extjs
## Location of the Tomcat servers ## Web application may be deployed to development and/or production tomcat server ## If deploying to a tomcat server: Your own target tomcat installation directory ## may be specified here through the property 'custom.tomcat.home' ## If deploying to a tomcat (beta) server: Your own target tomcat installation directory ## may be specified here through the property 'custom.tomcat.beta.home' ## Default value for both properties is the directory specified by ## your environment variable TOMCAT_BASE ## example for windows: ## custom.tomcat.home=C:/Tomcat5.5-stable ## custom.tomcat.beta.home=C:/Tomcat5.5-beta
#custom.tomcat.home = <location of production server files> #custom.tomcat.beta.home = <location of development server files>
## Web Application Names ## If deploying to a tomcat server: provide value for app.name ## If deploying to a tomcat(beta) server: provide value for app.beta.name ## Default value has the prefix "ICIS" appended to the project version number ## e.g. ICIS-1.4.0-alpha ## The web application can also be named "ROOT" if you wish it deployed as ## the default Tomcat application
#app.name=<production webapp name> #app.beta.name=<beta webapp name>
## This is to set a property to a value that is the same as value for "appBase" ## specified in your <tomcat base>/conf/server.xml ## This is used in pedigree configuration (to specify where pedigree ## cache and images will be stored) ## If deploying to a tomcat server: The value for property webapps.dir will be used. ## The default Value is "webapps" - the default value for tomcat installations ## An example of how this is used: ## if the webapps.dir value is "webapps"(the default value), ## the pedigree cache and images will be stored, respectively, in: ## <tomcat installation dir>/webapps/<app.name value>/pedigree-cache ## <tomcat installation dir>/webapps/<app.name value>/pedigree-cache-graphs
#webapps.dir = <your own appBase if different from default value ("webapps")>
Note: if you need to deploy to a second application server, uncomment and put in values for the following keys:
...
#custom.tomcat.beta.home=<location of development server files>
...
#app.beta.name=<beta webapp name>
5.4. Configure the ICIS datasource: enable discovery of ICIS datasources
The default configuration for ICISWeb specifies the use of the ICISDataSourceFactory and the factory also has default settings. It is to connect to the iris database in IRRI's Castor server.
To specify your own confguration and to allow searching on mutiple crops, follow these steps:
-
Go to src/web-customsite/config
-
Copy ICISDataSource.xml.template to ICISDataSource.xml
- Copy ICISDataSourceTemplate.xml.template to ICISDataSourceTemplate.xml
- Specify the datasources you would like to be used using this file.
-
For each data source, there are elements that need to be assigned values (e.g. datasource name, id, description, database name, etc.). Enter values to these.
If you would like to know more about how the icis datasources is configured, consult this page .
5.5. Get the required jar files from maven repository. Execute:
ant bootstrap
ant initmaven
the ant target 'initmaven' starts the download of jar files/libraries specified as dependencies of the project. Allow for sufficient time to download jar files from repository (especially after a checkout - this may take minutes dependeing on your internet connectivity)
In December 2009, downloading jar files (i.e. initmaven) results to bad archived files and non-compilable code. In case this happens you can download the jars repository here:
http://koios.generationcp.org/download/jar_files/
Unzip and put in ~/.m2/
5.6. run
ant deploy-customsite (will deploy to tomcat.home)
Note: to deploy to the second application server:
ant deploy-customsite-beta (will deploy to tomcat.home)
5.7. Using an internet browser, test the web application:
For querying rice data:
http://<domain name>:<tomcat port>/<appname>/index.jsp?crop=rice
For querying wheat data:
http://<domain name>:<tomcat port>/<appname>/index.jsp?crop=wheat
For querying maize data:
http://<domain name>:<tomcat port>/<appname>/index.jsp?crop=maize
|
|
Last Updated ( Friday, 03 December 2010 )
|
|
|
|