Skip to content
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

Configurable list of remote viz queues #1802

Merged
merged 5 commits into from
Jan 4, 2024
Merged
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
7 changes: 7 additions & 0 deletions .github/workflows/configs/almalinux.yml
Original file line number Diff line number Diff line change
@@ -59,13 +59,17 @@ queues:

# Remote Viz Queues
- name: viz3d
type: remoteviz
description: "With GPU - Small GPU node for single session"
vm_size: Standard_NV12s_v3
max_count: 4
image: azhpc:azhop-desktop:almalinux-8_7:latest
ColocateNodes: false
EnableAcceleratedNetworking: true

- name: viz
type: remoteviz
description: "Without GPU - for single session"
vm_size: Standard_D8s_v5
max_count: 10
image: azhpc:azhop-desktop:almalinux-8_7:latest
@@ -75,6 +79,9 @@ queues:
min_hours: 1 # Minimum session duration - 0 is infinite

- name: largeviz3d
type: remoteviz
description: "Large With GPU - Intented for shared sessions"
shareable: true
vm_size: Standard_NV48s_v3
max_count: 4
image: azhpc:azhop-desktop:almalinux-8_7:latest
7 changes: 7 additions & 0 deletions .github/workflows/configs/centos.yml
Original file line number Diff line number Diff line change
@@ -65,6 +65,8 @@ queues:

# Remote Viz Queues
- name: viz3d
type: remoteviz
description: "With GPU - Small GPU node for single session"
vm_size: Standard_NV12s_v3
max_count: 4
image: azhpc:azhop-desktop:centos-7_9:latest
@@ -73,6 +75,8 @@ queues:

- name: viz
vm_size: Standard_D8s_v5
type: remoteviz
description: "Without GPU - for single session"
max_count: 10
image: azhpc:azhop-desktop:centos-7_9:latest
ColocateNodes: false
@@ -82,6 +86,9 @@ queues:

- name: largeviz3d
vm_size: Standard_NV48s_v3
type: remoteviz
description: "Large With GPU - Intented for shared sessions"
shareable: true
max_count: 4
image: azhpc:azhop-desktop:centos-7_9:latest
ColocateNodes: false
7 changes: 7 additions & 0 deletions .github/workflows/configs/integration.yml
Original file line number Diff line number Diff line change
@@ -262,6 +262,8 @@ queues:

# Remote Viz Queues
- name: viz3d
type: remoteviz
description: "With GPU - Small GPU node for single session"
vm_size: Standard_NV12s_v3
max_count: 4
image: azhpc:azhop-desktop:centos-7_9:latest
@@ -270,6 +272,8 @@ queues:
EnableAcceleratedNetworking: true
- name: viz
vm_size: Standard_D8s_v5
type: remoteviz
description: "Without GPU - for single session"
max_count: 10
image: azhpc:azhop-desktop:centos-7_9:latest
ColocateNodes: false
@@ -278,6 +282,9 @@ queues:
max_hours: 12 # Maximum session duration
min_hours: 1 # Minimum session duration - 0 is infinite
- name: largeviz3d
type: remoteviz
description: "Large With GPU - Intented for shared sessions"
shareable: true
vm_size: Standard_NV48s_v3
max_count: 2
image: azhpc:azhop-desktop:centos-7_9:latest
17 changes: 17 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
@@ -1116,6 +1116,23 @@
"min_hours": {
"description": "Minimum session duration",
"type": "integer"
},
"type": {
"description": "Type of queue - mandatory for remoteviz nodes",
"enum": [
"remoteviz",
"compute"
],
"type": "string"
},
"description": {
"description": "Description of the queue that will appear in the node selection choice of the ood portal",
"type": "string"
},
"shareable": {
"description": "Whether the remote visualization node can be shared by multiple users. Defaults to false",
"type": "boolean",
"default": false
}
},
"required": [
14 changes: 11 additions & 3 deletions config.tpl.yml
Original file line number Diff line number Diff line change
@@ -499,8 +499,11 @@ queues:
max_count: 0
image: azhpc:azhop-compute:centos-7_9:latest
EnableAcceleratedNetworking: true
# Queue dedicated to GPU remote viz nodes. This name is fixed and can't be changed

# Queues for remote visualization
- name: viz3d
type: remoteviz # mandatory property to specify the queue is for remote viz nodes
description: "With GPU - Small GPU node for single session" # optional description that will appear in the node selection choice of the ood portal
vm_size: Standard_NV12s_v3
max_count: 4
# Use the pre-built azhop image from the marketplace
@@ -511,17 +514,22 @@ queues:
EnableAcceleratedNetworking: true
max_hours: 12 # Maximum session duration
min_hours: 1 # Minimum session duration - 0 is infinite
# Queue dedicated to share GPU remote viz nodes. This name is fixed and can't be changed

- name: largeviz3d
type: remoteviz
description: "Large With GPU - Intented for shared sessions"
shareable: true # Set to true to allow multiple users to connect to the same node - false by default
vm_size: Standard_NV48s_v3
max_count: 2
image: azhpc:azhop-desktop:centos-7_9:latest
ColocateNodes: false
EnableAcceleratedNetworking: true
max_hours: 12
min_hours: 1
# Queue dedicated to non GPU remote viz nodes. This name is fixed and can't be changed

- name: viz
type: remoteviz
description: "Without GPU - for single session"
vm_size: Standard_D8s_v5
max_count: 10
image: azhpc:azhop-desktop:centos-7_9:latest
554 changes: 0 additions & 554 deletions docs/deploy/index.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions playbooks/nodearray_lookup.yml
Original file line number Diff line number Diff line change
@@ -41,6 +41,13 @@
delegate_to: ondemand
become: true

- name: Copy the viz node configuration file
template:
src: 'viz_nodes.yml.j2'
dest: '/etc/ood/config/apps/bc_desktop/config/viz_nodes.yml'
delegate_to: ondemand
become: true

# - name: create config directory
# file:
# path: /etc/ood/config/apps/bc_desktop/config
19 changes: 2 additions & 17 deletions playbooks/ood-overrides-common.yml
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ ood_apps:
form:
- desktop
- target
- num_hours
- bc_num_hours
- bucket
attributes:
desktop: xfce
@@ -48,23 +48,8 @@ ood_apps:
label: "Session target"
help: |
Select the resource target for the remote desktop session <br>
- **With GPU** <br>
These are standard small GPU nodes for visualization for a single user session.<br>
- **Large With GPU** <br>
These are standard large GPU nodes for visualization, usually for multiple users sessions sharing the same node.<br>
- **Without GPU** <br>
Same as for **With GPU** but without a GPU accelerator.
options:
- ["With GPU - Small GPU node for single session", "viz3d", data-hide-bucket: true, data-set-bucket: 1,
data-max-num-hours: "{{ (queues | selectattr('name', 'equalto', 'viz3d') | map(attribute='max_hours', default=8)) }}",
data-min-num-hours: "{{ (queues | selectattr('name', 'equalto', 'viz3d') | map(attribute='min_hours', default=1)) }}"]
- ["Large With GPU - Intented for shared sessions", "largeviz3d",
data-max-num-hours: "{{ (queues | selectattr('name', 'equalto', 'largeviz3d') | map(attribute='max_hours', default=8)) }}",
data-min-num-hours: "{{ (queues | selectattr('name', 'equalto', 'largeviz3d') | map(attribute='min_hours', default=1)) }}"]
- ["Without GPU - for single session", "viz", data-hide-bucket: true, data-set-bucket: 1,
data-max-num-hours: "{{ (queues | selectattr('name', 'equalto', 'viz') | map(attribute='max_hours', default=8)) }}",
data-min-num-hours: "{{ (queues | selectattr('name', 'equalto', 'viz') | map(attribute='min_hours', default=1)) }}"]
num_hours:
bc_num_hours:
widget: "number_field"
label: "Maximum duration in hours of your remote session"
value: 1
6 changes: 0 additions & 6 deletions playbooks/ood-overrides-openpbs.yml
Original file line number Diff line number Diff line change
@@ -14,12 +14,6 @@ ood_apps:
scheduler_args = ["-q", "vizq"]
# If the user has specified a number of hours, set the job walltime
hours = num_hours.to_i
if hours > 0
scheduler_args += ["-l", "walltime=%02d:00:00" % hours]
end
# If the user has specified a node ratio greather than 1, set the job ppn
node_ratio = bucket.to_i
node_arrays = YAML.load_file("/etc/ood/config/apps/bc_desktop/config/node_arrays.yml")
6 changes: 0 additions & 6 deletions playbooks/ood-overrides-slurm.yml
Original file line number Diff line number Diff line change
@@ -12,12 +12,6 @@ ood_apps:
require "yaml"
scheduler_args = ["-p", target]
# If the user has specified a number of hours, set the job walltime
hours = num_hours.to_i
if hours > 0
scheduler_args += ["-t", "%02d:00:00" % hours]
end
# If the user has specified a node ratio greather than 1, set the job ppn
node_ratio = bucket.to_i
node_arrays = YAML.load_file("/etc/ood/config/apps/bc_desktop/config/node_arrays.yml")
25 changes: 24 additions & 1 deletion playbooks/ood.yml
Original file line number Diff line number Diff line change
@@ -538,13 +538,36 @@
shell: cvmfs_config setup
when: ( cvmfs_eessi.enabled | default(false) )

# Generate the node array core lookup file for ondemand - will be only run if the marker file for ondemand exists
- name: "yq: Download and install (CentOS)"
get_url:
url: "https://github.com/mikefarah/yq/releases/download/{{ yq_version }}/{{ yq_binary }}"
dest: /usr/bin/yq
mode: 0755

# Configure bc_desktop for dynamic remote viz targets
- name: copy bc_desktop file
copy:
remote_src: true
src: /etc/ood/config/apps/bc_desktop/ondemand.yml
dest: /etc/ood/config/apps/bc_desktop/ondemand.yml.erb

- name: configure bc_desktop to dynamically load viz targets
blockinfile:
path: /etc/ood/config/apps/bc_desktop/ondemand.yml.erb
insertafter : "options: null"
backup: no
block: |
# Dynamically load viz targets - keep indentation as is
<%- File.readlines("/etc/ood/config/apps/bc_desktop/config/viz_nodes.yml").each do |line| %>
<%= line.to_s %>
<%- end %>
- name: remove the null value of the options
replace:
path: /etc/ood/config/apps/bc_desktop/ondemand.yml.erb
regexp: 'options: null'
replace: 'options:'

# Generate the node array core lookup file for ondemand - will be only run if the marker file for ccluster exists
- import_tasks: nodearray_lookup.yml
vars:
marker_file: cccluster.ok
Original file line number Diff line number Diff line change
@@ -25,22 +25,10 @@ attributes:
label: "Session target"
help: |
Select the resource target for the remote desktop session <br>
- **With GPU** <br>
These are standard small GPU nodes for visualization for a single user session.<br>
- **Large With GPU** <br>
These are standard large GPU nodes for visualization, usually for multiple users sessions sharing the same node.<br>
- **Without GPU** <br>
Same as for **With GPU** but without a GPU accelerator.
options:
- ["With GPU - Small GPU node for single session", "viz3d", data-hide-bucket: true, data-set-bucket: 1,
data-max-bc-num-hours: "8",
data-min-bc-num-hours: "1"]
- ["Large With GPU - Intented for shared sessions", "largeviz3d",
data-max-bc-num-hours: "8",
data-min-bc-num-hours: "1"]
- ["Without GPU - for single session", "viz", data-hide-bucket: true, data-set-bucket: 1,
data-max-bc-num-hours: "8",
data-min-bc-num-hours: "1"]
<%- File.readlines("/etc/ood/config/apps/bc_desktop/config/viz_nodes.yml").each do |line| %>
<%= line.to_s %>
<%- end %>
bucket:
widget: "select"
label: "Node bucket"
20 changes: 3 additions & 17 deletions playbooks/roles/ood-applications/files/bc_paraview/form.yml.erb
Original file line number Diff line number Diff line change
@@ -12,8 +12,6 @@ attributes:
widget: "number_field"
label: "Maximum duration in hours of your session"
value: 1
min: 1
max: 8
help: |
This is the maximum duration in hours of your session once started.
step: 1
@@ -22,22 +20,10 @@ attributes:
label: "Node type"
help: |
Select the resource target for the remote desktop session <br>
- **With GPU** <br>
These are standard small GPU nodes for visualization for a single user session.<br>
- **Large With GPU** <br>
These are standard large GPU nodes for visualization, usually for multiple users sessions sharing the same node.<br>
- **Without GPU** <br>
Same as for **With GPU** but without a GPU accelerator.
options:
- ["With GPU - Small GPU node for single session", "viz3d", data-hide-bucket: true, data-set-bucket: 1,
data-max-bc-num-hours: "8",
data-min-bc-num-hours: "1"]
- ["Large With GPU - Intented for shared sessions", "largeviz3d",
data-max-bc-num-hours: "8",
data-min-bc-num-hours: "1"]
- ["Without GPU - for single session", "viz", data-hide-bucket: true, data-set-bucket: 1,
data-max-bc-num-hours: "8",
data-min-bc-num-hours: "1"]
<%- File.readlines("/etc/ood/config/apps/bc_desktop/config/viz_nodes.yml").each do |line| %>
<%= line.to_s %>
<%- end %>
bucket:
widget: "select"
label: "Node bucket"
18 changes: 3 additions & 15 deletions playbooks/roles/ood-applications/files/bc_vizer/form.yml.erb
Original file line number Diff line number Diff line change
@@ -22,22 +22,10 @@ attributes:
label: "Node type"
help: |
Select the resource target for the remote desktop session <br>
- **With GPU** <br>
These are standard small GPU nodes for visualization for a single user session.<br>
- **Large With GPU** <br>
These are standard large GPU nodes for visualization, usually for multiple users sessions sharing the same node.<br>
- **Without GPU** <br>
Same as for **With GPU** but without a GPU accelerator.
options:
- ["With GPU - Small GPU node for single session", "viz3d", data-hide-bucket: true, data-set-bucket: 1,
data-max-bc-num-hours: "8",
data-min-bc-num-hours: "1"]
- ["Large With GPU - Intented for shared sessions", "largeviz3d",
data-max-bc-num-hours: "8",
data-min-bc-num-hours: "1"]
- ["Without GPU - for single session", "viz", data-hide-bucket: true, data-set-bucket: 1,
data-max-bc-num-hours: "8",
data-min-bc-num-hours: "1"]
<%- File.readlines("/etc/ood/config/apps/bc_desktop/config/viz_nodes.yml").each do |line| %>
<%= line.to_s %>
<%- end %>
bucket:
widget: "select"
label: "Node bucket"
18 changes: 3 additions & 15 deletions playbooks/roles/ood-applications/files/bc_vmd/form.yml.erb
Original file line number Diff line number Diff line change
@@ -24,22 +24,10 @@ attributes:
label: "Session target"
help: |
Select the resource target for the remote desktop session <br>
- **With GPU** <br>
These are standard small GPU nodes for visualization for a single user session.<br>
- **Large With GPU** <br>
These are standard large GPU nodes for visualization, usually for multiple users sessions sharing the same node.<br>
- **Without GPU** <br>
Same as for **With GPU** but without a GPU accelerator.
options:
- ["With GPU - Small GPU node for single session", "viz3d", data-hide-bucket: true, data-set-bucket: 1,
data-max-bc-num-hours: "8",
data-min-bc-num-hours: "1"]
- ["Large With GPU - Intented for shared sessions", "largeviz3d",
data-max-bc-num-hours: "8",
data-min-bc-num-hours: "1"]
- ["Without GPU - for single session", "viz", data-hide-bucket: true, data-set-bucket: 1,
data-max-bc-num-hours: "8",
data-min-bc-num-hours: "1"]
<%- File.readlines("/etc/ood/config/apps/bc_desktop/config/viz_nodes.yml").each do |line| %>
<%= line.to_s %>
<%- end %>
bucket:
widget: "select"
label: "Node bucket"
44 changes: 0 additions & 44 deletions playbooks/roles/ood-applications/files/bc_vmd/template/xfce.sh

This file was deleted.

3 changes: 3 additions & 0 deletions playbooks/templates/viz_nodes.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% for queue in ( queues | rejectattr('type', 'undefined') | selectattr('type', 'match', 'remoteviz'))%}
- ["{{ queue.description | default(queue.name) }}", "{{ queue.name }}", data-max-bc-num-hours: {{ queue.max_hours | default(8) }}, data-min-bc-num-hours: {{ queue.min_hours | default(1) }}{% if (queue.shareable is not defined) or (queue.shareable is defined and not queue.shareable) %}, data-hide-bucket: true, data-set-bucket: 1 {% endif %}]
{% endfor %}