/
install.xml
111 lines (105 loc) · 6.63 KB
/
install.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?xml version="1.0" encoding="UTF-8"?>
<!--
R Service Bus
Copyright (c) Copyright of OpenAnalytics BVBA, 2010-2014
===========================================================================
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
@author rsb.development@openanalytics.eu
-->
<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Installation / Configuration</title>
<author email="rsb.development@openanalytics.eu">RSB Development</author>
</properties>
<head>
<script src="http://code.jquery.com/jquery-1.6.1.min.js" type="text/javascript"></script>
</head>
<body>
<section name="Installation">
<subsection name="Snapshot Debian Packages">
<p>Should you want to get started with the latest RSB snapshot and have all the required packages and dependencies installed in a convenient manner, simply run the following command:</p>
<source>sudo apt-get install rsb-snapshot r-properties r-rsbxml r-rsbjson</source>
<p>These packages are found in this repository: <a href="http://deb.openanalytics.eu">deb.openanalytics.eu</a>.
Follow <a href="http://deb.openanalytics.eu/howto.html">this guide</a> to add this repository to your system.</p>
</subsection>
<subsection name="Prerequisites">
<p>RSB needs R, several R packages and also relies on RServi for interacting with R.</p>
<p>If you haven't installed R already, consider doing so using the <code>r-base</code> and <code>r-rj</code> packages from <a href="http://deb.openanalytics.eu">deb.openanalytics.eu</a></p>
<p>The R packages can be installed in two ways:</p>
<ul>
<li><source>install.packages(c("properties", "RSBXml", "RSBJson"), repos = "http://repos.openanalytics.eu", type = "source")</source></li>
<li>Install the Debian packages: <code>r-properties</code>, <code>r-rsbxml</code>, <code>r-rjsonio</code> and <code>r-rsbjson</code> from <a href="http://deb.openanalytics.eu">deb.openanalytics.eu</a></li>
</ul>
<p>RServi is bundled with RSB in its full distribution (which also contains a Tomcat web container).</p>
<p>If you chose not to use the full distribution of RSB, you'll need to install RServi yourself, which is easily done with the <code>rservi</code> package from <a href="http://deb.openanalytics.eu">deb.openanalytics.eu</a></p>
</subsection>
<subsection name="WAR-only Deployment">
<p>RSB should deploy fine on any Java web-container supporting Servlet 2.5.</p>
<p>To ensure an RSB instance is running and can access its default RServi pool, browse to or curl:</p>
<source>http://${RSB host}/rsb/api/rest/system/health/check</source>
<p>If all is good, RSB should respond: OK</p>
</subsection>
<subsection name="Full Distribution Installation">
<p>Simply unzip the distribution Zip archive in your preferred location and ensure the files in the bin directory are executable.</p>
</subsection>
</section>
<section name="Configuration">
<p>
RSB is configured with a unique JSON file named
<b>rsb-configuration.json</b>, which must be located either in <code>/etc/rsb</code> or at the root of the JVM classpath (for example, in Tomcat's lib directory).
</p>
<subsection name="Samples">
<p>Here are a few examples of configuration files:</p>
<ul>
<li><a href="misc/rsb-configuration-minimal.json">Minimal configuration</a> - the required configuration entries:
<pre id="min_conf"></pre>
</li>
<li><a href="misc/rsb-configuration-redis.json">Redis statistics store</a>: a minimal configuration with an optional Redis statistics store configured:
<pre id="redis_conf"></pre>
</li>
<li><a href="misc/rsb-configuration-pooling.json">RServi client pool</a>: a minimal configuration with an optional RServi client pool for faster R function invocations:
<pre id="pooling_conf"></pre>
</li>
<li><a href="misc/rsb-configuration-full.json">Full configuration</a>: a complete configuration with examples for all the different job deposit methods:
<pre id="full_conf"></pre>
</li>
</ul>
</subsection>
<subsection name="Default Configuration">
<p>If RSB can't locate a configuration file, it will try to generate one (named rsb-configuration.json, as above)
and store it either in <code>/etc/rsb</code> or in <code>WEB-INF/classes</code>. Here is the content of the default
configuration:</p>
<pre id="def_conf"></pre>
<p>In this configuration, $RSB_HOME$ is replaced by either, and in order of preference:</p>
<ul>
<li>The user's home directory, if it exists and is writeable,</li>
<li>The rsb.war WEB-INF directory, if it is writeable,</li>
<li>The operating system temporary directory</li>
</ul>
<p>If RSB generates such a default configuration file in<code>WEB-INF/classes</code>, it is recommended to review it so it uses the desired values and move it to <code>/etc/rsb</code>, as discussed in the previous section.</p>
</subsection>
<subsection name="Description">
<p>Configuration attributes are documented on the <a href="./apidocs/index.html?eu/openanalytics/rsb/config/PersistedConfiguration.html">persisted configuration classes</a>.</p>
</subsection>
<script type="text/javascript">
//<![CDATA[
$('pre#min_conf').load('misc/rsb-configuration-minimal.json');
$('pre#redis_conf').load('misc/rsb-configuration-redis.json');
$('pre#pooling_conf').load('misc/rsb-configuration-pooling.json');
$('pre#full_conf').load('misc/rsb-configuration-full.json');
$('pre#def_conf').load('misc/rsb-configuration-default.json');
//]]>
</script>
</section>
</body>
</document>