-
Notifications
You must be signed in to change notification settings - Fork 1
/
site.yml
283 lines (252 loc) · 9.09 KB
/
site.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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
---
# ansible-playbook -i <INVENTORY-DIR>/prod-hosts site.yml
# New hosts are created in Compute Candada's openstack cloud
# infrastructure. requires a named cloud "cc_arbutus_rep, cc_arbutus_default, or"
# cc_arbutus_default_dev.
# Defined in clouds.yaml file with authentication credentials specific
# for that cloud/project. Create Instance with optional second disk mounted on
# /dev/vdb to act as the OMERO binary repository.
- name: Create/Configure UofA production instance
hosts: uofa_omero
tasks:
- name: create the instance in the cloud
import_role:
name: sco.create_instance
vars:
cloud: cc_arbutus_default_dev
create_second_volume: true
floating_ip: 206.12.92.91
flavour: "p12-16gb"
image: Ubuntu-20.04-Focal-x64-2020-12
# description: "University of Alberta's production OMERO server"
# current version of openstack.cloud.server or maybe the python openstacksdk fails
# when provided with any description. 20210430
boot_volume_size: 200
server_name: "omero"
keypair: "SteveOKeyPairCCOMERO"
network: def-steveogg-dev-network
security_group_list:
- default
- web
- ssh
- ping
- omero
- monitoring
second_volume_name: "binary_repository"
second_volume_size_gb: 9500
second_volume_description: "/OMERO binary repository"
device: "/dev/vdb"
delegate_to: localhost
- name: configure the newly created instance
import_playbook: productionServer.yml
vars:
machine: uofa_omero
fqdn: "206-12-92-91.cloud.computecanada.ca"
- name: Create Training Server
hosts: omero_training
tasks:
- name: create training server instance"
import_role:
name: sco.create_instance
vars:
cloud: cc_arbutus_default_dev
create_second_volume: false
floating_ip: 206.12.95.221
flavour: "p4-6gb"
image: Ubuntu-20.04-Focal-x64-2020-12
boot_volume_size: 50
server_name: "omero_training"
#description: "OMERO server used for training workshops"
# current version of openstack.cloud.server or maybe openstacksdk fails
# when provided with a description. 20210430
keypair: "SteveOKeyPairCCOMERO"
network: "def-steveogg-dev-network"
security_group_list:
- default
- web
- ssh
- ping
- omero
- monitoring
# second_volume_name: "binary_repository"
# second_volume_description: "mount this on /OMERO to act as the binary repository"
# second_volume_size_gb: 50
# device: "/dev/vdb"
delegate_to: localhost
- name: configure the newly created instance as a training server
import_playbook: trainingServer.yml
vars:
machine: omero_training
fqdn: "206-12-95-221.cloud.computecanada.ca"
#Create National Production Server
- name: Create National OMERO Production Server
hosts: national_omero
tasks:
- name: create the server instance in the cloud
import_role:
name: sco.create_instance
vars:
cloud: cc_arbutus_rpp
create_second_volume: true
floating_ip: 206.12.94.73
flavour: "p16-32gb"
image: Ubuntu-20.04-Focal-x64-2020-12
server_name: "national_omero"
boot_volume_size: 200
#server_description: "Canadian National OMERO production server"
# current version of openstack.cloud.server or maybe openstacksdk fails
# when provided with a description. 20210430
keypair: "SteveOKeyPairCCOMERO"
network: "rpp-steveogg-network"
second_volume_name: "binary_repository"
second_volume_size_gb: 20000
second_volume_description: "Volume to use as the OMERO binary repository"
device: "/dev/vdb"
security_group_list:
- default
- web
- ping
- omero
- ssh
-monitoring
delegate_to: localhost
- name: configure the national production server
## Configure National OMERO.server. This is currently
## a one-node server hosting the db_server, omero_server and web_server from
## a single instance.
import_playbook: productionServer.yml
vars:
host: national_omero
fqdn: "206-12-94-73.cloud.computecanada.ca"
##Create Backup Server
- name: Create backup server
hosts: backup
tasks:
- name: Create instance to backup national omero data
import_role:
name: sco.create_instance
vars:
cloud: cc_arbutus_rpp
create_second_volume: true
floating_ip: 206.12.94.9
flavour: "p8-16gb"
image: Ubuntu-20.04-Focal-x64-2020-12
server_name: "omero_backup"
boot_volume_size: 200
#description: "server to act as backup for OMERO
# current version of openstack.cloud.server or maybe openstacksdk fails
# when provided with a description. 20210430
keypair: "SteveOKeyPairCCOMERO"
network: "rpp-steveogg-network"
second_volume_name: "backup"
second_volume_size_gb: 20000
second_volume_description: "backup omero binary repository"
device: "/dev/vdb"
security_group_list:
- default
- ssh
- ping
-monitoring
delegate_to: localhost
- name: configure newly created backup instance
import_playbook: rdiffBackup.yml
vars:
rdiff_backup_frequency: daily # or weekly or monthly
second_volume_size_gb: 20000
# Internal monitoring configuration for all OMERO servers
# Currently (20210430) not enough resources to separate the grafana and prometheus servers
# Therefore create one machine and provision with both apps (see below).
#- name: Create Prometheus Server
# hosts: prometheus
# gather_facts: false
# tasks:
# - name: Create instance for prometheus and loki
# import_role:
# name: sco.create_instance
# vars:
# cloud: cc_arbutus_default
# create_second_volume: false
# floating_ip: 206.12.94.110
# flavour: "p4-6gb"
# image: Ubuntu-20.04-Focal-x64-2020-12
# server_name: "prometheus"
# boot_volume_size: 9500
# #description: ""
# # current version of openstack.cloud.server or maybe openstacksdk fails
# # when provided with a description. 20210430
# keypair: "SteveOKeyPairCCOMERO"
# network: "def-steveogg-network"
# security_group_list:
# - default
# - ssh
# - ping
# delegate_to: localhost
#
# - name: Install Prometheus, alertmanager, blackbox-exporter and loki
# import_playbook: configurePrometheus.yml
- name: Create Prometheus/Grafana server
hosts: grafana
gather_facts: false
tasks:
- name: create instance to use as grafana server
import_role:
name: sco.create_instance
vars:
cloud: cc_arbutus_default
create_second_volume: true
floating_ip: 206.12.92.26
flavour: "p16-24gb"
image: Ubuntu-20.04-Focal-x64-2020-12
server_name: "grafana"
boot_volume_size: 200
#description: "Prometheus/Grafana for OMERO monitoring"
# current version of openstack.cloud.server or maybe openstacksdk fails
# when provided with a description. 20210430
keypair: "SteveOKeyPairCCOMERO"
network: "def-steveogg-network"
second_volume_name: "data"
second_volume_size_gb: 9800
second_volume_description: "mount to provide data directory for prometheus"
device: "/dev/vdb"
security_group_list:
- default
- ssh
- web
- ping
- monitoring
delegate_to: localhost
- name: install grafana, get certificate to deploy grafana on https.
import_playbook: configureGrafana.yml
- name: install prometheus, alertmanager, blackboxexporter
import_playbook: configPrometheus.yml
- name: Configure instances for monitoring
import_playbook: monitoringAgents.yml
hosts: [monitored]
tasks:
- name: install node exporter
import_role:
name: couldalchemy.node_exporter
become: true
- name: install exporters on omero servers
hosts: [omero-server]
tasks:
- name: install jmx exporter
import_role:
name: ome.prometheus_jmx
- name: "role for handlers and {{ omero_common_basedir }}"
import_role:
name: ome.omero_common
- name: omero exporter
import_role:
name: sco.omero_prometheus_exporter
vars:
omero_prometheus_exporter_omero_user: omero-monitoring
omero_prometheus_exporter_omero_password: omero-monitoring
- name: omero-server prometheus jmx agents
become: yes
copy:
dest: "{{ omero_common_basedir }}/server/config/prometheus.omero"
src: omero-server-config-prometheus.omero
mode: 0644
notify:
- restart omero-server