Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Recommenders/Attic/TeamServer"

m
(Removing all content from page)
 
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= Prerequisites =
 
  
* Decent Linux/Win/Mac box with 2GHz, 2G RAM and Java 6 or better.
 
* Apache CouchDB 2.0 or higher (not officially released)
 
* Code Recommenders Team Server 0.4 or higher
 
 
= Installation =
 
 
== Apache CouchDB ==
 
* Download CouchDB developer preview from [http://files.couchbase.com/developer-previews/couchbase-single-server-2.0.0-dev-preview/ couchbase.com].
 
* Install CouchDB.
 
* Start CouchDB.
 
* Ensure that CouchDB's [http://localhost:5984/_utils welcome page] comes up.
 
* Change [http://localhost:5984/_utils/config.html os_process_timeout config parameter] from '5000' to '10000' or higher. The exact value depends on the power of your machine and the data you process.
 
 
== Code Recommenders Team Server ==
 
* Download Code Recommenders latest team server (org.eclipse.recommenders.server-linux.gtk.x86_64.zip) from [http://vandyk.st.informatik.tu-darmstadt.de/updates/server/ here]. Note, the server platform is build-independent although the name suggests something different.
 
* Unzip ''org.eclipse.recommenders.server-linux.gtk.x86_64.zip'' to any directory on your local disc. This directory is referred to as $SERVER_HOME from here on.
 
* Start the server by executing $SERVER_HOME/start.sh (you may set the x-flag to execute the script). The server now starts with a OSGI console.
 
* In the console enter "initCouchdb". This creates and initializes all databases on the local Apache CouchDB instance.
 
 
That's it. The server should be up an ready to use. Next, you can upload your own data to the server.
 
 
= Server Configuration =
 
 
In $SERVER_HOME/configuration/config.ini, the code search server url has to be modified to point to your actual service that offers the source code files.
 
 
<pre>
 
org.eclipse.recommenders.server.codesearch.baseUrl=http\://recommenders1.st.informatik.tu-darmstadt.de:29750/codesearch
 
</pre>
 
 
TODO: this should be simplified. Every installation needs to change this setting. Is there a simple way to figure out under which IP/name the JAX-RS webservice was queried?
 
'''NOTE:''' baseurl MUST be fully qualified including the port number. Apache HTTPD proxy rewrites all incoming URLs and unescapes all slashes used for type names and thus results in 404 when using code search. (codesearch/source%2FLorg%2FMyclass --> codesearch/source/Lorg/Myclass --> 404 since this url identifies a non-existant reosurce).
 
 
= Client Configuration =
 
Update your clients to use the new server instead of Code Recommenders' default server by changing the following urls in  ''Preferences>>Code Recommenders'':
 
* Code Search: http://your-team-server:29750/codesearch
 
* Extdoc: http://your-team-server-name:5984/extdoc (note: port is CouchDB port for extdoc!)
 
* UDC: http://your-team-server:29750/udc
 
 
See [[Recommenders/TeamServer#User Friendly URLs]] to see how to get rid of the port numbers.
 
 
= Building Models =
 
 
TODO: Point to a crowd-sourcing page and explain that data needs to be uploaded by the clients into the team server.
 
 
TODO: explain how to set up the cron-job to generate new extdoc and calls models on a nightly basis.
 
 
= Optional Configuration =
 
 
== User Friendly URLs ==
 
Code Recommenders server is per default started on port 29750. You may override this by editing $SERVER_HOME/configuration/configuration.ini or by using an existing Apache HTTPD server as proxy. How to use an existing Apache HTTPD as proxy is shown below:
 
 
<pre>
 
# in /etc/apache2/mods-enabled/proxy.conf add:
 
 
<IfModule mod_proxy.c>
 
        [...]
 
 
        ProxyPass /udc http://localhost:29750/udc
 
        ProxyPassReverse /udc http://localhost:29750/udc
 
 
        ProxyPass /extdoc http://localhost:5984/extdoc
 
        ProxyPassReverse /extdoc http://localhost:5984/extdoc
 
 
        # NOTE: this only works for search queries! codesearch/source request still have to use port 29750!
 
        ProxyPass /codesearch http://localhost:29750/codesearch
 
        ProxyPassReverse /codesearch http://localhost:29750/codesearch
 
 
</IfModule>
 
 
</pre>
 
 
Next, enable the required modules and restart the server:
 
<pre>
 
root@host:# a2enmod proxy
 
root@host:# a2enmod proxy_http
 
root@host:# service apache2 restart
 
</pre>
 
 
[[Category:Recommenders|Team Server]]
 

Latest revision as of 02:30, 26 September 2013

Copyright © Eclipse Foundation, Inc. All Rights Reserved.