Statistics
| Branch: | Tag: | Revision:

root / BUILD.txt @ 552:70ed68c5328c

History | View | Annotate | Download (4.8 kB)

1 1:e7bf0801e8c6 pastith
Building GSS requires the following software installed:
2 1:e7bf0801e8c6 pastith
3 1:e7bf0801e8c6 pastith
- Java Development Kit version 1.6.
4 1:e7bf0801e8c6 pastith
- Apache Ant version 1.7.
5 498:ff03d4c3a305 pastith
- Google Web Toolkit version 2.0.
6 517:2b4539e4de83 pastith
- JBoss Application Server version 5.1.0 built with JDK 1.6.
7 1:e7bf0801e8c6 pastith
- JUnit version 3.
8 518:3f08ff18fcec pastith
- HornetQ version 2.0.0.
9 1:e7bf0801e8c6 pastith
10 1:e7bf0801e8c6 pastith
11 1:e7bf0801e8c6 pastith
Building from the command line
12 1:e7bf0801e8c6 pastith
------------------------------
13 1:e7bf0801e8c6 pastith
14 552:70ed68c5328c pastith
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 1:e7bf0801e8c6 pastith
16 1:e7bf0801e8c6 pastith
build.properties:
17 1:e7bf0801e8c6 pastith
18 517:2b4539e4de83 pastith
jboss.version=5.1.0
19 517:2b4539e4de83 pastith
jboss.home=/path/to/development/deployment/jboss-5.1.0.GA
20 517:2b4539e4de83 pastith
jboss.prod.home=/path/to/production/deployment/jboss-5.1.0.GA
21 498:ff03d4c3a305 pastith
gwt.path=/path/to/gwt-2.0.0
22 551:942d02da198a pastith
gwt.workers=1
23 1:e7bf0801e8c6 pastith
junit.path=/path/to/junit
24 518:3f08ff18fcec pastith
hornetq.path=/path/to/hornetq
25 1:e7bf0801e8c6 pastith
26 552:70ed68c5328c pastith
Run "ant".
27 1:e7bf0801e8c6 pastith
28 1:e7bf0801e8c6 pastith
Alternatively, you can set them in the command line, or specify them as environment variables:
29 1:e7bf0801e8c6 pastith
30 551:942d02da198a pastith
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 1:e7bf0801e8c6 pastith
32 1:e7bf0801e8c6 pastith
The final build artifact is the file "gss.ear" in the directory "bin", which has already been deployed to the server.
33 1:e7bf0801e8c6 pastith
34 1:e7bf0801e8c6 pastith
35 1:e7bf0801e8c6 pastith
Running the server
36 1:e7bf0801e8c6 pastith
------------------
37 1:e7bf0801e8c6 pastith
38 1:e7bf0801e8c6 pastith
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 1:e7bf0801e8c6 pastith
40 1:e7bf0801e8c6 pastith
41 1:e7bf0801e8c6 pastith
Building from Eclipse
42 1:e7bf0801e8c6 pastith
---------------------
43 1:e7bf0801e8c6 pastith
44 1:e7bf0801e8c6 pastith
In Eclipse the following User Libraries must be defined:
45 1:e7bf0801e8c6 pastith
46 498:ff03d4c3a305 pastith
GWT Dev Library (pointing to gwt-dev.jar)
47 1:e7bf0801e8c6 pastith
GWT User Library (pointing to gwt-user.jar)
48 1:e7bf0801e8c6 pastith
GWT Servlet Library (pointing to gwt-servlet.jar)
49 1:e7bf0801e8c6 pastith
JBoss 5 lib (pointing to all the jars in ${jboss.home}/lib
50 1:e7bf0801e8c6 pastith
JBoss 5 common lib (pointing to to all the jars in ${jboss.home}/common/lib)
51 1:e7bf0801e8c6 pastith
52 1:e7bf0801e8c6 pastith
Furthermore the ant variables mentioned above must be set as well.
53 1:e7bf0801e8c6 pastith
54 1:e7bf0801e8c6 pastith
55 1:e7bf0801e8c6 pastith
Deploying to production
56 1:e7bf0801e8c6 pastith
-----------------------
57 1:e7bf0801e8c6 pastith
58 1:e7bf0801e8c6 pastith
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 1:e7bf0801e8c6 pastith
60 1:e7bf0801e8c6 pastith
# create user gss with password 'gss';
61 1:e7bf0801e8c6 pastith
# create database gssdb owner gss encoding 'UTF8';
62 1:e7bf0801e8c6 pastith
63 1:e7bf0801e8c6 pastith
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 1:e7bf0801e8c6 pastith
Run "ant install-production" to install the JBoss configuration files for the deployment server.
65 1:e7bf0801e8c6 pastith
Run "ant deploy-production" to copy the build artifact (gss.ear) to the deployment server.
66 1:e7bf0801e8c6 pastith
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 1:e7bf0801e8c6 pastith
68 1:e7bf0801e8c6 pastith
For Debian:
69 1:e7bf0801e8c6 pastith
70 517:2b4539e4de83 pastith
# cp /path/to/production/deployment/jboss-5.1.0.GA/bin/jboss_init_debian.sh /etc/init.d/jboss
71 1:e7bf0801e8c6 pastith
# chmod +x /etc/init.d/jboss
72 1:e7bf0801e8c6 pastith
# update-rc.d jboss defaults
73 1:e7bf0801e8c6 pastith
74 1:e7bf0801e8c6 pastith
75 1:e7bf0801e8c6 pastith
Installing the indexing service
76 1:e7bf0801e8c6 pastith
-------------------------------
77 1:e7bf0801e8c6 pastith
78 1:e7bf0801e8c6 pastith
Download the Solr 1.3.0 binary from one of its mirrors and then download and install the patch mentioned in this page:
79 1:e7bf0801e8c6 pastith
80 1:e7bf0801e8c6 pastith
http://wiki.apache.org/solr/UpdateRichDocuments
81 1:e7bf0801e8c6 pastith
82 1:e7bf0801e8c6 pastith
Follow the instructions on How To Install to patch Solr with the file rich.patch.
83 1:e7bf0801e8c6 pastith
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 1:e7bf0801e8c6 pastith
85 1:e7bf0801e8c6 pastith
For Debian:
86 1:e7bf0801e8c6 pastith
87 1:e7bf0801e8c6 pastith
# cp solr/bin/solr /etc/init.d/solr
88 1:e7bf0801e8c6 pastith
# chmod +x /etc/init.d/solr
89 1:e7bf0801e8c6 pastith
# update-rc.d solr defaults
90 516:964ba094690e pastith
91 516:964ba094690e pastith
92 516:964ba094690e pastith
Authentication
93 516:964ba094690e pastith
--------------
94 516:964ba094690e pastith
95 516:964ba094690e pastith
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 516:964ba094690e pastith
97 516:964ba094690e pastith
http://en.wikipedia.org/wiki/Shibboleth
98 516:964ba094690e pastith
99 516:964ba094690e pastith
Then point a browser to http://127.0.0.1:8080/pithos/ in order to connect to the service.
100 516:964ba094690e pastith
101 516:964ba094690e pastith
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 516:964ba094690e pastith
103 516:964ba094690e pastith
http://127.0.0.1:8080/pithos/login?next=http://127.0.0.1:8080/pithos/