usegalaxy_eu.galaxy_systemd

ansible-galaxy-systemd

Sets up Galaxy server processes that handle:

  • web requests for the UI/API
  • setting up, starting, monitoring, and submitting jobs to a cluster (if configured)

Requirements

  • systemd
  • watchdog, pyYAML (when watchdog is enabled)

Major Changes

Version 2.1.0

  • Adds Celery service files with watchdog integration.
  • The command watchmedo auto-restart monitors specific folders (galaxy/server, galaxy/config, and galaxy/mutable-config).
  • Default file types to monitor are *py, *.yml, *.yaml, *.xml.
  • To enable, set galaxy_systemd_watchdog: true.

:warning: Version 2.0.0

  • Celery workers are now in two separate unit-files:
    • The external queue typically used with threads but may also work with gevent or evenlet (untested). It still uses concurrency since autoscale isn’t available for thread pools.
    • The internal queue supports prefork, allowing autoscale.
  • Default concurrency has been reduced, and max tasks per worker are lowered to prevent jams.
  • New variable names are introduced for these separate files to keep things organized.
  • Restart behavior has changed to ensure no old Celery workers run; they will restart on each deployment.

:warning: You need to reassign jobs to the new handlers/workflow schedulers, like this:

mutate reassign-job-to-handler <job_id> <handler_id> [--commit]

You can use a loop, but be cautious with mutate (no guarantees):

for job in $(gxadmin query queue-details | awk '/handler_key_0/ {print $3}'); do gxadmin mutate reassign-job-to-handler $job handler_sn06_0 --commit; done
  • Workflow Schedulers now have a scalable prefix: galaxy_systemd_workflow_scheduler_prefix, which defaults to the first part of ansible_hostname.
  • Handlers now have a galaxy_systemd_handler_prefix variable for unique identification with their process number, using the hostname as a prefix. This requires an update of the job_conf.
  • Gunicorn becomes scalable; just specify a number in galaxy_systemd_gunicorns, and that many instances will be created.
  • The socket name now should not have the '.sock' prefix, as sockets are created automatically for each Gunicorn process.
  • You might need to rename the sockets in your NGINX configuration.

Role Variables

I prefer not to update the README every time a new variable is added. Just check the defaults.

Dependencies

Many variables from that role are set and are expected to be used in your playbook as well.

Example Playbook

Basic

Install Galaxy on your local machine with the default options:

- hosts: localhost
  vars:
    galaxy_server_dir: /srv/galaxy
  connection: local
  roles:
    - galaxyproject.galaxy
    - usegalaxy-eu.galaxy-systemd

License

GPLv3

Author Information

This role was created and contributed by the following individuals:

Informazioni sul progetto

Manage a Galaxy server with systemd.

Installa
ansible-galaxy install usegalaxy_eu.galaxy_systemd
Licenza
gpl-3.0
Download
10.9k
Proprietario