diff --git a/config/galaxy.yml.interactivetools b/config/galaxy.yml.interactivetools
index 48909a654c2..a63202ad6bd 100644
--- a/config/galaxy.yml.interactivetools
+++ b/config/galaxy.yml.interactivetools
@@ -1,54 +1,19 @@
-uwsgi:
-
- http: localhost:8080
-
- threads: 8
-
- http-raw-body: True
-
- offload-threads: 8
-
- master: true
-
- module: galaxy.webapps.galaxy.buildapp:uwsgi_app()
-
- interactivetools_map: database/interactivetools_map.sqlite
- python-raw: scripts/interactivetools/key_type_token_mapping.py
- route-host: ^([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)-([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\.([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\.(interactivetool\.localhost:8080)$ goto:itdomain
- route-run: goto:itdomainend
- route-label: itdomain
- route-host: ^([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)-([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\.([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\.(interactivetool\.localhost:8080)$ rpcvar:TARGET_HOST rtt_key_type_token_mapper_cached $1 $3 $2 $4 $0 5
- route-if-not: empty:${TARGET_HOST} httpdumb:${TARGET_HOST}
- route: .* break:404 Not Found
- route-label: itdomainend
- # Path-based is currently less functional and less tested than domain-based
- route: ^(/interactivetool/access/)([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)/([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)/([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)(()|(/.*)*)$ goto:itpath
- route-run: goto:itpathend
- route-label: itpath
- route: ^/interactivetool/access/([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)/([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)/([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)(()|/.*)$ rpcvar:TARGET_HOST rtt_key_type_token_mapper_cached $2 $1 $3 $4 $0 5
- route-if: empty:${TARGET_HOST} goto:itpathfail
- route: ^/interactivetool/access/([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)/([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)/([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)((()|/.*)*)$ rewrite:$4
- route-if: empty:${PATH_INFO} addvar:PATH_INFO=/
- route-run: seturi:${PATH_INFO}
- route-if-not: empty:${QUERY_STRING} seturi:${PATH_INFO}?${QUERY_STRING}
- route-if-not: empty:${TARGET_HOST} httpdumb:${TARGET_HOST}
- route-label: itpathfail
- route: .* break:404 Not Found
- route-label: itpathend
-
-
+gravity:
+ gx_it_proxy:
+ enable: true
+ proxy_port: 4002
galaxy:
interactivetools_enable: true
# outputs_to_working_directory will provide you with a better level of isolation. It is highly recommended to set
# this parameter with InteractiveTools.
outputs_to_working_directory: true
- interactivetools_prefix: interactivetool
interactivetools_map: database/interactivetools_map.sqlite
# If you develop InteractiveTools locally and do not have a full FQDN you can
- # use an arbritrary one, e.g. 'my-hostname' here, if you set this hostname in your
- # job_conf.xml as well (see the corresponding comment). If running mac OS X, do not match the
- # "http://host.docker.internal:8080" used at galaxy_infrastructure_url in the galaxy.yml file,
- # and use an arbitrary name here instead.
- # Please make sure that in the local development case you use https://localhost:8080 to access
- # your Galaxy. http://my-hostname:8080 will not work.
- # galaxy_infrastructure_url: http://my-hostname:8080
+ # use an arbritrary one, e.g. 'host.docker.internal' here, if you set this hostname in your
+ # job_conf.xml as well (see the corresponding comment).
+ # In the local development case you should use http://localhost:8080 to access
+ # your Galaxy, so saving notebooks doesn't fail due to invalid certificates.
+ galaxy_infrastructure_url: http://localhost:8080
+ # Do not set the following 2 options if you are using an upstream proxy server like nginx
+ interactivetools_upstream_proxy: false
+ interactivetools_proxy_host: localhost:4002
diff --git a/config/job_conf.xml.interactivetools b/config/job_conf.xml.interactivetools
index 5daf8f054e5..85eb38b1154 100644
--- a/config/job_conf.xml.interactivetools
+++ b/config/job_conf.xml.interactivetools
@@ -6,7 +6,6 @@
-
true
@@ -21,21 +20,16 @@
If you develop interactive tools on your 'localhost' and don't have a proper domain name
you need to tell all Docker containers a hostname where Galaxy is running.
This can be done via the add-host parameter during the `docker run` command.
- 'my-hostname' here is an arbritrary hostname that matches the IP address of your
- Galaxy host. Make sure this hostname ('my-hostname') is also set in your galaxy.yml file, e.g.
- `galaxy_infrastructure_url: http://my-hostname:8080`.
- Note: XML does not allow double hyphens in comments, hence the line below has them escaped as -
+ 'localhost' here is an arbritrary hostname that matches the IP address of your
+ Galaxy host. Make sure this hostname ('localhost') is also set in your galaxy.yml file, e.g.
+ `galaxy_infrastructure_url: http://localhost:8080`.
-->
-
-
+ --add-host localhost:host-gateway
-
docker_dispatch
docker_local
local
-
-
diff --git a/doc/source/admin/special_topics/interactivetools.rst b/doc/source/admin/special_topics/interactivetools.rst
index 3e1e70e93a4..013f19ba180 100644
--- a/doc/source/admin/special_topics/interactivetools.rst
+++ b/doc/source/admin/special_topics/interactivetools.rst
@@ -42,52 +42,74 @@ Some important benefits of using Galaxy InteractiveTools
Server-side configuration of Galaxy InteractiveTools
----------------------------------------------------
+For production deployments and additional considerations please see the `Galaxy Interactive Tools Tutorial `__.
+
The ``galaxy.yml`` file will need to be populated as seen in
``config/galaxy.yml.interactivetools``.
-Galaxy InteractiveTool routing relies on wildcard subdomain routes. For users
-who manage their own DNS, you can set the appropriate A records to redirect
-``*.interactivetool.yourdomain``, following format seen below.
+Galaxy InteractiveTool routing relies on wildcard subdomain routes and a proxy server that forwards requests to a running container.
+For users who manage their own DNS, you can set the appropriate A records to redirect
+``*.interactivetool.yourdomain``.
-It's not recommended for production, but for a quick local deployment
-``localhost.blankenberglab.org`` is a domain record provided by Dan Blankenberg
-(a Galaxy contributor and the architect of ITs) configured with the appropriate
-wildcard redirect to 127.0.0.1, which you can use that in place of
-```` to resolve to your local machine.
+`gravity` will automatically start the needed proxy server.
-In the ``uwsgi:`` section:
+The following configuration is only recommended for local testing, as users will directly connect to the InteractiveTool Proxy.
+In a production setup an upstream proxy should route requests to the proxy via the ``*.interactivetool.yourdomain`` subdomain.
+
+Set these values in `galaxy.yml`:
.. code-block:: yaml
- http-raw-body: true
- # master: true
-
- interactivetools_map: database/interactivetools_map.sqlite
- python-raw: scripts/interactivetools/key_type_token_mapping.py
- route-host: ^([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)-([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\.([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\.(interactivetool\.:8080)$ goto:interactivetool
- route-run: goto:endendend
- route-label: interactivetool
- route-host: ^([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)-([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\.([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\.(interactivetool\.:8080)$ rpcvar:TARGET_HOST rtt_key_type_token_mapper_cached $1 $3 $2 $4 $0 5
- route-if-not: empty:${TARGET_HOST} httpdumb:${TARGET_HOST}
- route: .* break:404 Not Found
- route-label: endendend
+ gravity:
+ # ...
+ gx_it_proxy:
+ enable: true
+ proxy_port: 4002
+ galaxy:
+ # ...
+ interactivetools_enable: true
+ interactivetools_map: database/interactivetools_map.sqlite
+ galaxy_infrastructure_url: http://localhost:8080
+ # Do not set the following 2 options if you are using an upstream proxy server like nginx
+ interactivetools_upstream_proxy: false
+ interactivetools_proxy_host: localhost:4002
+ # ...
-In the ``galaxy:`` section:
+If you do want to use nginx as an upstream proxy server you can use the following server section to route requests to the InteractiveTool proxy:
-.. code-block:: yaml
+.. code-block:: nginx
- interactivetools_enable: true
- interactivetools_map: database/interactivetools_map.sqlite
- galaxy_infrastructure_url: http://.org:8080
+ server {
+ # Listen on port 443
+ listen *:443 ssl;
+ # Match all requests for the interactive tools subdomain
+ server_name *.interactivetool.localhost;
+
+ # Proxy all requests to the GIE Proxy application
+ location / {
+ proxy_redirect off;
+ proxy_http_version 1.1;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+ proxy_pass http://localhost:4002;
+ }
+ }
-The admin should modify the ``route-host`` and ``interactivetools_prefix`` to match their preferred configuration.
+Note that this nginx example uses https, so you need to have a wildcard certificate for your domain,
+and you need to adjust ``galaxy_infrastructure_url`` as appropriate. You will most likely also want
+to replace localhost with your server domain.
+You will also need to enable a docker destination in the job_conf.xml file.
An example ``job_conf.xml`` file as seen in ``config/job_conf.xml.interactivetools``:
.. code-block:: xml
+
+
@@ -96,11 +118,23 @@ An example ``job_conf.xml`` file as seen in ``config/job_conf.xml.interactivetoo
true
+
$galaxy_root:ro,$tool_directory:ro,$job_directory:rw,$working_directory:rw,$default_file_path:ro
false
bridge
true
true
+ true
+
+
+ --add-host localhost:host-gateway
docker_dispatch
@@ -108,10 +142,11 @@ An example ``job_conf.xml`` file as seen in ``config/job_conf.xml.interactivetoo
local
-
+
-Alternatively to the local job runner, InteractiveTools have been enabled for the condor job runner, e.g.:
+InteractiveTools have been enabled for the Condor, Slurm, Pulsar and Kuberneters job runner.
+A destination configuration for Condor may look like this:
.. code-block:: xml