-
Notifications
You must be signed in to change notification settings - Fork 75
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 #185 from galaxyproject/gravity-systemd
Updates for systemd mode Gravity
- Loading branch information
Showing
4 changed files
with
28 additions
and
27 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,18 +1,14 @@ | ||
--- | ||
# handlers for gravity as used in galaxy version 23.0 | ||
|
||
- name: galaxy gravity restart | ||
command: "{{ galaxy_venv_dir }}/bin/galaxyctl -c {{ galaxy_config_file }} graceful" | ||
environment: | ||
GRAVITY_STATE_DIR: "{{ galaxy_gravity_state_dir }}" | ||
listen: "restart galaxy" | ||
become: yes | ||
become_user: "{{ __galaxy_user_name }}" | ||
|
||
- name: galaxyctl update | ||
command: "{{ galaxy_venv_dir }}/bin/galaxyctl -c {{ galaxy_config_file }} update" | ||
environment: | ||
GRAVITY_STATE_DIR: "{{ galaxy_gravity_state_dir }}" | ||
listen: "galaxyctl update" | ||
become: yes | ||
become_user: "{{ __galaxy_user_name }}" | ||
become_user: "{{ (__galaxy_gravity_pm == 'systemd' and galaxy_systemd_root) | ternary('root', __galaxy_user_name) }}" | ||
|
||
- name: galaxy gravity restart | ||
command: "{{ galaxy_venv_dir }}/bin/galaxyctl -c {{ galaxy_config_file }} graceful" | ||
listen: "restart galaxy" | ||
become: yes | ||
become_user: "{{ (__galaxy_gravity_pm == 'systemd' and galaxy_systemd_root) | ternary('root', __galaxy_user_name) }}" |
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,30 @@ | ||
--- | ||
# Configure Gravity | ||
|
||
- name: Gravity setup | ||
- name: Gravity setup (Gravity < 1) | ||
when: __galaxy_major_version is version('23.0', '<') | ||
block: | ||
|
||
- name: Register Galaxy config with Gravity | ||
- name: Register Galaxy config with Gravity (Gravity < 1) | ||
command: "{{ galaxy_venv_dir }}/bin/galaxyctl register {{ galaxy_config_file }}" | ||
args: | ||
creates: "{{ galaxy_gravity_state_dir }}/configstate.yaml" | ||
when: __galaxy_major_version is version('23.0', '<') | ||
|
||
- name: Update Gravity process management files | ||
command: "{{ galaxy_venv_dir }}/bin/galaxyctl update" | ||
args: | ||
creates: "{{ galaxy_gravity_state_dir }}/supervisor/supervisord.conf.d" | ||
when: __galaxy_major_version is version('23.0', '<') | ||
|
||
- name: Update Gravity process management files | ||
command: "{{ galaxy_venv_dir }}/bin/galaxyctl -c {{ galaxy_config_file }} update" | ||
args: | ||
creates: "{{ galaxy_gravity_state_dir }}/supervisor/supervisord.conf.d" | ||
when: __galaxy_major_version is version('23.0', '>=') | ||
|
||
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) }}" | ||
|
||
- name: Deploy galaxyctl wrapper script | ||
copy: | ||
content: | | ||
#!/usr/bin/env sh | ||
export GRAVITY_CONFIG_FILE={{ galaxy_config_file | quote }} | ||
exec {{ (galaxy_venv_dir ~ '/bin/galaxyctl') | quote }} "$@" | ||
dest: "{{ galaxy_gravity_wrapper_path }}" | ||
mode: "0755" | ||
when: galaxy_gravity_wrapper_path is not none | ||
remote_user: "{{ galaxy_remote_users.root | default(__galaxy_remote_user) }}" | ||
become: "{{ true if galaxy_become_users.root is defined else __galaxy_become }}" | ||
become_user: "{{ galaxy_become_users.root | default(__galaxy_become_user) }}" |