[OOD-users] Ports for websockify

Nicklas, Jeremy jnicklas at osc.edu
Thu Jun 14 08:45:01 EDT 2018


Hi Lisa,

This is a good question. The relevant code is here:

https://github.com/OSC/ood_core/blob/d21a1d62a41b1a3e6d05a28cfe1100bb931597f9/lib/ood_core/batch_connect/templates/vnc.rb#L133-L135

It uses the `find_port` method defined here to determine an available port:

https://github.com/OSC/ood_core/blob/d21a1d62a41b1a3e6d05a28cfe1100bb931597f9/lib/ood_core/batch_connect/template.rb#L117-L126

This method actually uses the configuration options `min_port` and `max_port` to determine the range of ports for the batch_connect script. So an example "submit.yml.erb" for an Interactive App may look like:

# submit.yml.erb
---
batch_connect:
  template: vnc
  min_port: 10000
  max_port: 20000

You can make this global for all apps by setting this in the relevant cluster config file "/etc/ood/config/clusters.d/<my_cluster>.yml" as such:

# /etc/ood/config/clusters.d/<my_cluster>.yml
---
v2:
  # ......
  batch_connect:
    basic:
      # ......
      min_port: 10000
      max_port: 20000
    vnc:
      # ......
      min_port: 10000
      max_port: 20000

Let me know if you experience any issues as I haven't fully tested this before and I am pulling this from my memory and by looking at the code.


--
Jeremy Nicklas
Web and Interface App Engineer
Ohio Supercomputer Center (OSC)
A member of the Ohio Technology Consortium
1224 Kinnear Road, Columbus, Ohio 43212
Office: (614) 292-6739 • Mobile: (614) 316-6428 • Fax: (614) 292-7168
jnicklas at osc.edu

Learn more about OSC at https://osc.edu

________________________________________
From: OOD-users [ood-users-bounces at lists.osc.edu] on behalf of Lisa Perez [mouse at tamu.edu]
Sent: Wednesday, June 13, 2018 4:20 PM
To: ood-users at lists.osc.edu
Subject: [OOD-users] Ports for websockify

Is there a way to set a range of ports to use for websockify?

Lisa Perez

Sent from my iPhone
_______________________________________________
OOD-users mailing list
OOD-users at lists.osc.edu
https://lists.osu.edu/mailman/listinfo/ood-users


More information about the OOD-users mailing list