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 #132 from galaxyproject/systemd
Add systemd, github actions support
- Loading branch information
Showing
12 changed files
with
191 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Test the role | ||
|
||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#example-using-a-list-of-events | ||
on: [pull_request] | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install git python3 python3-virtualenv | ||
pip3 install 'ansible<2.10' | ||
printf '[defaults]\nroles_path = ../\ninterpreter_python = /usr/bin/python3' > ansible.cfg | ||
- name: Run Test | ||
run: | | ||
export ANSIBLE_STDOUT_CALLBACK=yaml | ||
ansible-playbook -i "localhost, " -c local tests/test_playbook.yml | ||
systemctl status galaxy || true | ||
journalctl -u galaxy | ||
sleep 10 | ||
systemctl status galaxy | ||
journalctl -u galaxy | ||
sleep 10 | ||
curl http://127.0.0.1:8080/api/version |
This file was deleted.
Oops, something went wrong.
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
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,24 @@ | ||
--- | ||
|
||
- name: Manage Paths | ||
block: | ||
|
||
- name: Deploy Galaxy Unit | ||
template: | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
src: systemd/galaxy.service.j2 | ||
dest: /etc/systemd/system/galaxy.service | ||
notify: | ||
- daemon reload | ||
- galaxy mule restart | ||
|
||
- name: Enable Galaxy Unit | ||
systemd: | ||
name: galaxy.service | ||
enabled: yes | ||
|
||
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) }}" |
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,23 @@ | ||
--- | ||
|
||
- name: Manage Paths | ||
block: | ||
|
||
- name: Deploy Galaxy Reports unit | ||
template: | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
src: systemd/galaxy-reports.service.j2 | ||
dest: /etc/systemd/system/galaxy-reports.service | ||
notify: daemon reload | ||
|
||
- name: Enable reports and ensure it is running | ||
systemd: | ||
name: galaxy-reports.service | ||
enabled: yes | ||
state: started | ||
|
||
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) }}" |
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,23 @@ | ||
[Unit] | ||
Description=Galaxy Reports | ||
After=network.target | ||
After=time-sync.target | ||
|
||
[Service] | ||
UMask=022 | ||
Type=simple | ||
User={{ __galaxy_user_name }} | ||
Group={{ __galaxy_user_group }} | ||
WorkingDirectory={{ galaxy_server_dir }} | ||
TimeoutStartSec=10 | ||
ExecStart={{ galaxy_venv_dir }}/bin/uwsgi {{ '--yaml' if galaxy_config_style in ('yaml', 'yml') else '--ini' }} {{ galaxy_reports_path }} --stats 127.0.0.1:4030 | ||
Environment=HOME={{ galaxy_root }} VIRTUAL_ENV={{ galaxy_venv_dir }} PATH={{ galaxy_venv_dir }}/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin DOCUTILSCONFIG= PYTHONPATH={{ galaxy_dynamic_job_rules_dir }} {{ galaxy_systemd.env }} | ||
MemoryLimit={{ galaxy_systemd.memory_limit.reports }}G | ||
Restart=always | ||
|
||
MemoryAccounting=yes | ||
CPUAccounting=yes | ||
BlockIOAccounting=yes | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,24 @@ | ||
[Unit] | ||
Description=Galaxy | ||
After=network.target | ||
After=time-sync.target | ||
|
||
[Service] | ||
UMask=022 | ||
Type=simple | ||
User={{ __galaxy_user_name }} | ||
Group={{ __galaxy_user_group }} | ||
WorkingDirectory={{ galaxy_server_dir }} | ||
TimeoutStartSec=10 | ||
ExecStart={{ galaxy_venv_dir }}/bin/uwsgi {{ '--yaml' if galaxy_config_style in ('yaml', 'yml') else '--ini' }} {{ galaxy_config_file }} {% if galaxy_systemd.stats %}--stats 127.0.0.1:{{ galaxy_systemd.stats }}{% endif %} | ||
|
||
Environment=HOME={{ galaxy_root }} VIRTUAL_ENV={{ galaxy_venv_dir }} PATH={{ galaxy_venv_dir }}/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin DOCUTILSCONFIG= PYTHONPATH={{ galaxy_dynamic_job_rules_dir }} {{ galaxy_systemd.env }} | ||
MemoryLimit={{ galaxy_systemd.memory_limit.mule }}G | ||
Restart=always | ||
|
||
MemoryAccounting=yes | ||
CPUAccounting=yes | ||
BlockIOAccounting=yes | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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