2. Modify Cluster Configuration¶
If you haven’t already done so, you will need to first have a corresponding cluster configuration file for the cluster you intend to submit Interactive Apps (Plugins) batch jobs to. It is recommended you follow the directions on Add Cluster Configuration Files.
Modify the cluster configuration file with the necessary information so that a batch script generated from an interactive app can find the installed copies of TurboVNC and websockify:
# /etc/ood/config/clusters.d/my_cluster.yml --- v2: metadata: title: "Cluster 1" login: host: "my_cluster.my_center.edu" job: adapter: "..." ... batch_connect: basic: script_wrapper: | module purge %s vnc: script_wrapper: | module purge export PATH="/usr/local/turbovnc/bin:$PATH" export WEBSOCKIFY_CMD="/usr/local/websockify/run" %s
where we introduced the configuration option
batch_connect that allows us
to add global settings for both a
basic interactive web server as well as a
vnc interactive web server.
In the above case we modify the global setting
script_wrapper for both
vnc sessions. This allows us to supply bash code
that wraps around the body of the template script (specified by
we purge the module environment to remove any conflicting modules that may have
been loaded by the user’s
.bash_profile files. Then we
specify the required environment needed by the
vnc script to launch
TurboVNC and websockify.
You will most likely need to replace the block of code below in your cluster configuration file:
script_wrapper: | module purge export PATH="/usr/local/turbovnc/bin:$PATH" export WEBSOCKIFY_CMD="/usr/local/websockify/run" %s
with a block that adds the full path to the TurboVNC binaries into the
PATH environment variable as well as the corresponding websockify
launcher into the
WEBSOCKIFY_CMD environment variable.
Do not forget to include the
%s in the
option. Otherwise the actual bash code that launches the
corresponding web servers will never be interpolated into the main batch
script and run.