galaxyproject / ansible-galaxy

An Ansible role for managing a Galaxy server
https://galaxy.ansible.com/galaxyproject/galaxy
58 stars 74 forks source link

shed_tool_conf.xml default tool_path #72

Open lecorguille opened 5 years ago

lecorguille commented 5 years ago

Hi,

Be ready because the froggies :fr: are intensively using the ansible galaxyproject role to eventually launch the usegalaxy.fr or something like that :)

The default shed_tool_conf.xml

<?xml version="1.0"?>
<toolbox tool_path="database/shed_tools">
</toolbox>

In the admin UI panel, I get this message:

Error cloning repository: Command '['hg', 'clone', '-r', u'11', u'https://toolshed.g2.bx.psu.edu/repos/lecorguille/msnbase_readmsdata', u'/shared/mfs/data/dev/galaxy/server/database/shed_tools/toolshed.g2.bx.psu.edu/repos/lecorguille/msnbase_readmsdata/86a20118e743/msnbase_readmsdata']' returned non-zero exit status 255 Output was: abort: Permission denied: '/shared/mfs/data/dev/galaxy/server/database/shed_tools'

It's logical since the galaxy user don't have the right to modify anything in the {{ galaxy_server_dir }}

Here is our config:

---

# galaxy
galaxy_server_dir: "{{ galaxy_root }}/server"
galaxy_venv_dir: "{{ galaxy_root }}/.venv"
galaxy_config_dir: "{{ galaxy_root }}/config"
galaxy_mutable_config_dir: "{{ galaxy_root }}/mutable-config"
galaxy_mutable_data_dir: "{{ galaxy_root }}/mutable-data"
galaxy_log_dir: "{{ galaxy_root }}/var/log/"
galaxy_shed_tools_dir: "{{ galaxy_root }}/shed_tools"
galaxy_config_style: yaml
galaxy_layout: root-dir
galaxy_separate_privileges: yes
galaxy_manage_paths: yes
galaxy_user: galaxy
galaxy_privsep_user: root
galaxy_group: galaxy
galaxy_manage_clone: yes

# supervisord
supervisor_socket_user: galaxy
supervisor_socket_chown: galaxy
supervisor_programs:
  - name: galaxy
    state: present
    command: uwsgi --yaml '{{ galaxy_config_dir }}/galaxy.yml' --logto2 '{{ galaxy_root }}/var/log/uwsgi.log'
    configuration: |
      autostart=true
      autorestart=false
      startretries=1
      startsecs=10
      user=galaxy
      umask=022
      directory={{ galaxy_server_dir }}
      environment=HOME={{ galaxy_root }},VIRTUAL_ENV={{ galaxy_venv_dir }},PATH={{ galaxy_venv_dir }}/bin:%(ENV_PATH)s,DRMAA_LIBRARY_PATH={{ drmaa_library_path }}
galaxy_restart_handler_name: Restart Galaxy

Is there any var to set this <toolbox tool_path="database/shed_tools"> or do we miss something to set the root dir of Galaxy?

In the meanwhile, I guess, I will play with the module replace.

eslerm commented 5 years ago

The local_tool_conf.xml.j2 template can use the galaxy_local_tools_dir variable to do that.

That template is called by the static_setup.yml task, but only if galaxy_local_tools is also defined.