Skip to content

Commit 9c925f6

Browse files
committed
Document lack of out-the-box MATLAB functionality
1 parent 05db2e2 commit 9c925f6

File tree

7 files changed

+21
-19
lines changed

7 files changed

+21
-19
lines changed

ansible/portal.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
tasks_from: rstudio_compute.yml
5050
when: appliances_mode != 'configure' # is run during build
5151

52+
# Requires openondemand_matlab_partition to be set in group_vars, as well as MATLAB installed on target compute nodes
5253
- hosts: openondemand_matlab
5354
tags:
5455
- openondemand

ansible/roles/openondemand/defaults/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,5 @@ openondemand_osc_ood_defaults:
104104
ood_auth_openidc: "{{ openondemand_auth_defaults.oidc.ood_auth_openidc if (openondemand_auth | lower) == 'oidc' else none }}"
105105
httpd_auth: "{{ openondemand_auth_defaults[openondemand_auth | lower].httpd_auth }}"
106106

107-
code_server_version: 4.102.2
107+
ondemand_code_server_version: 4.102.2
108+
ondemand_rstudio_version: 2025.05.1-513

ansible/roles/openondemand/tasks/codeserver_compute.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- name: Download Code Server RPM
22
ansible.builtin.get_url:
3-
url: "https://github.com/coder/code-server/releases/download/v{{ code_server_version }}/code-server-{{ code_server_version }}-amd64.rpm"
3+
url: "https://github.com/coder/code-server/releases/download/v{{ ondemand_code_server_version }}/code-server-{{ ondemand_code_server_version }}-amd64.rpm"
44
dest: /tmp/code-server.rpm
55
mode: '0644'
66

@@ -17,22 +17,22 @@
1717
mode: '0755'
1818
recurse: yes
1919

20-
- name: Create modulefile for code-server
20+
- name: Create modulefile for Code Server
2121
copy:
22-
dest: "/opt/ohpc/pub/modulefiles/code-server/{{ code_server_version }}"
22+
dest: "/opt/ohpc/pub/modulefiles/code-server/{{ ondemand_code_server_version }}"
2323
mode: "0644"
2424
content: |
2525
#%Module1.0#####################################################################
2626
2727
proc ModulesHelp { } {
28-
puts stderr "This module loads code-server {{ code_server_version }}."
29-
puts stderr "VS Code in the browser. Visit http://127.0.0.1:8080"
28+
puts stderr "This module loads code-server {{ ondemand_code_server_version }}."
29+
puts stderr "\nCode Server provides a browser-based VSCode instance.\n"
3030
}
3131
3232
module-whatis "Name: code-server"
33-
module-whatis "Version: {{ code_server_version }}"
33+
module-whatis "Version: {{ ondemand_code_server_version }}"
3434
module-whatis "Category: IDE"
35-
module-whatis "Description: Run VS Code in your browser with code-server"
35+
module-whatis "Description: Run VS Code in your browser with Code Server"
3636
module-whatis "URL: https://github.com/coder/code-server"
3737
3838
set root /usr/bin/code-server

ansible/roles/openondemand/tasks/rstudio_compute.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

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

@@ -28,24 +28,23 @@
2828

2929
- name: Write modulefile for RStudio Server
3030
ansible.builtin.copy:
31-
dest: /opt/ohpc/pub/modulefiles/rstudio-server/2025.05.1
31+
dest: "/opt/ohpc/pub/modulefiles/rstudio-server/{{ ondemand_rstudio_version }}"
3232
mode: '0644'
3333
content: |
3434
#%Module1.0#####################################################################
3535
3636
proc ModulesHelp { } {
3737
puts stderr " "
38-
puts stderr "This module loads RStudio Server 2025.05.1"
38+
puts stderr "This module loads RStudio Server {{ ondemand_rstudio_version }}"
3939
puts stderr "\nRStudio Server provides a browser-based interface to R.\n"
4040
}
4141
4242
module-whatis "Name: rstudio-server"
43-
module-whatis "Version: 2025.05.1"
43+
module-whatis "Version: {{ ondemand_rstudio_version }}"
4444
module-whatis "Category: IDE"
4545
module-whatis "Description: RStudio Server - IDE for R"
4646
module-whatis "URL: https://www.rstudio.com"
4747
48-
set version 2025.05.1
4948
set root /usr/lib/rstudio-server
5049
5150
prepend-path PATH $root/bin

docs/openondemand.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ For examples of all of the above see the `smslabs-example` environment in this r
2222
# Enabling Open OnDemand
2323
To enable the Open OnDemand server, add single host to the `openondemand` inventory group. Generally, this should be a node in the `login` group, as Open OnDemand must be able to access Slurm commands.
2424

25-
To enable compute nodes for virtual desktops or Jupyter notebook servers (accessed through the Open OnDemand portal), add nodes/groups to the `openondemand_desktop` and `openondemand_jupyter` inventory groups respectively. These may be all or a subset of the `compute` group.
25+
To enable compute nodes for virtual desktops, Jupyter notebooks, RStudio, VSCode, or MATLAB (accessed through the Open OnDemand portal), add nodes/groups to the `openondemand_desktop`, `openondemand_jupyter`, `openondemand_rstudio`, `openondemand_codeserver`, and `openondemand_matlab` inventory groups respectively. These may be all or a subset of the `compute` group.
26+
27+
*Note* that due to licensing, the MATLAB batch connect app only works with a MATLAB distribution already installed on the target site compute nodes, as well as Lmod configured with the correct modulefiles. MATLAB app also requires the same TurboVNC and Xfce Desktop software installed for the virtual desktop, so this is included for `openondemand_matlab` groups. To enable the MATLAB app, the `openondemand_matlab_partition` must also be defined in group_vars as it is set to `null` by default.
2628

2729
The above functionality is configured by running the `ansible/portal.yml` playbook. This is automatically run as part of `ansible/site.yml`.
2830

@@ -33,7 +35,7 @@ See the [ansible/roles/openondemand/README.md](../ansible/roles/openondemand/REA
3335
The following variables have been given default values to allow Open OnDemand to work in a newly created environment without additional configuration, but generally should be overridden in `environments/site/inventory/group_vars/all/` with site-specific values:
3436
- `openondemand_servername` - this must be defined for both `openondemand` and `grafana` hosts (when Grafana is enabled). Default is `ansible_host` (i.e. the IP address) of the first host in the `openondemand` group.
3537
- `openondemand_auth` and any corresponding options. Defaults to `basic_pam`.
36-
- `openondemand_desktop_partition` and `openondemand_jupyter_partition` if the corresponding inventory groups are defined. Defaults to the first compute group defined in the `compute` OpenTofu variable in `environments/$ENV/tofu`.
38+
- `openondemand_desktop_partition`, `openondemand_jupyter_partition`, `openondemand_rstudio_partition`, and `openondemand_codeserver_partition` if the corresponding inventory groups are defined. Defaults to the first compute group defined in the `compute` OpenTofu variable in `environments/$ENV/tofu`.
3739

3840
It is also recommended to set:
3941
- `openondemand_dashboard_support_url`

environments/.stackhpc/inventory/group_vars/all/openondemand.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ openondemand_auth: basic_pam
22
openondemand_jupyter_partition: standard
33
openondemand_desktop_partition: standard
44
openondemand_rstudio_partition: standard
5-
openondemand_matlab_partition: standard
65
openondemand_codeserver_partition: standard
76
#openondemand_dashboard_support_url:
87
#openondemand_dashboard_docs_url:

environments/common/inventory/group_vars/all/openondemand.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ openondemand_auth: basic_pam
1515
openondemand_jupyter_partition: "{{ openhpc_partitions[0]['name'] }}"
1616
openondemand_desktop_partition: "{{ openhpc_partitions[0]['name'] }}"
1717
openondemand_rstudio_partition: "{{ openhpc_partitions[0]['name'] }}"
18-
openondemand_matlab_partition: "{{ openhpc_partitions[0]['name'] }}"
18+
openondemand_matlab_partition: null # Requires target site to already have MATLAB so set to null
1919
openondemand_codeserver_partition: "{{ openhpc_partitions[0]['name'] }}"
2020

2121
# Regex defining hosts which openondemand can proxy; the default regex is compute nodes (for apps) and grafana host,
@@ -197,7 +197,7 @@ openondemand_apps_rstudio_default:
197197
help: Choose your RStudio module
198198
widget: select
199199
options:
200-
- ["rstudio-server/2025.05.1","rstudio-server/2025.05.1"]
200+
- ["rstudio-server/{{ ondemand_rstudio_version }}","RStudio v{{ ondemand_rstudio_version }}"]
201201
extra_modules_script:
202202
label: Extra modules script
203203
help: If you'd like to load additional modules alongside RStudio-Server, put the 'module load ...' commands into a text file (one 'module load...' per line) and specify its path here
@@ -312,7 +312,7 @@ openondemand_apps_codeserver_default:
312312
help: Choose your Code Server module
313313
widget: select
314314
options:
315-
- ["code-server/4.102.2","code-server/4.102.2"]
315+
- ["code-server/{{ ondemand_code_server_version }}","Code Server v{{ ondemand_code_server_version}}"]
316316
bc_queue:
317317
value: "{{ openondemand_codeserver_partition | default(none) }}"
318318
cores:

0 commit comments

Comments
 (0)