forked from usegalaxy-au/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev_playbook.yml
133 lines (132 loc) · 3.86 KB
/
dev_playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
- hosts: dev_galaxy_server
become: true
vars_files:
- group_vars/all.yml
- group_vars/dev.yml # machine_users overridden in this file
- group_vars/VAULT
- group_vars/galaxyservers.yml
- group_vars/dev_slurm.yml
- host_vars/dev.gvl.org.au.yml
- secret_group_vars/ssh_keys
- secret_group_vars/stats_server_vault
- secret_group_vars/dev_secrets
- secret_group_vars/sentry_vault
pre_tasks:
- name: Attach volume to instance
include_role:
name: attached-volumes
- name: Run common role first to create galaxy user
include_role:
name: common
- name: create dir for gravity configuration
file:
state: directory
path: /opt/galaxy
owner: root
group: galaxy
mode: 0775
- name: create dir for galaxy's singularity cache
file:
state: directory
path: "{{ item }}"
owner: galaxy
group: galaxy
mode: 0700
with_items:
- "{{ galaxy_user_singularity_cachedir }}"
- "{{ galaxy_user_singularity_tmpdir }}"
roles:
- geerlingguy.nfs
- galaxyproject.repos
- mounts
# - install-tpv # todo: this needs a when clause
- geerlingguy.pip
- role: galaxyproject.galaxy
tags: galaxy
- role: galaxyproject.miniconda
become: true
become_user: galaxy
- role: webhooks
tags: webhooks
- role: usegalaxy_eu.galaxy_subdomains
tags: galaxy_subdomains
- name: nginx-upload-module
tags: nginx
- name: galaxyproject.nginx
tags: nginx
- galaxyproject.tusd
- geerlingguy.nfs
- galaxyproject.slurm
- galaxyproject.cvmfs
- galaxyproject.gxadmin
- remote-pulsar-cron
- galaxy-pg-cleanup
- galaxyproject.tiaas2
- geerlingguy.docker
- usegalaxy_eu.apptainer
- dj-wasabi.telegraf
- postfix-mail-relay
- acl-on-startup
- role: usegalaxy_eu.walle
tags: walle
post_tasks:
- name: Ensure object store paths exist
file:
state: directory
path: "{{ item }}"
owner: galaxy
group: galaxy
with_items:
- /mnt/galaxy/data
- /mnt/galaxy/data-2
- /mnt/galaxy/data-3
- /mnt/galaxy/data-scratch
- name: Make local_tool directory group-writable by machine users
file:
path: /mnt/galaxy/local_tools
owner: root
group: devs
mode: 0775
state: directory
- name: Install slurm-drmaa
package:
name: slurm-drmaa1
- name: Uninstall the existing web-dav-client
pip:
name: "webdavclient3"
virtualenv: "{{ galaxy_venv_dir }}"
state: absent
- name: Workaround content-length header bug in webdav through forcible update to newer version
pip:
name: "webdavclient3@git+https://github.com/ezhov-evgeny/webdav-client-python-3@0f17fa7946e66f7963db367d0d6b2e7f940ebeb8"
virtualenv: "{{ galaxy_venv_dir }}"
- name: Reload exportfs
command: exportfs -ra
become: yes
become_user: root
# Nginx logrotate: keep nginx logs forever on /mnt disk
- name: Make sure extra nginx log dirs exist
file:
state: directory
path: "{{ item }}"
with_items:
- "{{ nginx_log_olddir_root }}"
- "{{ nginx_long_term_log_dir }}"
tags: nginx
- name: Add lines to main block in nginx logrotate conf
lineinfile:
path: /etc/logrotate.d/nginx
line: "{{ item }}"
insertafter: ".*{"
with_items:
- "\tdateext"
- "\tolddir {{ nginx_log_olddir_root }}"
tags: nginx
- name: Add lines to postrotate task in nginx logrotate conf
lineinfile:
path: /etc/logrotate.d/nginx
line: "{{ item }}"
insertafter: "\tpostrotate"
with_items:
- "\t\tcp {{ nginx_log_olddir_root }}/* {{ nginx_long_term_log_dir }}/"
tags: nginx