Skip to content

spotfire-rservice

About this image

This directory contains the official container recipe for Spotfire® Service for R ⧉.

What is Spotfire® Service for R?

R is a statistical engine to provide predictive analytic capabilities. R enables users to integrate and deploy advanced analytics written in the R language into their applications.

Spotfire® Service for R (the R service) provides remote execution of R data functions, R predictive analytics, or R custom expressions for users from web client and mobile devices.

Note: The Spotfire Service for R is a Spotfire Server component, provided and licensed under Spotfire Statistics Services in Spotfire Product downloads ⧉.

References:

How to build this image

The easiest and recommended way to build all the Spotfire container images is using the provided containers/Makefile. See Spotfire Cloud Deployment Kit on GitHub ⧉.

You can also build this image individually. Follow the instructions below or adjust them according to your needs.

Prerequisites:

Steps:

  1. Copy the Spotfire.Dxp.RServiceLinux.sdn package into the build/ directory within this folder.
  2. From the <this-repo>/containers folder, run make spotfire-rservice to build this image, or make spotfire-rservice --dry-run to preview the required commands.

Before building the image, put any custom SPK files in the build/ folder.

How to use this image

Prerequisites:

Start an R service container

You can start an instance of the Spotfire Service for R container with:

docker run -d --rm -e ACCEPT_EUA=Y -e SERVER_BACKEND_ADDRESS=spotfire-server spotfire/spotfire-rservice

Note: This Spotfire container image requires setting the environment variable ACCEPT_EUA. By passing the value Y to the environment variable ACCEPT_EUA, you agree that your use of the Spotfire software running in this container will be governed by the terms of the Cloud Software Group, Inc. End User Agreement ⧉.

The spotfire-rservice will start with the default configuration from /opt/spotfire/nodemanager/nm/services/R/conf/custom.properties in the container image.

Starting with a custom configuration

To add Custom configuration properties ⧉ to the R service configuration, you can mount your custom configuration file at /opt/spotfire/nodemanager/nm/services/R/conf/additional-custom.properties. This is only be needed if a setting cannot be directly set by using any of the existing environment variable settings listed in the Environment variables section. Any setting here will override properties found in the /opt/spotfire/nodemanager/nm/services/R/conf/custom.properties file.

docker run -d --rm -e ACCEPT_EUA=Y \
  -e SERVER_BACKEND_ADDRESS=spotfire-server \
  -v "$(pwd)/additional-custom.properties:/opt/spotfire/nodemanager/nm/services/R/conf/additional-custom.properties" \
  spotfire/spotfire-rservice

Example of an additional-custom.properties file:

# The maximum number of R engine sessions that are allowed to run concurrently in the R service.
engine.session.max: 5

# The number of R engines preallocated and available for new sessions in the R service queue.
engine.queue.size: 10

For more information, see Configuring Spotfire Service for R ⧉.

Environment variables

Note: These environment variables can only be used if the default configuration is used.

Note: See also the Spotfire node manager environment variables.