Skip to content

Commit 931e1af

Browse files
authored
Merge branch 'main' into feature/anonymous-users
2 parents e6c628c + 5c0fc79 commit 931e1af

17 files changed

Lines changed: 167 additions & 34 deletions

File tree

ansible/all.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
- galaxyproject.gxadmin
3131
- usegalaxy_ca.backup_pg
3232

33+
- name: tusd
34+
import_playbook: tusd.yml
35+
3336
- name: galaxy
3437
import_playbook: galaxy.yml
3538

ansible/files/galaxy/config/tpv_rules_local.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,32 @@ tools:
7171
toolshed.g2.bx.psu.edu/repos/devteam/fastqc/fastqc/.*:
7272
cores: min(max(int(input_size * 4), 1), 16)
7373
mem: min(max(int(input_size * 7), 5.6), 120)
74+
toolshed.g2.bx.psu.edu/repos/bgruening/sylph_profile/sylph_profile/.*:
75+
cores: 4
76+
mem: 16
77+
toolshed.g2.bx.psu.edu/repos/iuc/bwa_mem2/bwa_mem2/.*:
78+
cores: 32
79+
mem: 240
80+
rules:
81+
- id: bwa_mem2_small_input_rule
82+
if: input_size < 0.1
83+
cores: 2
84+
mem: 5.6
85+
- id: bwa_mem2_medium_input_rule
86+
if: 0.1 <= input_size < 1
87+
cores: 4
88+
mem: 14
89+
- id: bwa_mem2_large_input_rule
90+
if: 1 <= input_size < 20
91+
cores: 8
92+
mem: 28
93+
- id: bwa_mem2_pretty_large_input_rule
94+
if: 20 <= input_size < 100
95+
cores: 16
96+
mem: 120
97+
toolshed.g2.bx.psu.edu/repos/iuc/seqkit_sort/seqkit_sort/.*:
98+
cores: 1
99+
mem: 7
74100

75101
roles:
76102
training.*:
@@ -87,7 +113,7 @@ destinations:
87113
- name: SINGULARITYENV__JAVA_OPTIONS
88114
value: $_JAVA_OPTIONS
89115
- execute: ulimit -f 1048576000 # 500GB, our default quota
90-
- execute: ulimit -u 10000
116+
- execute: ulimit -u 4096
91117

92118
slurm-training:
93119
runner: slurm
@@ -97,7 +123,7 @@ destinations:
97123
params:
98124
native_specification: --nodes=1 --ntasks=1 --cpus-per-task={cores} --mem={round(mem*1024)} --time=48:00:00 --partition=training
99125
singularity_enabled: true
100-
singularity_volumes: "$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$job_directory:rw,/mnt/nfs/data/datasets:ro,/mnt/nfs1/data/datasets:ro,/mnt/nfs2/data/datasets:ro,/cvmfs/data.galaxyproject.org:ro"
126+
singularity_volumes: "$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$job_directory:rw,/mnt/nfs/data/datasets:ro,/mnt/nfs1/data/datasets:ro,/mnt/nfs2/data/datasets:ro,/cvmfs/data.galaxyproject.org:ro,/mnt/nfs/galaxy/var/tool_data:ro"
101127
tmp_dir: true
102128
env:
103129
LC_ALL: C
@@ -117,7 +143,7 @@ destinations:
117143
params:
118144
native_specification: --nodes=1 --ntasks=1 --cpus-per-task={cores} --mem={round(mem*1024)} --time=168:00:00 --partition=main #set to main for autumn season
119145
singularity_enabled: true
120-
singularity_volumes: "$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$job_directory:rw,/mnt/nfs/data/datasets:ro,/mnt/nfs1/data/datasets:ro,/mnt/nfs2/data/datasets:ro,/cvmfs/data.galaxyproject.org:ro"
146+
singularity_volumes: "$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$job_directory:rw,/mnt/nfs/data/datasets:ro,/mnt/nfs1/data/datasets:ro,/mnt/nfs2/data/datasets:ro,/cvmfs/data.galaxyproject.org:ro,/mnt/nfs/galaxy/var/tool_data:ro"
121147
tmp_dir: true
122148
env:
123149
# Ensuring a consistent collation environment is good for reproducibility.

ansible/galaxy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
tags:
2424
- always
2525
roles:
26-
- galaxyproject.tusd
2726
- role: galaxyproject.galaxy
2827
tags:
2928
- never
@@ -49,6 +48,8 @@
4948
- role: usegalaxy_ca.pgcleanup
5049
become: true
5150
become_user: "{{ galaxy_user_name }}"
51+
tags:
52+
- cleanup
5253

5354
post_tasks:
5455
- name: fetch edugain idps the first time

ansible/group_vars/galaxyservers.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ galaxy_job_config:
4848
value: -1
4949
# Limit on the number of jobs a user with a registered Galaxy account can have active across all environments.
5050
- type: registered_user_concurrent_jobs
51-
value: 6
51+
value: 10
5252
# Limit total jobs running on the galaxy server (upload, etc)
5353
- type: environment_total_concurrent_jobs
5454
id: local_env
55-
value: 10
55+
value: 30
5656
# Limit total jobs running on the computes
5757
- type: environment_total_concurrent_jobs
5858
id: tpv_dispatcher
@@ -196,18 +196,18 @@ galaxy_config:
196196
galaxy_user: "{{ galaxy_user_name }}"
197197
virtualenv: "{{ galaxy_venv_dir }}"
198198
gunicorn:
199-
# listening options
200-
# bind: "unix:{{ galaxy_mutable_config_dir }}/gunicorn.sock"
201-
bind: "unix:{{ galaxy_root }}/gunicorn.sock"
202-
# performance options
203-
workers: 2
204-
# Other options that will be passed to gunicorn
205-
# This permits setting of 'secure' headers like REMOTE_USER (and friends)
206-
# https://docs.gunicorn.org/en/stable/settings.html#forwarded-allow-ips
207-
extra_args: '--forwarded-allow-ips="*"'
208-
# This lets Gunicorn start Galaxy completely before forking which is faster.
209-
# https://docs.gunicorn.org/en/stable/settings.html#preload-app
210-
preload: true
199+
- bind: "unix:{{ galaxy_root }}/gunicorn0.sock"
200+
workers: 2
201+
timeout: 600
202+
restart_timeout: 7200
203+
extra_args: '--forwarded-allow-ips="*"'
204+
preload: true
205+
- bind: "unix:{{ galaxy_root }}/gunicorn1.sock"
206+
workers: 2
207+
timeout: 600
208+
restart_timeout: 7200
209+
extra_args: '--forwarded-allow-ips="*"'
210+
preload: true
211211
celery:
212212
concurrency: 2
213213
loglevel: DEBUG
@@ -312,9 +312,10 @@ nginx_conf_ssl_certificate_key: /etc/ssl/user/privkey-www-data.pem
312312

313313
# TUS
314314
tusd_version: v1.13.0
315-
galaxy_tusd_host: localhost
315+
galaxy_tusd_host: "{{ groups['tusdservers'][0] }}"
316316
galaxy_tusd_port: 1080
317317
galaxy_tus_upload_store: /mnt/nfs/data/tus
318+
tusd_base_path: /api/upload/resumable_upload # Setting the tusd base path as the Galaxy upload location prevents tusd from returning the wrong upload URL.
318319

319320
#NFS
320321
nfs_host: "{{ groups['nfsservers'][0] }}"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
journal_rotate: "4"
3+
journal_size: 10G
4+
journal_size_staging: 2G
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
- name: Set lower log size limit on staging
3+
ansible.builtin.set_fact:
4+
journal_size: "{{ journal_size_staging }}"
5+
when: inventory_hostname is match('staging-')
6+
7+
- name: Create journald directory
8+
ansible.builtin.file:
9+
path: /etc/systemd/journald.conf.d
10+
state: directory
11+
12+
- name: Copy logrotate config
13+
ansible.builtin.template:
14+
src: rsyslog.j2
15+
dest: /etc/logrotate.d/rsyslog
16+
17+
- name: Copy journald config
18+
ansible.builtin.template:
19+
src: 00-journal-size.conf.j2
20+
dest: /etc/systemd/journald.conf.d/00-journal-size.conf.j2
21+
22+
- name: Restart logrotate and journald
23+
ansible.builtin.service:
24+
name: "{{ item }}"
25+
state: restarted
26+
loop:
27+
- logrotate.service
28+
- systemd-journald.service
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[Journal]
2+
SystemMaxUse={{ journal_size }}
3+
Compress=yes
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/var/log/syslog
2+
/var/log/mail.info
3+
/var/log/mail.warn
4+
/var/log/mail.err
5+
/var/log/mail.log
6+
/var/log/daemon.log
7+
/var/log/kern.log
8+
/var/log/auth.log
9+
/var/log/user.log
10+
/var/log/lpr.log
11+
/var/log/cron.log
12+
/var/log/debug
13+
/var/log/messages
14+
{
15+
rotate {{ journal_rotate }}
16+
weekly
17+
size {{ journal_size }}
18+
missingok
19+
notifempty
20+
compress
21+
delaycompress
22+
sharedscripts
23+
postrotate
24+
/usr/lib/rsyslog/rsyslog-rotate
25+
endscript
26+
}

ansible/roles/usegalaxy_ca.pgcleanup/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# This cron job runs every Monday at 06:00
2-
# It cleans up datasets that have been deleted for more than 14 days
2+
# It cleans up datasets that have been deleted for more than 7 days
33
galaxy_pgcleanup_cron_weekday: "1"
44
galaxy_pgcleanup_cron_hour: "06"
55
galaxy_pgcleanup_cron_min: "0"
6-
galaxy_pgcleanup_days: 30
6+
galaxy_pgcleanup_days: 7
77
# order of action is important!
88
galaxy_pgcleanup_actions:
99
- delete_userless_histories

ansible/roles/usegalaxy_ca.pgcleanup/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
job: >
99
source {{ galaxy_venv_dir }}/bin/activate;
1010
cd {{ galaxy_server_dir }};
11-
{{ galaxy_venv_dir }}/bin/python ./scripts/cleanup_datasets/pgcleanup.py -w 128MB --config-file {{ galaxy_config_file }} --log-dir {{ galaxy_log_dir }} --older-than {{ galaxy_pgcleanup_days }} {{ galaxy_pgcleanup_actions | join(' ') }} 2>&1 | tee -a {{ galaxy_log_dir }}/cleanup_datasets.log;
11+
{{ galaxy_venv_dir }}/bin/python ./scripts/cleanup_datasets/pgcleanup.py --no-update-time -w 128MB --config-file {{ galaxy_config_file }} --log-dir {{ galaxy_log_dir }} --older-than {{ galaxy_pgcleanup_days }} {{ galaxy_pgcleanup_actions | join(' ') }} 2>&1 | tee -a {{ galaxy_log_dir }}/cleanup_datasets.log;

0 commit comments

Comments
 (0)