OpenCPU Server Release 1.5.4

February 5, 2016

Version 1.5.4 of the OpenCPU server has been released to Launchpad (Ubuntu) and OBS (Fedora). This update does not introduce any changes to the OpenCPU API itself; it improves to the deb/rpm installation packages and upgrades the bundled opencpu system R package library.

Installing and Updating

Existing Ubuntu and Fedora serves that are already running the 1.5 branch will automatically update the next time they run apt-get update or yum update. Alternatively, to install OpenCPU server on a fresh Ubuntu 14.04 machine:

sudo add-apt-repository -y ppa:opencpu/opencpu-1.5
sudo apt-get update 
sudo apt-get install -y opencpu

Or to install it on Fedora 22 or 23 from OBS:

cd /etc/yum.repos.d/
yum install opencpu

To install OpenCPU server on other distributions, simplfy follow the instructions to build the deb (Debian/Ubuntu) or rpm (Fedora/CentOS/RHEL) packages from source, which is very easy.

The OpenCPU Package Library

Because OpenCPU is implemented completely in R, the server stack ships with a private library of R packages needed by the system in /usr/lib/opencpu/library. The isolated library allows you to freely install/upgrade/uninstall your own R packages on your server without accidentaly breaking the OpenCPU server. This is critical to guarantee the system is stable at all times and unaffected by whatever crazy things are happening in R.

However a side effect of this design is that for these system packages, the user might see a different package version when calling R via the OpenCPU API than when running R from the terminal on the same server. This is unfortunate because the OpenCPU is meant to provide a transparent HTTP API to the system’s R installation. One solution would be to add the opencpu library to your .libPaths() but this is unnecessarily annoying and complicated.

To make this easier, the OpenCPU rpm/deb packages now automatically create symlinks to the OpenCPU system library in the global R package library. Thereby the OpenCPU system library is still safely isolated, but the packages are also visible when running R in the terminal, hence we don’t need to install them again. Hopefully this makes managing packages on your OpenCPU server a little easier.