Class: OodCore::BatchConnect::Templates::VNC_Container

Inherits:
OodCore::BatchConnect::Template show all
Defined in:
lib/ood_core/batch_connect/templates/vnc_container.rb

Overview

A batch connect template that starts up a VNC server within a batch job

Instance Attribute Summary

Attributes inherited from OodCore::BatchConnect::Template

#context

Instance Method Summary collapse

Methods inherited from OodCore::BatchConnect::Template

#to_s

Constructor Details

#initialize(context = {}) ⇒ VNC_Container

Returns a new instance of VNC_Container.

Parameters:

  • context (#to_h) (defaults to: {})

    the context used to render the template

  • instance_name (uuid)

    a name for the instance

Options Hash (context):

  • :conn_params (#to_sym, Array<#to_sym>) — default: []

    A list of connection parameters added to the connection file (‘:host`, `:port`, `:password`, `:spassword`, `:display` and `:websocket` will always exist)

  • :websockify_cmd (#to_s) — default: "${WEBSOCKIFY_CMD:-/opt/websockify/run}"

    the path to the websockify script (assumes you don’t modify ‘:after_script`)

  • :vnc_log (#to_s) — default: "vnc.log"

    path to vnc server log file (assumes you don’t modify ‘:before_script` or `:after_script`)

  • :vnc_passwd (#to_s) — default: "vnc.passwd"

    path to the file generated that contains the encrypted vnc password (assumes you don’t modify ‘:before_script`)

  • :vnc_args (#to_s)

    arguments used when starting up the vnc server (overrides any specific vnc argument) (assumes you don’t modify ‘:before_script`)

  • :name (#to_s) — default: ""

    name of the vnc server session (not set if blank or ‘:vnc_args` is set) (assumes you don’t modify ‘:before_script`)

  • :geometry (#to_s) — default: ""

    resolution of vnc display (not set if blank or ‘:vnc_args` is set) (assumes you don’t modify ‘:before_script`)

  • :dpi (#to_s) — default: ""

    dpi of vnc display (not set if blank or ‘:vnc_args` is set) (assumes you don’t modify ‘:before_script`)

  • :fonts (#to_s) — default: ""

    command delimited list of fonts available in vnc display (not set if blank or ‘:vnc_args` is set) (assumes you don’t modify ‘:before_script`)

  • :idle (#to_s) — default: ""

    timeout vnc server if no connection in this amount of time in seconds (not set if blank or ‘:vnc_args` is set) (assumes you don’t modify ‘:before_script`)

  • :extra_args (#to_s) — default: ""

    any extra arguments used when initializing the vnc server process (not set if blank or ‘:vnc_args` is set) (assumes you don’t modify ‘:before_script`)

  • :vnc_clean (#to_s) — default: "..."

    script used to clean up any active vnc sessions (assumes you don’t modify ‘:before_script` or `:clean_script`)

  • :container_path (#to_s) — default: "vnc_container.sif"

    the path to the container with VNC

  • :container_bindpath (#to_s) — default: ""

    paths to bind into the container with VNC

  • :container_module (#to_s) — default: "singularity"

    the module that loads Singularity or Apptainer with Lmod. Supports versions (i.e. apptainer/1.10). If Singularity or Apptainer are installed at a system level (i.e., no module loaded to activate), set this to an empty string.

  • :container_command (#to_s) — default: "singularity"

    the singularity or apptainer execution command

  • :container_start_args (#to_a) — default: []

    Additional arguements you wish to pass to the container start command.

See Also:



78
79
80
81
# File 'lib/ood_core/batch_connect/templates/vnc_container.rb', line 78

def initialize(context = {})
  @instance_name = SecureRandom.uuid
  super
end