Skip to content

Commit

Permalink
Doc formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinugu committed Oct 6, 2023
1 parent e05a0a8 commit 2061048
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions doc/source/admin/special_topics/interactivetools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ Galaxy InteractiveTool routing by default relies on wildcard subdomain routes an
For users who manage their own DNS, you can set the appropriate A records to redirect
``*.interactivetool.yourdomain``.

`gravity` will automatically start the needed proxy server.
``gravity`` will automatically start the needed proxy server.

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,
or use path-based proxying for interactive tools that support it (``requires_domain=False``, see below for more details).

Set these values in `galaxy.yml`:
Set these values in ``galaxy.yml``:

.. code-block:: yaml
Expand Down Expand Up @@ -98,8 +98,8 @@ Set these values in `galaxy.yml`:
interactivetools_proxy_host: localhost:4002
The `gx-it-proxy` config relates to an important service in the InteractiveTool infrastructure: the InteractiveTool
proxy. `gx-it-proxy` runs as a separate process listening at port 4002 (by default). HTTP requests are decoded based on
The ``gx-it-proxy`` config relates to an important service in the InteractiveTool infrastructure: the InteractiveTool
proxy. ``gx-it-proxy`` runs as a separate process listening at port 4002 (by default). HTTP requests are decoded based on
the URL and headers, then somewhat massaged, and finally forwarded to the correct entry point port of the target InteractiveTool.

You will also need to enable a docker destination in the job_conf.xml file.
Expand Down Expand Up @@ -200,11 +200,11 @@ Path-based InteractiveTools
As will become clear in the NGINX tutorial below, the default configuration of InteractiveTools in a production setting gives rise
to some complications - in particular the need to set up a wildcard DNS entry and procuring a wildcard SSL certificate.
This is necessary to support unique URLs for InteractiveTool instances using only the domain part of the URL,
e.g. `https://24q1dbzrknq1v-1a1p13jnahscj.ep.interactivetool.myserver.net/`. Wildcard SSL certificates are less convenient
e.g. ``https://24q1dbzrknq1v-1a1p13jnahscj.ep.interactivetool.myserver.net``. Wildcard SSL certificates are less convenient
than regular certificates and are inherently less safe and thus prohibited at many institutions. Hence,
path-based interactive tools was implemented as an alternative way to configure InteractiveTools. Path-based URLs to
InteractiveTools look something like this: `https://myserver.net/interactivetool/ep/24q1dbzrknq1v/1a1p13jnahscj/`.
To enable path-based InteractiveTools, set `requires_domain="False"` in the relevant `entry_point` tag in the tool XML:
InteractiveTools look something like this: ``https://myserver.net/interactivetool/ep/24q1dbzrknq1v/1a1p13jnahscj``.
To enable path-based InteractiveTools, set ``requires_domain="False"`` in the relevant ``entry_point`` tag in the tool XML:

.. code-block:: xml
Expand All @@ -219,19 +219,19 @@ server within an InteractiveTool container now must serve the contents under a p

1) Relative links. If the web server embedded in the InteractiveTool only serves HTML pages with relative links then the
contents can be served at any level in the path hierarchy. The InteractiveTool proxy then strips away the "path prefix"
or "entry point path" part of the URL (e.g. `interactivetool/ep/24q1dbzrknq1v/1a1p13jnahscj/`) from forwarded HTTP requests
so that the InteractiveTool web server operates like if it was served at the top level (directly under `/`). Since all
or "entry point path" part of the URL (e.g. ``interactivetool/ep/24q1dbzrknq1v/1a1p13jnahscj``) from forwarded HTTP requests
so that the InteractiveTool web server operates like if it was served at the top level (directly under ``/``). Since all
links are relative, the web browser will automatically handle merging of the path prefix with the relative path appended
by the InteractiveTool.

This setup is the default setup provided by the tool XML example above, but to be more explicit one can also set
`requires_entry_point_path="False"` in the `entry_point` tag. As the web service operates with relative links it does
``requires_entry_point_path="False"`` in the ``entry_point`` tag. As the web service operates with relative links it does
not need to know the entry point path under which it is served.

2) Absolute links. Unfortunately many relevant services are implemented with absolute links, i.e. least starting
at the top-level `/`. For such InteractiveTools to work with path-based URLs the contained web server
at the top-level ``/``. For such InteractiveTools to work with path-based URLs the contained web server
needs to be configured with the path prefix/entry point path under which the content should be served. When
`requires_entry_point_path="True"` in the `entry_point` tag, the InteractiveTool proxy service forwards the HTTP requests
``requires_entry_point_path="True"`` in the ``entry_point`` tag, the InteractiveTool proxy service forwards the HTTP requests
with the full path intact. In addition, a mechanism for injecting the entry point path as an environment variable
is available:

Expand All @@ -248,10 +248,10 @@ server within an InteractiveTool container now must serve the contents under a p
</environment_variables>
Here, the entry point is attached a `label="mytool"` attribute. This label is then used by the `entry_point_path_for_label`
injection mechanism to identify the entry point whose path shall be injected into the environment variable, here `EP_PATH`.
Here, the entry point is attached a ``label="mytool"`` attribute. This label is then used by the ``entry_point_path_for_label``
injection mechanism to identify the entry point whose path shall be injected into the environment variable, here ``EP_PATH``.
This environment variable must then be mobilized in the InteractiveTool tool XML to properly configure the contained web server,
such as in the `command` tag of the JupyTool InteractiveTool:
such as in the ``command`` tag of the JupyTool InteractiveTool:

.. code-block:: xml
Expand All @@ -262,8 +262,8 @@ server within an InteractiveTool container now must serve the contents under a p
]]>
</command>
If we follow the same entry point path example as above, the `PROXY_PREFIX` variable will in this case be set to the value
`interactivetool/ep/24q1dbzrknq1v/1a1p13jnahscj/ipython`. This variable is further parsed by the Jupyter Notebook software
If we follow the same entry point path example as above, the ``PROXY_PREFIX`` variable will in this case be set to the value
``interactivetool/ep/24q1dbzrknq1v/1a1p13jnahscj/ipython``. This variable is further parsed by the Jupyter Notebook software
as a configuration of the path prefix under which the contents will be served.


Expand Down

0 comments on commit 2061048

Please sign in to comment.