[arvados] created: 2.6.0-376-g61cef3a84
git repository hosting
git at public.arvados.org
Tue Jul 18 18:57:57 UTC 2023
at 61cef3a8480fc9cda6198548290fcdcef2278315 (commit)
commit 61cef3a8480fc9cda6198548290fcdcef2278315
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Tue Jul 18 14:57:39 2023 -0400
20688: Add wb1 to wb2 redirects to arvbox
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/tools/arvbox/lib/arvbox/docker/common.sh b/tools/arvbox/lib/arvbox/docker/common.sh
index d900f0377..822def937 100644
--- a/tools/arvbox/lib/arvbox/docker/common.sh
+++ b/tools/arvbox/lib/arvbox/docker/common.sh
@@ -35,9 +35,9 @@ server_cert_key=$ARVADOS_CONTAINER_PATH/server-cert-${localip}.key
declare -A services
services=(
- [workbench]=443
+ [workbench]=3001
[workbench2]=3000
- [workbench2-ssl]=3001
+ [workbench2-ssl]=443
[api]=8004
[controller]=8003
[controller-ssl]=8000
diff --git a/tools/arvbox/lib/arvbox/docker/service/nginx/run b/tools/arvbox/lib/arvbox/docker/service/nginx/run
index 991927be7..272a6040c 100755
--- a/tools/arvbox/lib/arvbox/docker/service/nginx/run
+++ b/tools/arvbox/lib/arvbox/docker/service/nginx/run
@@ -111,6 +111,63 @@ http {
server_name workbench2;
ssl_certificate "${server_cert}";
ssl_certificate_key "${server_cert_key}";
+
+ # REDIRECTS FROM WORKBENCH 1 TO WORKBENCH 2
+
+ # Paths that are not redirected because wb1 and wb2 have similar enough paths
+ # that a redirect is pointless and would create a redirect loop.
+ # rewrite ^/api_client_authorizations.* /api_client_authorizations redirect;
+ # rewrite ^/repositories.* /repositories redirect;
+ # rewrite ^/links.* /links redirect;
+ # rewrite ^/projects.* /projects redirect;
+ # rewrite ^/trash /trash redirect;
+
+ # Redirects that don't have a good mapping and
+ # just go to root.
+ rewrite ^/themes.* / redirect;
+ rewrite ^/keep_disks.* / redirect;
+ rewrite ^/user_agreements.* / redirect;
+ rewrite ^/nodes.* / redirect;
+ rewrite ^/humans.* / redirect;
+ rewrite ^/traits.* / redirect;
+ rewrite ^/sessions.* / redirect;
+ rewrite ^/logout.* / redirect;
+ rewrite ^/logged_out.* / redirect;
+ rewrite ^/current_token / redirect;
+ rewrite ^/logs.* / redirect;
+ rewrite ^/factory_jobs.* / redirect;
+ rewrite ^/uploaded_datasets.* / redirect;
+ rewrite ^/specimens.* / redirect;
+ rewrite ^/pipeline_templates.* / redirect;
+ rewrite ^/pipeline_instances.* / redirect;
+
+ # Redirects that go to a roughly equivalent page
+ rewrite ^/virtual_machines.* /virtual-machines-admin redirect;
+ rewrite ^/users/.*/virtual_machines /virtual-machines-user redirect;
+ rewrite ^/authorized_keys.* /ssh-keys-admin redirect;
+ rewrite ^/users/.*/ssh_keys /ssh-keys-user redirect;
+ rewrite ^/containers.* /all_processes redirect;
+ rewrite ^/container_requests /all_processes redirect;
+ rewrite ^/job.* /all_processes redirect;
+ rewrite ^/users/link_account /link_account redirect;
+ rewrite ^/search.* /search-results redirect;
+ rewrite ^/keep_services.* /keep-services redirect;
+ rewrite ^/trash_items.* /trash redirect;
+
+ # Redirects that include a uuid
+ rewrite ^/work_units/(.*) /processes/$1 redirect;
+ rewrite ^/container_requests/(.*) /processes/$1 redirect;
+ rewrite ^/users/(.*) /user/$1 redirect;
+ rewrite ^/groups/(.*) /group/$1 redirect;
+
+ # Special file download redirects
+ if ($arg_disposition = attachment) {
+ rewrite ^/collections/([^/]*)/(.*) /?redirectToDownload=/c=$1/$2? redirect;
+ }
+ if ($arg_disposition = inline) {
+ rewrite ^/collections/([^/]*)/(.*) /?redirectToPreview=/c=$1/$2? redirect;
+ }
+
location / {
proxy_pass http://workbench2;
proxy_set_header Host \$http_host;
diff --git a/tools/arvbox/lib/arvbox/docker/service/ready/run-service b/tools/arvbox/lib/arvbox/docker/service/ready/run-service
index 1e9aae0c4..b19edaf25 100755
--- a/tools/arvbox/lib/arvbox/docker/service/ready/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/ready/run-service
@@ -89,7 +89,7 @@ fi
echo
echo "Your Arvados-in-a-box is ready!"
-echo "Workbench is hosted at https://$localip"
+echo "Workbench is hosted at https://$localip:${services[workbench]}"
echo "Workbench2 is hosted at https://$localip:${services[workbench2-ssl]}"
echo "Documentation is hosted at http://$localip:${services[doc]}"
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list