Statistics
| Branch: | Tag: | Revision:

root / BUILD.txt @ 552:70ed68c5328c

History | View | Annotate | Download (4.8 kB)

1
Building GSS requires the following software installed:
2

    
3
- Java Development Kit version 1.6.
4
- Apache Ant version 1.7.
5
- Google Web Toolkit version 2.0.
6
- JBoss Application Server version 5.1.0 built with JDK 1.6.
7
- JUnit version 3.
8
- HornetQ version 2.0.0.
9

    
10

    
11
Building from the command line
12
------------------------------
13

    
14
Create a build.properties file with the following variables, set to the appropriate values for your system. The value of gwt.workers should match the virtual cores in your system for faster builds. For instance in a dual-core system the best value would be 2. You can experiment with increasing the value until you start to get worse build times, if you are not sure about your system's specifications.
15

    
16
build.properties:
17

    
18
jboss.version=5.1.0
19
jboss.home=/path/to/development/deployment/jboss-5.1.0.GA
20
jboss.prod.home=/path/to/production/deployment/jboss-5.1.0.GA
21
gwt.path=/path/to/gwt-2.0.0
22
gwt.workers=1
23
junit.path=/path/to/junit
24
hornetq.path=/path/to/hornetq
25

    
26
Run "ant".
27

    
28
Alternatively, you can set them in the command line, or specify them as environment variables:
29

    
30
ant -Djboss.version=5.1.0 -Djboss.home=/path/to/jboss-5.1.0.GA -Dgwt.path=/path/to/gwt-2.0.0 -Dgwt.workers=2 -Djunit.path=/path/to/junit -Dhornetq.path=/path/to/hornetq
31

    
32
The final build artifact is the file "gss.ear" in the directory "bin", which has already been deployed to the server.
33

    
34

    
35
Running the server
36
------------------
37

    
38
Before running the server for the first time, some configuration files must be installed. This can be accomplished by running "ant install" (with the already mentioned variables set, as above). Then just start JBoss with the default configuration.
39

    
40

    
41
Building from Eclipse
42
---------------------
43

    
44
In Eclipse the following User Libraries must be defined:
45

    
46
GWT Dev Library (pointing to gwt-dev.jar)
47
GWT User Library (pointing to gwt-user.jar)
48
GWT Servlet Library (pointing to gwt-servlet.jar)
49
JBoss 5 lib (pointing to all the jars in ${jboss.home}/lib
50
JBoss 5 common lib (pointing to to all the jars in ${jboss.home}/common/lib)
51

    
52
Furthermore the ant variables mentioned above must be set as well.
53

    
54

    
55
Deploying to production
56
-----------------------
57

    
58
First of all, make sure the database is ready for gss. This entails configuring the database to accept connections from the application server and create the appropriate database and user:
59

    
60
# create user gss with password 'gss';
61
# create database gssdb owner gss encoding 'UTF8';
62

    
63
Then make sure the path to the production server is specified in build.properties (jboss.prod.home). Also make sure that the permissions in the jboss directory and subdirectories are properly set for the system user that the service will run as.
64
Run "ant install-production" to install the JBoss configuration files for the deployment server.
65
Run "ant deploy-production" to copy the build artifact (gss.ear) to the deployment server.
66
Copy the jboss init script to the proper place for the host operating system. Modify the various variables defined in the start of the run script as necessary.
67

    
68
For Debian:
69

    
70
# cp /path/to/production/deployment/jboss-5.1.0.GA/bin/jboss_init_debian.sh /etc/init.d/jboss
71
# chmod +x /etc/init.d/jboss
72
# update-rc.d jboss defaults
73

    
74

    
75
Installing the indexing service
76
-------------------------------
77

    
78
Download the Solr 1.3.0 binary from one of its mirrors and then download and install the patch mentioned in this page:
79

    
80
http://wiki.apache.org/solr/UpdateRichDocuments
81

    
82
Follow the instructions on How To Install to patch Solr with the file rich.patch. 
83
Copy the solr init script to the proper place for the host operating system. Modify the various variables defined in the start of the run script as necessary.
84

    
85
For Debian:
86

    
87
# cp solr/bin/solr /etc/init.d/solr
88
# chmod +x /etc/init.d/solr
89
# update-rc.d solr defaults
90

    
91

    
92
Authentication
93
--------------
94

    
95
You need to have Shibboleth authentication set up in order to authenticate. The first step in the Shibboleth authentication process is a redirection to a WAYF (Where Are You From) server, for selecting the Identity Provider that has your credentials. You can read more about Shibboleth here: 
96

    
97
http://en.wikipedia.org/wiki/Shibboleth
98

    
99
Then point a browser to http://127.0.0.1:8080/pithos/ in order to connect to the service.
100

    
101
Alternatively, for development purposes, you can use a shortcut in the server to authenticate without Shibboleth. You have to manually initialize a user entry in the database first (using SQL insert) and then set its username in the testUsername property of the jboss\conf\gss.properties configuration file. You can find it deployed in JBOSS_HOME\server\default\conf\gss.properties. The proper URL for using in this scenario is the following, which can be also found in the GWT hosted mode launch configuration:
102

    
103
http://127.0.0.1:8080/pithos/login?next=http://127.0.0.1:8080/pithos/