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