Helm chartv0.1.28App 3.2.0

A Helm chart to deploy RStudio on Kubernetes and OpenShift. Most images based on rocker can be used, such as: bioconductor/bioconductor_docker:devel | rocker/rstudio | rocker/tidyverse | ghcr.io/maastrichtu-ids/rstudio

About this chart

rstudio

A Helm chart to deploy RStudio on Kubernetes and OpenShift. Most images based on rocker can be used, such as: bioconductor/bioconductor_docker:devel | rocker/rstudio | rocker/tidyverse | ghcr.io/maastrichtu-ids/rstudio

The aim of this Helm chart is to give an easy and straightforward way to deploy RStudio on OpenShift and Kubernetes clusters. Currently the chart is mostly optimized and used in OpenShift/OKD clusters, if you are using it with other Kubernetes distributions please let us know in the GitHub repository issues, we would love to hear about it!

With this Helm chart you can deploy any Docker image based on the popular RStudio rocker images as root user, such as:

  • ghcr.io/maastrichtu-ids/rstudio:latest
  • bioconductor/bioconductor_docker
  • rocker/rstudio
  • rocker/tidyverse

You can also extend those images to build a custom one with all the packages you need already installed, we recommend you to take a look at the instructions of our custom RStudio image at https://github.com/MaastrichtU-IDS/rstudio

Visit the dsri-helm-charts GitHub repository for more details on how to develop and tests the charts, feel free to send us pull requests to propose your improvements!

Installing the Chart

Install the DSRI Helm Charts on your machine, if not already done:

helm repo add dsri https://maastrichtu-ids.github.io/dsri-helm-charts/
helm repo update

Deploying the Chart

To deploy the chart with the release name rstudio:

helm install rstudio dsri/rstudio \
  --set serviceAccount.name=anyuid \
  --set service.openshiftRoute.enabled=true \
  --set image.repository=ghcr.io/maastrichtu-ids/rstudio \
  --set image.tag=latest \
  --set storage.mountPath=/home/rstudio \
  --set password=changeme

Updating the image in a deployed chart

To be able to trigger an update of the image deployed by the chart you will need to set image.pullPolicy=Always when deploying the chart.

You can then update the image used by the running RStudio:

helm upgrade rstudio dsri/rstudio

Uninstalling the Chart

To uninstall/delete the rstudio deployment:

helm delete rstudio

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the rstudio chart and their default values. They can be defined in the values.yaml file, or using the flag --set.

KeyTypeDefaultDescription
affinityobject{}
extraEnvslist[]
image.pullPolicystring"Always"
image.repositorystring"ghcr.io/maastrichtu-ids/rstudio"
image.tagstring"latest"
imagePullSecretslist[]drop: - ALL readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000
nodeSelectorobject{}
openblasNumThreadsint1Restricting the number of thread allocated to OpenBLAS can speed up computations using OpenBLAS (leave empty for default 64)
passwordstring""
podAnnotationsobject{}
podSecurityContextobject{}
resourcesobject{}
securityContextobject{}
service.ingress.annotationsobject{}
service.ingress.enabledboolfalse
service.ingress.hosts[0].hoststring"chart-example.local"
service.ingress.hosts[0].pathslist[]
service.ingress.tlslist[]
service.openshiftRoute.enabledbooltrue
service.openshiftRoute.hoststring""
service.openshiftRoute.pathstring""
service.openshiftRoute.tls.enabledbooltrue
service.openshiftRoute.tls.insecureEdgeTerminationPolicystring"Redirect"
service.openshiftRoute.tls.terminationstring"edge"
service.openshiftRoute.wildcardPolicystring"None"
service.portint8787
service.shinyPortint3838
service.typestring"ClusterIP"
serviceAccount.annotationsobject{}
serviceAccount.createboolfalse
serviceAccount.namestring"anyuid"
storage.enabledbooltrue
storage.mountPathstring"/home/rstudio"
storage.sizestring"5Gi"
tolerationslist[]
usernamestring"rstudio"

Deploy rstudio with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has rstudio on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartrstudio is pinned at v0.1.28 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply