Skip to content

Installation

Prerequisites

Java

The R Service Bus (RSB) is written using mature and robust Java technology and you will need a Java 8 runtime environment to run RSB. We recommend the use of OpenJDK or a multi-platform distribution of OpenJDK like Zulu. Of course, Oracle Java will do too.

To check your version of Java is Java 8 (or higher), run

java -version

which should display something along

openjdk version "1.8.0_72"
OpenJDK Runtime Environment (Zulu 8.13.0.5-linux64) (build 1.8.0_72-b15)
OpenJDK 64-Bit Server VM (Zulu 8.13.0.5-linux64) (build 25.72-b15, mixed mode)

R

Since RSB can be used to trigger R-based jobs, an R installation is required for properly running RSB. The official R Installation and Administration manual has all documentation on how to set up R on your system.

R packages rj and rj.gd

The communication between R and Java in RSB is managed by the R packages rj and rj.gd. These packages can be installed into the R installation using

install.packages(c("rj", "rj.gd"), repos="https://download.walware.de/rj-4.0")

Note:

  • when installing these packages from source on GNU/Linux, a JDK version will be needed for the compilation of these packages

Optional R packages

The properties package is needed to parse fields from an RSB web form:

install.packages("properties", repos = "https://cloud.r-project.org")

The RSBXml and RSBJson packages can be used to demonstrate the usage of RSB function calls

install.packages(c("RSBJson", "RSBXml"), repos = "https://repos.openanalytics.eu")

WAR-only Deployment

When you already have a servlet container, the most convenient way to deploy RSB is to install the relevant Web ARchive (WAR) files. Download the latest RSB war file and corresponding RPooli file from the Download page.

RSB should deploy fine on any Java web-container supporting Servlet 2.5 e.g. Tomcat 9. Install the RSB war file and RPooli war file into the Java web-container.

To ensure an RSB instance is running and can access its default RPooli pool, browse to or curl:

http://${RSB host}/rsb/api/rest/system/health/check

If all is good, RSB should respond: OK

"RSB health check"

Full Distribution Installation

Besides the RSB and RPooli war files, we also provide a version that distributes Tomcat along with the RSB and RPooli war files. This version can be downloaded from the Download page.

After downloading, unzip the distribution zip archive in your preferred location e.g. /opt/rsb-tomcat/ and ensure the files in the bin directory are executable.

Running RSB

One can run RSB using

cd /opt/rsb-tomcat/rsb-6.4.0/bin
sudo -u rsb R_HOME=/usr/lib/R R_LIBS=/usr/local/lib/R/site-library ./rsb.sh

The -u rsb assumes a user rsb has been created on the system to run RSB under that user.