Skip to content

Commit

Permalink
nginx send_timeout, ansible includes NBD setup
Browse files Browse the repository at this point in the history
  • Loading branch information
martindemko committed Jan 13, 2024
1 parent 02b1bbc commit 7f406a1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
33 changes: 30 additions & 3 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@
owner: postgres
group: "{{ galaxy_user_name }}"
mode: 0750
tags: test
- name: Create initial empty pg_dump file if needed # otherwise the following logrotate conf will not work
file:
path: "{{ postgresql_backup_dir }}/pg_dump/{{ postgresql_pg_dump_prefix }}.sql.gz"
state: touch
owner: postgres
group: "{{ galaxy_user_name }}"
mode: 0640
tags: test
- name: Set-up Galaxy DB backup using pg_dump and logrotate
ansible.builtin.blockinfile:
path: "/etc/logrotate.d/{{ postgresql_pg_dump_prefix }}"
Expand All @@ -47,7 +45,6 @@
echo "### Finished backup at `date` ###" >> /var/log/{{ postgresql_pg_dump_prefix }}_errors.log
endscript
}
tags: test
- hosts: galaxyservers
become: true
Expand Down Expand Up @@ -87,6 +84,36 @@
dest: python3_path.stdout[:-1]
state: link
when: python_path.stdout == ""
## pre tasks specific for galaxy-re
- name: Install NBD client
package:
name: ['nbd-client']
when: "'galaxy-re' in inventory_hostname or 'galaxy-re' in ansible_hostname"
- name: Setup NBD client
ansible.builtin.lineinfile:
path: /etc/nbdtab
#regexp: "^nbd0"
line: "nbd0 147.251.11.11 0f2aaea1-55a4-4c15-840d-8f60cefc3f1a conns=20,port=55810"
create: yes
insertafter: EOF
when: "'galaxy-re' in inventory_hostname or 'galaxy-re' in ansible_hostname"
# nemusi byt dostatocne, existuje totiz aj maskovana sluzba nbd-client.service (pozret: https://github.com/NetworkBlockDevice/nbd/issues/91)
- name: Restart NBD client
ansible.builtin.systemd:
name: nbd-client.service
# name: [email protected]
state: reloaded
when: "'galaxy-re' in inventory_hostname or 'galaxy-re' in ansible_hostname"
- name: Mount up NBD
ansible.posix.mount:
#line: "/dev/nbd0 /mnt xfs rw,_netdev 0 0"
src: /dev/nbd0
path: /mnt
fstype: xfs
opts: rw,_netdev
state: mounted
when: "'galaxy-re' in inventory_hostname or 'galaxy-re' in ansible_hostname"

post_tasks:
- name: Setup gxadmin cleanup task
ansible.builtin.cron:
Expand Down
6 changes: 5 additions & 1 deletion group_vars/galaxyservers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ galaxy_job_config:
tools:
- class: local # these special tools that aren't parameterized for remote execution - expression tools, upload, etc
environment: local
- id: cat1
environment: local
- id: __DATA_FETCH__
environment: local
- id: testing_html
environment: tpv_dispatcher

Expand Down Expand Up @@ -237,7 +241,7 @@ galaxy_config:
# File serving Performance
nginx_x_accel_redirect_base: /_x_accel_redirect
# Automation / Ease of Use / User-facing features
watch_job_rules: 'auto'
watch_job_rules: 'polling' # used to be auto
allow_path_paste: true
enable_quotas: true
allow_user_deletion: true
Expand Down
3 changes: 3 additions & 0 deletions templates/nginx/galaxy.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ server {
#allow 2001:718:ff05:209::102; # VM pulsar-re IPv6
#deny all;

# allows to send/receive big files to/from pulsar
client_max_body_size 30G;
# smaller timeout interrupted transimition of bigger files
send_timeout 600s;

# Our log files will go to journalctl
access_log syslog:server=unix:/dev/log;
Expand Down

0 comments on commit 7f406a1

Please sign in to comment.