16202: Add Workbench.SSHHelpHostSuffix
authorPeter Amstutz <peter.amstutz@curii.com>
Wed, 26 Feb 2020 21:12:22 +0000 (16:12 -0500)
committerPeter Amstutz <peter.amstutz@curii.com>
Thu, 27 Feb 2020 15:12:34 +0000 (10:12 -0500)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

apps/workbench/app/views/users/_virtual_machines.html.erb
lib/config/config.default.yml
lib/config/export.go
lib/config/generated_config.go
sdk/go/arvados/config.go

index 38458593fada290cdc8d7b82a633ec0b60467d09..e2ce5b39bc1c7e47373c6c8285d8abd8349428d7 100644 (file)
@@ -85,7 +85,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
             <td style="word-break:break-all;">
               <% if @my_vm_logins[vm[:uuid]] %>
                 <% @my_vm_logins[vm[:uuid]].each do |login| %>
-                  <code>ssh&nbsp;<%= login %>@<%= vm[:hostname] %></code>
+                  <code>ssh&nbsp;<%= login %>@<%= vm[:hostname] %><%=Rails.configuration.Workbench.SSHHelpHostSuffix%></code>
                 <% end %>
               <% end %>
             </td>
index 41af15073281b51d7a9087195a7ad9aacb9c0cc2..3750adcabca6e65c95fe59fac7af70c2126d4ff2 100644 (file)
@@ -1169,6 +1169,27 @@ Clusters:
         <a href="https://doc.arvados.org/user/getting_started/ssh-access-unix.html">Accessing an Arvados VM with SSH</a> (generic instructions).
         Site configurations vary.  Contact your local cluster administrator if you have difficulty accessing an Arvados shell node.
 
+      # Sample text if you are using a "switchyard" ssh proxy.
+      # Replace "zzzzz" with your Cluster ID.
+      #SSHHelpPageHTML: |
+      # <p>Add a section like this to your SSH configuration file ( <i>~/.ssh/config</i>):</p>
+      # <pre>Host *.zzzzz
+      #  TCPKeepAlive yes
+      #  ServerAliveInterval 60
+      #  ProxyCommand ssh -p2222 turnout@switchyard.zzzzz.arvadosapi.com -x -a $SSH_PROXY_FLAGS %h
+      # </pre>
+
+      # If you are using a switchyard ssh proxy, shell node hostnames
+      # may require a special hostname suffix.  In the sample ssh
+      # configuration above, this would be ".zzzzz"
+      # This is added to the hostname in the "command line" column
+      # the Workbench "shell VMs" page.
+      #
+      # If your shell nodes are directly accessible by users without a
+      # proxy and have fully qualified host names, you should leave
+      # this blank.
+      SSHHelpHostSuffix: ""
+
     # Bypass new (Arvados 1.5) API implementations, and hand off
     # requests directly to Rails instead. This can provide a temporary
     # workaround for clients that are incompatible with the new API
index 44c69b6e2e5fdf6af082eecd3a043aa9ff76f828..88794140a2eef28742616418bda2eace649c6a7b 100644 (file)
@@ -215,6 +215,7 @@ var whitelist = map[string]bool{
        "Workbench.WelcomePageHTML":                    true,
        "Workbench.InactivePageHTML":                   true,
        "Workbench.SSHHelpPageHTML":                    true,
+       "Workbench.SSHHelpHostSuffix":                  true,
 }
 
 func redactUnsafe(m map[string]interface{}, mPrefix, lookupPrefix string) error {
index 25fa89394a0ba9132b23a29126866c94f2d7bc08..6813bee408402e84b2a19ec7218ca8e2e3a26330 100644 (file)
@@ -1175,6 +1175,27 @@ Clusters:
         <a href="https://doc.arvados.org/user/getting_started/ssh-access-unix.html">Accessing an Arvados VM with SSH</a> (generic instructions).
         Site configurations vary.  Contact your local cluster administrator if you have difficulty accessing an Arvados shell node.
 
+      # Sample text if you are using a "switchyard" ssh proxy.
+      # Replace "zzzzz" with your Cluster ID.
+      #SSHHelpPageHTML: |
+      # <p>Add a section like this to your SSH configuration file ( <i>~/.ssh/config</i>):</p>
+      # <pre>Host *.zzzzz
+      #  TCPKeepAlive yes
+      #  ServerAliveInterval 60
+      #  ProxyCommand ssh -p2222 turnout@switchyard.zzzzz.arvadosapi.com -x -a $SSH_PROXY_FLAGS %h
+      # </pre>
+
+      # If you are using a switchyard ssh proxy, shell node hostnames
+      # may require a special hostname suffix.  In the sample ssh
+      # configuration above, this would be ".zzzzz"
+      # This is added to the hostname in the "command line" column
+      # the Workbench "shell VMs" page.
+      #
+      # If your shell nodes are directly accessible by users without a
+      # proxy and have fully qualified host names, you should leave
+      # this blank.
+      SSHHelpHostSuffix: ""
+
     # Bypass new (Arvados 1.5) API implementations, and hand off
     # requests directly to Rails instead. This can provide a temporary
     # workaround for clients that are incompatible with the new API
index 176f1dd2ae795a372f277d0aaf7a36897190f30a..a70980cbde232cc562155bbfb813d0f1cf32afbc 100644 (file)
@@ -215,6 +215,7 @@ type Cluster struct {
                WelcomePageHTML        string
                InactivePageHTML       string
                SSHHelpPageHTML        string
+               SSHHelpHostSuffix      string
        }
 
        ForceLegacyAPI14 bool