Re: [galaxy-dev] Possible to pass hostName to a tool?

2015-05-01 Thread John Chilton
This is actually way trickier than one might assume at first glace.
Galaxy generally doesn't know how it is deployed (do workers need to
hit the proxy or talk to wsgi directly, etc...), if the URL users
access Galaxy via will work for worker nodes, even if worker nodes
have consistent access.

I would recommend using something like
$__app__.config.galaxy_infrastructure_url in your cheetah template and
then url join that with /api. This is what Pulsar and the IPython
plugin use for instance to figure out where to send and fetch files
to/from. If deployers don't set that parameter
galaxy_infrastructure_url - Galaxy will do some guessing based on
typical configurations.

See also:
https://github.com/galaxyproject/galaxy/blob/dev/config/galaxy.ini.sample#L474

To allow deployers to configure this on per job destination basis - I
would actually fallback to this with something like:
--galxay_host_url
\${GALAXY_HOST_URL:-$__app__.config.galaxy_infrastructure_url}

This allows deployers to define GALAXY_HOST_URL for a particular host
if they need to but will make some reasonable default guesses
otherwise (which they can do directly in job_conf.xml for instance).

-John

On Fri, May 1, 2015 at 2:54 PM, Ben Bimber bbim...@gmail.com wrote:
 Hello,

 I apologize for the second email as this is related to a question from two
 days ago.  I am writing a galaxy tool that runs code that will query the
 galaxy server.  Within the tool wrapper XML, is there a way to write the API
 URL of the current server?  I dont see anything along these lines
 documented.

 Thanks in advance for any help,
 Ben

 ___
 Please keep all replies on the list by using reply all
 in your mail client.  To manage your subscriptions to this
 and other Galaxy lists, please use the interface at:
   https://lists.galaxyproject.org/

 To search Galaxy mailing lists use the unified search at:
   http://galaxyproject.org/search/mailinglists/
___
Please keep all replies on the list by using reply all
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

[galaxy-dev] Possible to pass hostName to a tool?

2015-05-01 Thread Ben Bimber
Hello,

I apologize for the second email as this is related to a question from two
days ago.  I am writing a galaxy tool that runs code that will query the
galaxy server.  Within the tool wrapper XML, is there a way to write the
API URL of the current server?  I dont see anything along these lines
documented.

Thanks in advance for any help,
Ben
___
Please keep all replies on the list by using reply all
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/