Fixed issue 80. Obsolete test files were not updated with some changes in ExternalAPI...
[pithos] / BUILD.txt
1 Short version\r
2 -------------\r
3 \r
4 # ant install run\r
5 \r
6 \r
7 \r
8 Long version\r
9 ------------\r
10 \r
11 \r
12 Prerequisites\r
13 -------------\r
14 \r
15 Building GSS requires the following software to be installed on your system:\r
16 \r
17 - Java Development Kit version 1.6.\r
18 - Apache Ant version 1.7.\r
19 \r
20 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:\r
21 \r
22 # create user gss with password 'gss';\r
23 # create database gssdb owner gss encoding 'UTF8';\r
24 \r
25 Then, when the gss server is first launched, the database will be populated with the required schema.\r
26  \r
27 \r
28 Installing and configuring dependencies\r
29 ---------------------------------------\r
30 \r
31 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.\r
32 \r
33 \r
34 Building and running the server\r
35 -------------------------------\r
36 \r
37 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.\r
38 \r
39 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:\r
40 \r
41 http://127.0.0.1:8080/pithos/register\r
42 \r
43 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.\r
44 \r
45 \r
46 Customizing the build script\r
47 ----------------------------\r
48 \r
49 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.\r
50 \r
51 build.properties:\r
52 \r
53 jboss.home=/opt/jboss-5.1.0.GA\r
54 jboss.args=-b 0.0.0.0 -Djboss.server.log.threshold=DEBUG\r
55 gwt.workers=4\r
56 \r
57 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.\r
58  \r
59 Alternatively, you can override the above properties using command line arguments:\r
60 \r
61 ant -Djboss.home=/usr/local/jboss-5.1.0.GA -Dgwt.workers=2\r
62 \r
63 \r
64 Production deployment\r
65 ---------------------\r
66 \r
67 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.\r
68 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
69 \r
70 For Debian:\r
71 \r
72 # cp /path/to/production/deployment/jboss-5.1.0.GA/bin/jboss_init_debian.sh /etc/init.d/jboss\r
73 # chmod +x /etc/init.d/jboss\r
74 # update-rc.d jboss defaults\r
75 \r
76 \r
77 Installing the indexing service\r
78 -------------------------------\r
79 \r
80 Download the Solr 1.3.0 binary from one of its mirrors and then download and install the patch mentioned in this page:\r
81 \r
82 http://wiki.apache.org/solr/UpdateRichDocuments\r
83 \r
84 Follow the instructions on How To Install to patch Solr with the file rich.patch. \r
85 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
86 \r
87 For Debian:\r
88 \r
89 # cp solr/bin/solr /etc/init.d/solr\r
90 # chmod +x /etc/init.d/solr\r
91 # update-rc.d solr defaults\r
92 \r
93 \r
94 Authentication\r
95 --------------\r
96 \r
97 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
98 \r
99 http://en.wikipedia.org/wiki/Shibboleth_(Internet2)\r
100 \r
101 Then point a browser to http://127.0.0.1:8080/pithos/ in order to connect to the service.\r
102 \r
103 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:\r
104 \r
105 http://127.0.0.1:8080/pithos/login?next=http://127.0.0.1:8080/pithos/\r