Skip to content

codekow/s2i-r-shiny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R Shiny (RShiny) s2i image

R is a programming language for statistical computing and graphics. Created by statisticians and is used among data miners, bioinformaticians and statisticians for data analysis and developing statistical software. Users have created packages to augment the functions of the R language.

The official R software environment is an open-source free software environment within the GNU package, available under the GNU General Public License. It is written primarily in C, Fortran, and R itself.

Source-to-Image s2i is a framework that takes application source code as an input and produces a new image that runs the assembled application as output. Openshift builds can be triggered if either the code changes or the s2i builder image is updated.

OpenShift Examples

Create Builder Image

oc new-build \
  https://github.com/codekow/s2i-r-shiny.git \
  --name s2i-r-shiny \
  --context-dir container

oc logs bc/s2i-r-shiny \
  --follow  

Build New App

You can look in example/app of this repo to create an example app.

File List:

  • app.R or server.R - This is your primary application (required)
  • setup.R - Can be used to run R to setup your application (optional: example installs rmarkdown)
  • .s2i/assemble - Standard s2i assemble override (optional)
  • .s2i/run - Standard s2i run override (optional)

Build w/ setup.R

oc new-app s2i-r-shiny~https://github.com/codekow/s2i-r-shiny.git \
    --context-dir=example/app \
    --name=shiny-test \
    --labels examples=shiny \
    --strategy=source

oc expose svc/shiny-test \
  --labels examples=shiny \
  --port 8080 \
  --overrides='{"spec":{"tls":{"termination":"edge"}}}'

Build from GitHub

oc new-app s2i-r-shiny~https://github.com/rstudio/shiny-examples \
    --context-dir=001-hello \
    --name=shiny-hello \
    --labels examples=shiny \
    --strategy=source

oc expose svc/shiny-hello \
  --labels examples=shiny \
  --port 8080 \
  --overrides='{"spec":{"tls":{"termination":"edge"}}}'

Build all examples

scripts/examples.sh

Clean Up

oc delete all -l example=shiny

Links

Misc links