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.
None
galaxy_toolshed_server_dir
: Filesystem path where the Tool Shed (Galaxy) server code is installed.
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 asgalaxy_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 (withsrc
anddest
keys) of files to copy from the control machine.galaxy_toolshed_config_templates
: List of hashes (withsrc
anddest
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, oryaml
for the YAML format supported by uWSGI.galaxy_toolshed_app_config_section
(default: depends ongalaxy_config_style
): The config file section under which the Galaxy config should be placed (and the key ingalaxy_config
in which the Galaxy config can be found. Ifgalaxy_config_style
isini-paste
the default isapp:main
. Ifgalaxy_config_style
isyaml
, the default istool_shed
.galaxy_toolshed_uwsgi_yaml_parser
(default:internal
): Controls whether theuwsgi
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 tolibyaml
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.
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 togalaxy_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.
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