From: Peter Amstutz Date: Wed, 26 Feb 2020 21:12:22 +0000 (-0500) Subject: 16202: Add Workbench.SSHHelpHostSuffix X-Git-Tag: 2.1.0~284^2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/f8b7dc97730ded2c22bedd1a8fb4f13d388a570f?hp=-c 16202: Add Workbench.SSHHelpHostSuffix Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- f8b7dc97730ded2c22bedd1a8fb4f13d388a570f diff --git a/apps/workbench/app/views/users/_virtual_machines.html.erb b/apps/workbench/app/views/users/_virtual_machines.html.erb index 38458593fa..e2ce5b39bc 100644 --- a/apps/workbench/app/views/users/_virtual_machines.html.erb +++ b/apps/workbench/app/views/users/_virtual_machines.html.erb @@ -85,7 +85,7 @@ SPDX-License-Identifier: AGPL-3.0 %> <% if @my_vm_logins[vm[:uuid]] %> <% @my_vm_logins[vm[:uuid]].each do |login| %> - ssh <%= login %>@<%= vm[:hostname] %> + ssh <%= login %>@<%= vm[:hostname] %><%=Rails.configuration.Workbench.SSHHelpHostSuffix%> <% end %> <% end %> diff --git a/lib/config/config.default.yml b/lib/config/config.default.yml index 41af150732..3750adcabc 100644 --- a/lib/config/config.default.yml +++ b/lib/config/config.default.yml @@ -1169,6 +1169,27 @@ Clusters: Accessing an Arvados VM with SSH (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: | + #

Add a section like this to your SSH configuration file ( ~/.ssh/config):

+ #
Host *.zzzzz
+      #  TCPKeepAlive yes
+      #  ServerAliveInterval 60
+      #  ProxyCommand ssh -p2222 turnout@switchyard.zzzzz.arvadosapi.com -x -a $SSH_PROXY_FLAGS %h
+      # 
+ + # 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 diff --git a/lib/config/export.go b/lib/config/export.go index 44c69b6e2e..88794140a2 100644 --- a/lib/config/export.go +++ b/lib/config/export.go @@ -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 { diff --git a/lib/config/generated_config.go b/lib/config/generated_config.go index 25fa89394a..6813bee408 100644 --- a/lib/config/generated_config.go +++ b/lib/config/generated_config.go @@ -1175,6 +1175,27 @@ Clusters: Accessing an Arvados VM with SSH (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: | + #

Add a section like this to your SSH configuration file ( ~/.ssh/config):

+ #
Host *.zzzzz
+      #  TCPKeepAlive yes
+      #  ServerAliveInterval 60
+      #  ProxyCommand ssh -p2222 turnout@switchyard.zzzzz.arvadosapi.com -x -a $SSH_PROXY_FLAGS %h
+      # 
+ + # 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 diff --git a/sdk/go/arvados/config.go b/sdk/go/arvados/config.go index 176f1dd2ae..a70980cbde 100644 --- a/sdk/go/arvados/config.go +++ b/sdk/go/arvados/config.go @@ -215,6 +215,7 @@ type Cluster struct { WelcomePageHTML string InactivePageHTML string SSHHelpPageHTML string + SSHHelpHostSuffix string } ForceLegacyAPI14 bool