Skip to content

galaxyproject/ansible-galaxy-toolshed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Galaxy Tool Shed

An Ansible role for managing Galaxy Tool Shed servers. Despite the name confusion, Galaxy bears no relation to Ansible Galaxy.

This role is not for installing Galaxy servers. A separate role exists for that purpose.

Requirements

None

Role Variables

Required variables

  • galaxy_toolshed_server_dir: Filesystem path where the Tool Shed (Galaxy) server code is installed.

Optional variables

Two variables control which functions this role will perform (both default to yes):

  • galaxy_toolshed_manage_static_setup: Manage "static" Tool Shed configuration files - ones which are not modifiable by the Galaxy server itself. At a minimum, this is the primary Tool Shed configuration file, tool_shed.ini.
  • galaxy_toolshed_manage_database: Upgrade the database schema as necessary, when new schema versions become available.

You can control various things about where you get Galaxy from, what version you use, and where its configuration files will be placed:

  • galaxy_toolshed_venv_dir (default: <galaxy_toolshed_server_dir>/.venv): The role will use a python interpreter in this [virtualenv][virtualenv] to manage the database. galaxyproject.galaxy will create it for you and so setting this to the same as galaxy_venv_dir is a good idea.
  • galaxy_toolshed_config_dir (default: <galaxy_toolshed_server_dir>/config): Directory that will be used for "static" configuration files.
  • galaxy_toolshed_mutable_config_dir (default: <galaxy_toolshed_server_dir>/config): Directory that will be used for "mutable" configuration files, must be writable by the user running the Tool Shed.
  • galaxy_toolshed_mutable_data_dir (default: <galaxy_toolshed_server_dir>/database): Directory that will be used for "mutable" data and caches, must be writable by the user running Galaxy.
  • galaxy_toolshed_config_file (default: <galaxy_toolshed_config_dir>/tool_shed.ini): The Tool Shed's primary configuration file.
  • galaxy_toolshed_config: The contents of the Tool Shed configuration file (tool_shed.ini by default) are controlled by this variable. It is a hash of hashes (or dictionaries) that will be translated in to the configuration file. See the Example Playbooks below for usage.
  • galaxy_toolshed_config_files: List of hashes (with src and dest keys) of files to copy from the control machine.
  • galaxy_toolshed_config_templates: List of hashes (with src and dest keys) of templates to fill from the control machine.
  • galaxy_toolshed_config_style (default: ini-paste): The type of Galaxy configuration file to write, ini-paste for the traditional PasteDeploy-style INI file, or yaml for the YAML format supported by uWSGI.
  • galaxy_toolshed_app_config_section (default: depends on galaxy_config_style): The config file section under which the Galaxy config should be placed (and the key in galaxy_config in which the Galaxy config can be found. If galaxy_config_style is ini-paste the default is app:main. If galaxy_config_style is yaml, the default is tool_shed.
  • galaxy_toolshed_uwsgi_yaml_parser (default: internal): Controls whether the uwsgi section of the Tool Shed config file will be written in uWSGI-style YAML or real YAML. By default, uWSGI's internal YAML parser does not support real YAML. Set to libyaml to write real YAML, if you are using uWSGI that has been compiled with libyaml. For details on the YAML syntax suported by uWSGI, see the documentation in the galaxyproject.galaxy role.

Dependencies

This module does not directly depend on any others, but most likely you will want to use galaxyproject.galaxy to install the Galaxy (Tool Shed) code. It requires the variable:

  • galaxy_server_dir: Filesystem path where the Galaxy server code will be installed (cloned). Set this to galaxy_toolshed_server_dir.

For additional optional variables, see the galaxyproject.galaxy documentation. Most notably, you probably want to set galaxy_config_file to the path to tool_shed.ini to cause the galaxy role to fetch the correct eggs.

Example Playbook

Install the Tool Shed with code owned by a different user

- name: Tool Shed code and eggs, manage static configs
  hosts: toolshedservers
  remote_user: shedcode
  vars:
    galaxy_toolshed_server_dir: "/srv/toolshed/server"
    galaxy_toolshed_venv_dir: "/srv/toolshed/venv"
    galaxy_toolshed_config_dir: "/srv/toolshed/config"
    galaxy_toolshed_config_file: "{{ galaxy_toolshed_config_dir }}/tool_shed.ini"
    galaxy_toolshed_mutable_config_dir: "/srv/toolshed/var/config"
    galaxy_toolshed_mutable_data_dir: "/srv/toolshed/var/data"
    galaxy_server_dir: "{{ galaxy_toolshed_server_dir }}"
    galaxy_venv_dir: "{{ galaxy_toolshed_venv_dir }}"
    galaxy_config_file: "{{ galaxy_toolshed_config_file }}"
  roles:
    - role: galaxyproject.galaxy
      galaxy_manage_clone: yes
      galaxy_manage_static_setup: no
      galaxy_manage_mutable_setup: no
      galaxy_manage_database: no
      galaxy_fetch_eggs: no
    - role: galaxyproject.galaxy_toolshed
      galaxy_toolshed_manage_static_setup: yes
      galaxy_toolshed_manage_database: no
    - role: galaxyproject.galaxy
      galaxy_manage_clone: no
      galaxy_manage_static_setup: no
      galaxy_manage_mutable_setup: no
      galaxy_manage_database: no
      galaxy_fetch_eggs: yes

- name: Tool Shed database
  hosts: toolshedservers
  remote_user: shed
  vars:
    galaxy_toolshed_server_dir: "/srv/toolshed/server"
    galaxy_toolshed_venv_dir: "/srv/toolshed/venv"
    galaxy_toolshed_config_dir: "/srv/toolshed/config"
    galaxy_toolshed_config_file: "{{ galaxy_toolshed_config_dir }}/tool_shed.ini"
  roles:
    - role: galaxyproject.galaxy_toolshed
      galaxy_toolshed_manage_static_setup: no
      galaxy_toolshed_manage_database: yes

License

Academic Free License ("AFL") v. 3.0

Author Information

Nate Coraor

About

An Ansible role for managing a Galaxy (http://galaxyproject.org) Tool Shed server. For a role to install Galaxy itself, see https://github.com/galaxyproject/ansible-galaxy

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •