Skip to content

Extend OOD application catalogue #738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions ansible/portal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,39 @@
name: openondemand
tasks_from: jupyter_compute.yml
when: appliances_mode != 'configure' # is run during build

- hosts: openondemand_rstudio
tags:
- openondemand
- openondemand_rstudio
become: yes
gather_facts: yes
tasks:
- import_role:
name: openondemand
tasks_from: rstudio_compute.yml
when: appliances_mode != 'configure' # is run during build

- hosts: openondemand_matlab
tags:
- openondemand
- openondemand_matlab
become: yes
gather_facts: yes
tasks:
- import_role:
name: openondemand
tasks_from: vnc_compute.yml
when: appliances_mode != 'configure' # is run during build

- hosts: openondemand_codeserver
tags:
- openondemand
- openondemand_codeserver
become: yes
gather_facts: yes
tasks:
- import_role:
name: openondemand
tasks_from: codeserver_compute.yml
when: appliances_mode != 'configure' # is run during build
5 changes: 5 additions & 0 deletions ansible/roles/openondemand/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ openondemand_desktop_screensaver: false
openondemand_filesapp_paths: []
openondemand_jupyter_partition: ''
openondemand_dashboard_links: []
openondemand_rstudio_partition: ''
openondemand_matlab_partition: ''
openondemand_codeserver_partition: ''

# Monitoring:
openondemand_exporter: true
Expand Down Expand Up @@ -100,3 +103,5 @@ openondemand_osc_ood_defaults:
oidc_uri: "{{ openondemand_auth_defaults.oidc.oidc_uri if (openondemand_auth | lower) == 'oidc' else none }}"
ood_auth_openidc: "{{ openondemand_auth_defaults.oidc.ood_auth_openidc if (openondemand_auth | lower) == 'oidc' else none }}"
httpd_auth: "{{ openondemand_auth_defaults[openondemand_auth | lower].httpd_auth }}"

code_server_version: 4.102.2
40 changes: 40 additions & 0 deletions ansible/roles/openondemand/tasks/codeserver_compute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
- name: Download Code Server RPM
ansible.builtin.get_url:
url: "https://github.com/coder/code-server/releases/download/v{{ code_server_version }}/code-server-{{ code_server_version }}-amd64.rpm"
dest: /tmp/code-server.rpm
mode: '0644'

- name: Install Code Server
ansible.builtin.dnf:
name: /tmp/code-server.rpm
state: present
disable_gpg_check: yes

- name: Create module directory for Code Server
ansible.builtin.file:
path: /opt/ohpc/pub/modulefiles/code-server
state: directory
mode: '0755'
recurse: yes

- name: Create modulefile for code-server
copy:
dest: "/opt/ohpc/pub/modulefiles/code-server/{{ code_server_version }}"
mode: "0644"
content: |
#%Module1.0#####################################################################

proc ModulesHelp { } {
puts stderr "This module loads code-server {{ code_server_version }}."
puts stderr "VS Code in the browser. Visit http://127.0.0.1:8080"
}

module-whatis "Name: code-server"
module-whatis "Version: {{ code_server_version }}"
module-whatis "Category: IDE"
module-whatis "Description: Run VS Code in your browser with code-server"
module-whatis "URL: https://github.com/coder/code-server"

set root /usr/bin/code-server

prepend-path PATH $root
51 changes: 51 additions & 0 deletions ansible/roles/openondemand/tasks/rstudio_compute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Should be run on compute nodes you want to run RStudio on
# See https://osc.github.io/ood-documentation/latest/tutorials/tutorials-interactive-apps/add-rstudio.html
# - Will already have lmod

- name: Install R from EPEL
ansible.builtin.dnf:
name: R
state: present

- name: Download RStudio Server RPM
ansible.builtin.get_url:
url: "https://download2.rstudio.org/server/rhel{{ ansible_distribution_major_version }}/x86_64/rstudio-server-rhel-2025.05.1-513-x86_64.rpm"
dest: /tmp/rstudio-server.rpm
mode: '0644'

- name: Install RStudio Server
ansible.builtin.dnf:
name: /tmp/rstudio-server.rpm
state: present
disable_gpg_check: yes

- name: Create module directory for RStudio Server
ansible.builtin.file:
path: /opt/ohpc/pub/modulefiles/rstudio-server
state: directory
mode: '0755'
recurse: yes

- name: Write modulefile for RStudio Server
ansible.builtin.copy:
dest: /opt/ohpc/pub/modulefiles/rstudio-server/2025.05.1
mode: '0644'
content: |
#%Module1.0#####################################################################

proc ModulesHelp { } {
puts stderr " "
puts stderr "This module loads RStudio Server 2025.05.1"
puts stderr "\nRStudio Server provides a browser-based interface to R.\n"
}

module-whatis "Name: rstudio-server"
module-whatis "Version: 2025.05.1"
module-whatis "Category: IDE"
module-whatis "Description: RStudio Server - IDE for R"
module-whatis "URL: https://www.rstudio.com"

set version 2025.05.1
set root /usr/lib/rstudio-server

prepend-path PATH $root/bin
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
openondemand_auth: basic_pam
openondemand_jupyter_partition: standard
openondemand_desktop_partition: standard
openondemand_rstudio_partition: standard
openondemand_matlab_partition: standard
openondemand_codeserver_partition: standard
#openondemand_dashboard_support_url:
#openondemand_dashboard_docs_url:
#openondemand_filesapp_paths:
Loading