Statistics
| Branch: | Tag: | Revision:

root / BUILD.txt @ eba21118

History | View | Annotate | Download (5.5 kB)

1 d6afb393 Panagiotis Astithas
Short version
2 d6afb393 Panagiotis Astithas
-------------
3 d6afb393 Panagiotis Astithas
4 d6afb393 Panagiotis Astithas
# ant install run
5 d6afb393 Panagiotis Astithas
6 d6afb393 Panagiotis Astithas
7 d6afb393 Panagiotis Astithas
8 d6afb393 Panagiotis Astithas
Long version
9 d6afb393 Panagiotis Astithas
------------
10 d6afb393 Panagiotis Astithas
11 d6afb393 Panagiotis Astithas
12 b26d6c4b Panagiotis Astithas
Prerequisites
13 b26d6c4b Panagiotis Astithas
-------------
14 b26d6c4b Panagiotis Astithas
15 b26d6c4b Panagiotis Astithas
Building GSS requires the following software to be installed on your system:
16 14ad7326 pastith
17 14ad7326 pastith
- Java Development Kit version 1.6.
18 14ad7326 pastith
- Apache Ant version 1.7.
19 14ad7326 pastith
20 dda3f9a9 Panagiotis Astithas
Running GSS requires a running PostgreSQL server for storing the system's data. Setting up PostgreSQL for gss entails configuring the database to accept connections from the application server and creating the appropriate database and user:
21 14ad7326 pastith
22 b26d6c4b Panagiotis Astithas
# create user gss with password 'gss';
23 b26d6c4b Panagiotis Astithas
# create database gssdb owner gss encoding 'UTF8';
24 14ad7326 pastith
25 b26d6c4b Panagiotis Astithas
Then, when the gss server is first launched, the database will be populated with the required schema.
26 b26d6c4b Panagiotis Astithas
 
27 14ad7326 pastith
28 b26d6c4b Panagiotis Astithas
Installing and configuring dependencies
29 b26d6c4b Panagiotis Astithas
---------------------------------------
30 14ad7326 pastith
31 dda3f9a9 Panagiotis Astithas
Run "ant install" from the gss directory to download the various software dependencies (JBoss, GWT, etc.) and install the configuration files. The install task is something that will need to be executed again only if the configuration files or dependencies change. This requirement will be explicitly mentioned in the ChangeLog after a new release.
32 14ad7326 pastith
33 14ad7326 pastith
34 b26d6c4b Panagiotis Astithas
Building and running the server
35 b26d6c4b Panagiotis Astithas
-------------------------------
36 14ad7326 pastith
37 b26d6c4b Panagiotis Astithas
Run "ant run" from the gss directory to build and deploy gss and start JBoss. Use Ctrl/Cmd-C to stop the server. If you want to rebuild and redeploy the service after having made changes to the source code, run "ant deploy" or "ant" without a task name, which does the same thing.
38 14ad7326 pastith
39 dda3f9a9 Panagiotis Astithas
On first launch the database will be empty. If you have successfully setup Shibboleth authentication (see the "Authentication" section below) you may use existing user credentials to log into the service. If the Shibboleth IdP is itself empty, visit the following URL:
40 14ad7326 pastith
41 b26d6c4b Panagiotis Astithas
http://127.0.0.1:8080/pithos/register
42 14ad7326 pastith
43 b26d6c4b Panagiotis Astithas
There you will be able to both register a new account with the service and create a new account in the configured IdP/LDAP server. See the gss.properties configuration file for more information on configuring the gss-ldap connection.
44 14ad7326 pastith
45 14ad7326 pastith
46 b26d6c4b Panagiotis Astithas
Customizing the build script
47 b26d6c4b Panagiotis Astithas
----------------------------
48 14ad7326 pastith
49 b26d6c4b Panagiotis Astithas
If you want to customize the behavior of the ant script, you may want to create a build.properties file in the gss directory with the following variables, set to the appropriate values for your system.
50 14ad7326 pastith
51 b26d6c4b Panagiotis Astithas
build.properties:
52 14ad7326 pastith
53 b26d6c4b Panagiotis Astithas
jboss.home=/opt/jboss-5.1.0.GA
54 b26d6c4b Panagiotis Astithas
jboss.args=-b 0.0.0.0 -Djboss.server.log.threshold=DEBUG
55 b26d6c4b Panagiotis Astithas
gwt.workers=4
56 14ad7326 pastith
57 b26d6c4b Panagiotis Astithas
The value of jboss.home should be the path where jboss will be installed and run from. The value of jboss.args will get passed to the JBoss startup script when starting the service with "ant run". 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.
58 b26d6c4b Panagiotis Astithas
 
59 b26d6c4b Panagiotis Astithas
Alternatively, you can override the above properties using command line arguments:
60 14ad7326 pastith
61 b26d6c4b Panagiotis Astithas
ant -Djboss.home=/usr/local/jboss-5.1.0.GA -Dgwt.workers=2
62 14ad7326 pastith
63 14ad7326 pastith
64 b26d6c4b Panagiotis Astithas
Production deployment
65 b26d6c4b Panagiotis Astithas
---------------------
66 14ad7326 pastith
67 b26d6c4b Panagiotis Astithas
First of all, modify the configuration files to suit your installation. Most importantly go through the gss.properties file and remove the testUsername value, since you probably won't need a loophole in your authentication system. Then make sure that the permissions in the jboss directory and subdirectories are properly set for the system user that the service will run as.
68 14ad7326 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.
69 14ad7326 pastith
70 14ad7326 pastith
For Debian:
71 14ad7326 pastith
72 6fd0673d Panagiotis Astithas
# cp /path/to/production/deployment/jboss-5.1.0.GA/bin/jboss_init_debian.sh /etc/init.d/jboss
73 14ad7326 pastith
# chmod +x /etc/init.d/jboss
74 14ad7326 pastith
# update-rc.d jboss defaults
75 14ad7326 pastith
76 14ad7326 pastith
77 14ad7326 pastith
Installing the indexing service
78 14ad7326 pastith
-------------------------------
79 14ad7326 pastith
80 14ad7326 pastith
Download the Solr 1.3.0 binary from one of its mirrors and then download and install the patch mentioned in this page:
81 14ad7326 pastith
82 14ad7326 pastith
http://wiki.apache.org/solr/UpdateRichDocuments
83 14ad7326 pastith
84 14ad7326 pastith
Follow the instructions on How To Install to patch Solr with the file rich.patch. 
85 14ad7326 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.
86 14ad7326 pastith
87 14ad7326 pastith
For Debian:
88 14ad7326 pastith
89 14ad7326 pastith
# cp solr/bin/solr /etc/init.d/solr
90 14ad7326 pastith
# chmod +x /etc/init.d/solr
91 14ad7326 pastith
# update-rc.d solr defaults
92 053c9799 Panagiotis Astithas
93 053c9799 Panagiotis Astithas
94 053c9799 Panagiotis Astithas
Authentication
95 053c9799 Panagiotis Astithas
--------------
96 053c9799 Panagiotis Astithas
97 053c9799 Panagiotis Astithas
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: 
98 053c9799 Panagiotis Astithas
99 e851e64f Panagiotis Astithas
http://en.wikipedia.org/wiki/Shibboleth_(Internet2)
100 053c9799 Panagiotis Astithas
101 053c9799 Panagiotis Astithas
Then point a browser to http://127.0.0.1:8080/pithos/ in order to connect to the service.
102 053c9799 Panagiotis Astithas
103 dda3f9a9 Panagiotis Astithas
Alternatively, for development purposes, you can use a shortcut in the server to authenticate without Shibboleth. You have to register a new account (see "Building and running the server" section above) or 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:
104 053c9799 Panagiotis Astithas
105 053c9799 Panagiotis Astithas
http://127.0.0.1:8080/pithos/login?next=http://127.0.0.1:8080/pithos/