forked from usegalaxy-no/infrastructure-playbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslurm.yml
209 lines (183 loc) · 4.65 KB
/
slurm.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# this is needed otherwise not all information will be available for creating the slurm config for the controller.
- hosts: galaxyserver, slurm
gather_facts: yes
- hosts: galaxyserver
become: true
vars_files:
- secret_group_vars/global.vault
- group_vars/global.yml
- group_vars/env.yml
- group_vars/galaxy.yml
- group_vars/slurm.yml
- group_vars/cvmfsproxy.yml
vars:
slurm_roles: ["controller", "dbd"]
nfs_mode: server
pre_tasks:
- name: Create users and groups
include: tasks/users_groups.yml
- name: Add galaxy paths for nfs export
become: true
file:
path: "{{ item }}"
state: directory
mode: "0750"
owner: "{{ galaxy_user.name }}"
group: "{{ galaxy_user.name }}"
with_items:
- "{{ galaxy_file_path }}"
- "{{ galaxy_root }}"
- name: make dir for slurm (should not be needed!)
file:
path: /etc/slurm/
state: directory
mode: "0755"
owner: root
group: root
- name: Open firewalld ports
tags: firewall-setup
become: true
include: tasks/firewall.yml ports="['ssh']"
- name: Slurm related tasks
include: tasks/slurm.yml
tasks:
- name: copy limits.conf
copy:
src: system/99-usegalaxy.conf
dest: /etc/security/limits.d/99-usegalaxy.conf
owner: root
group: root
mode: '0644'
roles:
- galaxyproject.repos
- galaxyproject.slurm
- indigo-dc.nfs
- usegalaxy-no.cvmfsproxy
post_tasks:
- name: Install slurm-drmaa
package:
name: slurm-drmaa
- name: galaxy dependencies dir (?)
file:
path: "{{ galaxy_root }}/server/dependencies"
state: directory
mode: "0644"
owner: "{{ galaxy_user.name }}"
- name: slurmdbd permissions
file:
path: /etc/slurm/slurmdbd.conf
mode: "0600"
owner: slurm
group: root
- name: galaxy root is readable for nginx
file:
path: "{{ galaxy_root }}"
state: directory
mode: "0755"
owner: "{{ galaxy_user.name }}"
group: "{{ galaxy_user.name }}"
- hosts: slurm
become: true
vars_files:
- group_vars/global.yml
- secret_group_vars/global.vault
- group_vars/env.yml
- group_vars/slurm.yml
- group_vars/galaxy.yml
- group_vars/cvmfsproxy.yml
vars:
nfs_mode: client
pre_tasks:
- name: Create users and groups
include: tasks/users_groups.yml
- name: Slurm related tasks
include: tasks/slurm.yml
- name: Open firewalld ports
tags: firewall-setup
become: true
include: tasks/firewall.yml ports="['ssh']"
roles:
- role: geerlingguy.repo-epel
- galaxyproject.repos
- geerlingguy.docker
- indigo-dc.nfs
- galaxyproject.cvmfs
- usegalaxy-no.cvmfsproxy
tasks:
- name: Install packages
package:
name:
- "python3"
- "git"
- "python36-virtualenv"
- "bzip2"
- "singularity"
- name: copy limits.conf
copy:
src: system/99-usegalaxy.conf
dest: /etc/security/limits.d/99-usegalaxy.conf
owner: root
group: root
mode: '0644'
- hosts: slurm
become: true
tags:
- testing
vars_files:
- group_vars/global.yml
- secret_group_vars/global.vault
- group_vars/env.yml
- group_vars/slurm.yml
- group_vars/galaxy.yml
vars:
slurm_roles: ["exec"]
roles:
- galaxyproject.slurm
- hosts: slurm
become: true
vars_files:
- secret_group_vars/global.vault
- group_vars/global.yml
- group_vars/env.yml
- group_vars/telegraf.yml
pre_tasks:
- name: SELinux
selinux:
policy: targeted
state: permissive
tags:
- selinux
- name: Disable ipv6
sysctl:
name: net.ipv6.conf.eth0.disable_ipv6
value: '1'
state: present
- name: Install Dependencies
package:
name:
- 'mailx'
- 'vim'
- 'mlocate'
- name: set hostname
hostname:
name: "{{inventory_hostname}}"
tasks:
- name: Set timezone to Europe/Oslo
timezone:
name: Europe/Oslo
- name: Create users and groups
include: tasks/users_groups.yml
tags: 'users'
- name: Misc system tasks
include: tasks/system.yml
roles:
- role: geerlingguy.repo-epel
- role: reallyenglish.dhclient
when: "env != 'production'"
- role: nbigot.ansible-fail2ban
tags: fail2ban
- role: weareinteractive.sudo
tags: ['sudo']
- role: dj-wasabi.telegraf
tags: ['telegraf']
- role: idiv-biodiversity.postfix