-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #153 from galaxyproject/gravity
Support for running Galaxy from systemd using Gravity (galaxyctl)
- Loading branch information
Showing
18 changed files
with
222 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*.pyc | ||
__pycache__ | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,36 @@ | ||
--- | ||
# defaults file for galaxyproject.galaxy | ||
|
||
# TODO: Magical restarters depending on how you're running Galaxy. | ||
- name: default restart galaxy handler | ||
debug: | ||
msg: "RESTARTER NOT IMPLEMENTED - Please restart Galaxy manually. You can define your own handler and enable it with `galaxy_restart_handler_name`" | ||
|
||
- name: email administrator with commit id | ||
mail: | ||
from: "{{ galaxy_admin_email_from | default( 'root' ) }}" | ||
to: "{{ galaxy_admin_email_to }}" | ||
subject: "Galaxy instance {{ galaxy_instance_hostname | default( inventory_hostname ) }} is at commit {{ galaxy_commit_id }}" | ||
body: " " | ||
when: galaxy_admin_email_to is defined | ||
|
||
- name: daemon reload | ||
- name: systemd daemon reload | ||
systemd: | ||
daemon_reload: yes | ||
scope: "{{ galaxy_systemd_root | ternary(omit, 'user') }}" | ||
|
||
- name: galaxy mule start | ||
- name: galaxy systemd start | ||
systemd: | ||
name: galaxy.service | ||
state: started | ||
name: galaxy.service | ||
state: started | ||
scope: "{{ galaxy_systemd_root | ternary(omit, 'user') }}" | ||
when: "galaxy_systemd_mode == 'gravity'" | ||
listen: "start galaxy" | ||
|
||
- name: galaxy mule restart | ||
systemd: | ||
name: galaxy.service | ||
state: restarted | ||
name: galaxy.service | ||
state: restarted | ||
scope: "{{ galaxy_systemd_root | ternary(omit, 'user') }}" | ||
when: "galaxy_systemd_mode == 'mule'" | ||
listen: "restart galaxy" | ||
|
||
- name: galaxy gravity restart | ||
command: "{{ galaxy_venv_dir }}/bin/galaxyctl graceful" | ||
environment: | ||
GRAVITY_STATE_DIR: "{{ galaxy_gravity_state_dir }}" | ||
when: "galaxy_systemd_mode == 'gravity'" | ||
listen: "restart galaxy" | ||
|
||
- name: galaxyctl update | ||
command: "{{ galaxy_venv_dir }}/bin/galaxyctl update" | ||
environment: | ||
GRAVITY_STATE_DIR: "{{ galaxy_gravity_state_dir }}" | ||
when: "galaxy_systemd_mode == 'gravity'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
# Configure Gravity | ||
|
||
- name: Gravity setup | ||
block: | ||
|
||
- name: Register Galaxy config with Gravity | ||
command: "{{ galaxy_venv_dir }}/bin/galaxyctl register {{ galaxy_config_file }}" | ||
args: | ||
creates: "{{ galaxy_gravity_state_dir }}/configstate.yaml" | ||
|
||
- name: Update Gravity process management files | ||
command: "{{ galaxy_venv_dir }}/bin/galaxyctl update" | ||
args: | ||
creates: "{{ galaxy_gravity_state_dir }}/supervisor/supervisord.conf.d" | ||
|
||
environment: | ||
GRAVITY_STATE_DIR: "{{ galaxy_gravity_state_dir }}" | ||
remote_user: "{{ galaxy_remote_users.galaxy | default(__galaxy_remote_user) }}" | ||
become: "{{ true if galaxy_become_users.galaxy is defined else __galaxy_become }}" | ||
become_user: "{{ galaxy_become_users.galaxy | default(__galaxy_become_user) }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.