Installing RStudio Server with R 3.6

A project administrator can install RStudio Server with R 3.6 on IBM® Cloud Pak for Data.

Permissions you need for this task
You must be an administrator of the OpenShift® project (Kubernetes namespace) where you will deploy RStudio Server with R 3.6.
Information you need to complete this task
  • RStudio Server with R 3.6 needs only the restricted security context constraint (SCC).
  • RStudio Server with R 3.6 must be installed in the same project as Cloud Pak for Data.
  • RStudio Server with R 3.6 uses the following storage classes. If you don't use these storage classes on your cluster, ensure that you have a storage class with an equivalent definition:
    RStudio® Server with R 3.6 leverages the storage that is provisioned when you install Watson™ Studio.

Before you begin

Ensure that the cluster meets the minimum requirements for installing RStudio Server with R 3.6. For details, see System requirements.

Additionally, ensure that a cluster administrator completed the required Pre-installation tasks for your environment. Specifically, verify that a cluster administrator completed the following tasks:

  1. Cloud Pak for Data is installed. For details, see Installing Cloud Pak for Data.
  2. For environments that use a private container registry, such as air-gapped environments, the RStudio Server with R 3.6 software images are mirrored to the private container registry. For details, see Mirroring images to your container registry.
  3. The cluster is configured to pull the RStudio Server with R 3.6 software images. For details, see Configuring your cluster to pull images.
  4. The RStudio Server with R 3.6 catalog source exists. For details, see Creating catalog sources.
  5. The RStudio Server with R 3.6 operator subscription exists. For details, see Creating operator subscriptions.

If these tasks are not complete, the RStudio Server with R 3.6 installation will fail.

Prerequisite services

Before you install RStudio Server with R 3.6, ensure that the following services are installed and running:

Procedure

Complete the following tasks to install RStudio Server with R 3.6:

  1. Installing the service
  2. Verifying the installation
  3. Choosing a service upgrade plan
  4. What to do next

Installing the service

To install RStudio Server with R 3.6:

  1. Log in to Red Hat® OpenShift Container Platform as a user with sufficient permissions to complete the task:
    oc login OpenShift_URL:port
  2. Create a RStudioAddon custom resource to install RStudio Server with R 3.6. Follow the appropriate guidance for your environment.
    Important: By creating a RStudioAddon custom resource with spec.license.accept: true, you are accepting the license terms for RStudio Server with R 3.6. You can find links to the relevant licenses in IBM Cloud Pak for Data License Information.

    Create a custom resource with the following format.

    cat <<EOF |oc apply -f -
    apiVersion: rstudio.cpd.ibm.com/v1beta1
    kind: RStudioAddon
    metadata:
      name: rstudio-cr     # This is the recommended name, but you can change it
      namespace: project-name     # Replace with the project where you will install RStudio Server with R 3.6
    spec:
      license:
        accept: true
        license: Enterprise | Standard     # Specify the license you purchased.
      version: 4.0.9
      # cranRepoURL: <host of repo>         # Optional, specify CRAN repository URL 
      # curlCABundleName: <CA bundle name>  # Optional, specify CRAN repository CA bundle name
    EOF

Verifying the installation

When you create the custom resource, the RStudio Server with R 3.6 operator processes the contents of the custom resource and starts up the microservices that comprise RStudio Server with R 3.6, including RStudioAddon. (The RStudioAddon microservice is defined by the rstudio-cr custom resource.) RStudio Server with R 3.6 is installed when the RStudioAddon status is Completed.

To check the status of the installation:

  1. Change to the project where you installed RStudio Server with R 3.6:
    oc project project-name
  2. Get the status of RStudio Server with R 3.6 (rstudio-cr):
    oc get RStudioAddon rstudio-cr -o jsonpath='{.status.rstudioStatus} {"\n"}'

    RStudio Server with R 3.6 is ready when the command returns Completed

Choosing a service upgrade plan

You can choose how RStudio Server with R 3.6 is upgraded when you install a newer version of the RStudio Server with R 3.6 operator on the cluster.

Automatic upgrade (recommended)

If you want RStudio Server with R 3.6 to be automatically upgraded when you install a newer version of the RStudio Server with R 3.6 operator on the cluster, remove the version entry from the RStudioAddon custom resource.

To remove the version entry, run the following command. You must update the command with the appropriate project name before you run the command.

oc patch RStudioAddon rstudio-cr \
--namespace project-name \
--type=json \
--patch '[{ "op": "remove", "path": "/spec/version" }]'
Manual upgrade

If you want to manually upgrade RStudio Server with R 3.6 after you install a newer version of the RStudio Server with R 3.6 operator, you can pin the installation at a specific version in the RStudioAddon custom resource.

By default, when you create the RStudioAddon custom resource, it includes the version entry, so no additional action is required.

If you removed the version entry from the RStudioAddon custom resource, run the following command to pin the installation at Version 4.0.9. You must update the command with the appropriate project name before you run the command.

oc patch RStudioAddon rstudio-cr \
--namespace project-name \
--type=merge \
--patch '{"spec": {"version":"4.0.9"}}'

For a list of operand versions supported by the RStudio Server with R 3.6 operator, see Operator and operand versions.

What to do next

The service is ready to use. For details, see the RStudio overview.