Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add InteractiveTools. #7494

Merged
merged 153 commits into from Aug 22, 2019
Merged

Add InteractiveTools. #7494

merged 153 commits into from Aug 22, 2019

Conversation

blankenberg
Copy link
Member

Basic idea: launch a container-backed Galaxy Tool and get access to content inside in real time.

  • Give user access via uwsgi (inspired by [wip] Dynamic proxy using uWSGI.  #2385), or another proxy.
  • Access is based upon a key, key_type, token mapping to a host, port. You can have and access any number of RealTimeTools at a time.
  • Port and entry url-path snippet are specified in standard tool.xml files.
  • You can specify any number of ports, so a single RealTimeTool can give access to multiple running applications.
  • RealTimeTools can be added to and installed from the ToolShed.
  • Currently working for docker in local runner.

Co-Authored-By: blankenberg <dan.blankenberg@gmail.com>
@galaxybot galaxybot added this to the 19.05 milestone Mar 8, 2019
@blankenberg blankenberg changed the title Add RealTimeTools. [WIP] Add RealTimeTools. Mar 9, 2019
@jxtx jxtx assigned jxtx and unassigned jxtx Mar 11, 2019
@jxtx jxtx self-requested a review March 11, 2019 15:45
#end if
</environment_variable>
<environment_variable name="REMOTE_HOST">TODO</environment_variable>
<environment_variable name="HISTORY_ID" strip="True">${__app__.security.encode_id($jupyter_notebook.history_id)}</environment_variable>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really need a way to inject this and something comparable to galaxy_infrastructure_url without __app__. Willing to implement higher-level primitives for encoded history ID and inject galaxy_infrastructure_url with a per-job destination override option (81b5ca5). Or at least a warning in every sample that uses __app__ that we will break backward compatibility in the near future

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added warning in 7250162 and 34ec3bf

@blankenberg
Copy link
Member Author

Can you add requires_domain (defaulting to False) or something like that to the tools (entry_point) to keep a path-base proxy approach (instead of sub-domain based proxy) a potential default requirement for the future?

Added in 41d7155

@jmchilton
Copy link
Member

jmchilton commented Aug 21, 2019

We should use false not False in XML probably (https://www.w3schools.com/xml/schema_dtypes_misc.asp), but yeah - looks great, thanks for adding requires_domain!

This and the warnings and them being off by default really assuage a lot of my fears. I think I'm very close to being +1 on this for 19.09. I really am sorry for saying I would merge it sooner when I wasn't ready to and didn't have the time I thought I did to put into it.

Update: Trying to figure out the tests - are they transient problems?

Update 2: Last laugh is yours though because you cause me physical pain when you demo these being used in workflows or tell people to put them on the ToolShed. If I could somehow make my +1 contingent on you not doing those two things - I would - but I don't think that would be feasible. Despite that though - really fantastic work - I think many people are really excited for these.

@jmchilton jmchilton merged commit 8b2eaba into galaxyproject:dev Aug 22, 2019
@bgruening
Copy link
Member

Thanks John for merging.

@lizhi16
Copy link

lizhi16 commented Aug 29, 2019

The Interactive Tool is an amazing function. Our team is very interested in it. But we don't find any tutorial about how to deploy the InteractiveTools or how to use it. Could you please provide some advice for us to instruct how to use it. Thanks!

@bgruening
Copy link
Member

@lizhi16 we added some initial docs here: https://github.com/blankenberg/galaxy/blob/aea9ed2a219f35ac8b94d11b51ca52ec73cdcb48/doc/source/admin/special_topics/realtimetools.rst

Let us know if this does not help.

nsoranzo added a commit to nsoranzo/galaxy that referenced this pull request Dec 19, 2019
In galaxyproject#7494 and
galaxyproject#8574 , the abstract
`parse_interactivetool()` method was added to the `ToolSource` class
without a corresponding implementation in its `CwlToolSource` subclass,
leading to the following error:

```
In [4]: from galaxy.tool_util.parser.cwl import CwlToolSource
In [5]: cts = CwlToolSource('path')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-6-2f94370fb293> in <module>()
----> 1 cts = CwlToolSource('path')

TypeError: Can't instantiate abstract class CwlToolSource with abstract methods parse_interactivetool
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet