Giter VIP home page Giter VIP logo

ansible-galaxy-systemd's Introduction

ansible-galaxy-systemd

Sets up Galaxy server processes responsible for:

  • servicing 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

Introduces Celery service files with watchdog integration. The watchmedo auto-restart command watches specified directories (galaxy/server, galaxy/config and galaxy/mutable-config).
File patterns default to *py,*.yml,*.yaml,*.xml
Enable by setting galaxy_systemd_watchdog: true

⚠️ Version 2.0.0

The Celery workers are now split into two unit-files:

  • external queue, usually used with threads, but could be probably also used with the pools gevent or evenlet (not tested). Since autoscale is not supported for thread pools, concurrency is used as before
  • internal queue, supports prefork, so it can autoscale
  • deafult concurrency was reduced, keep that in mind
  • max tasks per child were reduced to avoid jammed worker processes and tasks that are started but get never finished (for so far unknown reason)

Be aware that there are now new variable names for these two different nit files and also for the beat file, to keep everything separated.

The restart behavior also changed, to make sure that no old celery workers are running, so the celery workers are getting restarted on each deployment.

⚠️ You need to reassign jobs to the newly named handlers/workflow schedulers, for example with:

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

and with for loop for example like this (be careful with mutate, no warranties):

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, too. galaxy_systemd_workflow_scheduler_prefix By default the first part of ansible_hostname
  • Handlers have a galaxy_systemd_handler_prefix var now, which should be used to give them a unique key together with their process number. For example by using the hostname as prefix, like in the deafults. This makes an update of the job_conf necessary.
  • Gunicorn is now scalable: just define a number in galaxy_systemd_gunicorns and like the handlers, that many of them will spawn.
  • The Socket name should now be without the '.sock' prefix, as the sockets are automatically created for each Gunicorn process.
  • Be aware that you may have to rename the sockets in your NGINX config.

Role Variables

I don't feel like syncing the readme with my default file every time a variable gets added. Just go there.

Dependencies

Many variables from that role are set. It is assumed you will use that in your playbook as well.

Example Playbook

Basic

Install Galaxy on your local system with all 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 written and contributed to by the following people:

ansible-galaxy-systemd's People

Contributors

hexylena avatar mira-miracoli avatar gmauro avatar bgruening avatar natefoo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.