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.
-
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:
Next, the Import YAML editor box will open, as shown below:
-
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:
-
You need to find the Developer Catalog section and then select All services option as shown below:
-
Then, you will be able to use the created Developer Catalog template by searching for "rstudio" on catalog as shown below:
-
Once selected by clicking the template, you will see Instantiate Template web interface as shown below:
-
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
-
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:
-
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:
-
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:
-
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.