Skip to content

Creating Your Own Developer Catalog Service

Here, we walk through the process of creating a simple RStudio Web Server using an OpenShift Template, which bundles all the necessary resources required to run it, such as ConfigMap, Pod, Route, Service, etc., and then initiate and deploy the RStudio server from that template.

This example template file is readily accessible from the Git Repository.

To get started, clone the repository using:

git clone https://github.com/nerc-project/rstudio-testapp.git

More about Writing Templates

For more options and customization please read this.

  1. Click the "Import YAML" button, represented by the "+" icon in the top navigation bar, or navigate to the From Local Machine section and select Import YAML, as shown below:

    Import YAML

    Next, the Import YAML editor box will open, as shown below:

    YAML Editor

  2. Either drag and drop the locally downloaded rstudio-server-template.yaml file or copy and paste its contents into the opened Import YAML editor box, as shown below:

    RStudio Server Template YAML Content

  3. You need to find the Developer Catalog section and then select All services option as shown below:

    Select All Services

  4. Then, you will be able to use the created Developer Catalog template by searching for "rstudio" on catalog as shown below:

    Search for RStudio Template

  5. Once selected by clicking the template, you will see Instantiate Template web interface as shown below:

    Initiate Template

  6. Based on our template definition, we request that users input a preferred PASSWORD as a variable for the RStudio Server. The following interface will prompt you to enter the password, which will be used for logging into the RStudio Server.

    Variables

    This variable is mandatory for the application to be created.

    • PASSWORD - Password for logging into RStudio Server

    Provide the RStudio Password

  7. Once successfully initiated, you can either open the application URL using the Open URL icon as shown below or you can naviate to the route URL by navigating to the "Routes" section under the Location path as shown below:

    How to get the RStudio Application URL

  8. To get the Username to be used for login on RStudio Server, you need to click on running pod i.e. rstudio-server as shown below:

    Detail Information for RStudio Pod

  9. Then select the YAML section to find out the attribute value for runAsUser that is used as the Username while Sign in to RStudio Server as shown below:

    Username for RStudio Server from Pod runAsUser

  10. Finally, you will be able to view the RStudio Web Server interface!

Modifying uploaded templates

You can edit a template that has already been uploaded to your project: oc edit template <template>.

Another Example of Using an OpenShift Template to Setup an R Shiny Server

Here is another example of running an R Shiny Server using an OpenShift Template.
You can find more details here.