This repository has been archived by the owner on Sep 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
main.yml
219 lines (210 loc) · 5.35 KB
/
main.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
---
- name: Basic Setup
hosts: all
become: yes
tags:
- base
vars_files:
- vars.yml
roles:
- base
- name: TURN Server
hosts: turn
become: yes
tags:
- turn
vars_files:
- vars.yml
roles:
- turn-standalone
- name: Monitored host
hosts: all
become: yes
tags:
- base-monitoring
vars:
_node_exporter_binary_install_dir: "/opt/node_exporter"
_node_exporter_system_group: "prometheus"
_node_exporter_system_user: "prometheus"
roles:
- cloudalchemy.node-exporter
- node-exporter-ufw
- name: Collect BBB secrets
hosts: bbb
become: yes
tags:
- install-bbb
- scalelite-config
roles:
- bbb-collect
- name: Recording offloader
hosts: offloader
become: yes
tags:
- offloader
vars:
nfs_bbb: yes
nfs_scalelite_write: yes
bbb_recording_deps:
- bbb-record-core
- bbb-mkclean
- bbb-playback-notes
- bbb-playback-podcast
- bbb-playback-presentation
- bbb-playback-screenshare
- bbb-config
roles:
- base
- bbb-nfs-srcf
- kwoodson.yedit
- record-offloader
# - name: Easy Join
# hosts: loadbalancer
# become: yes
# vars_files:
# - vars.yml
# vars:
# nodejs_version: "12.x"
# bbb_secret: "{{ scalelite_loadbalancer_secret }}"
# tags:
# - loadbalancer
# roles:
# - nginx
# - nginx-tls
# - geerlingguy.nodejs
# - bbb-easy-join
- name: Frontend - Greenlight
hosts: frontend
become: yes
vars_files:
- vars.yml
tags:
- greenlight
vars:
nginx_domain_name: "timeout.srcf.net"
# nginx_redirect_alias: "gl.gateway.timeout.srcf.net"
lb_url: "{{ scalelite_loadbalancer_url }}"
lb_secret: "{{ scalelite_loadbalancer_secret }}"
redis_port: 6379
redis_bind_interface: 127.0.0.1
ruby_install_from_source: yes
ruby_version: 2.6.6
ruby_download_url: https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.6.tar.gz
ruby_install_bundler: yes
nodejs_version: "12.x"
postgresql_hba_entries:
- { type: local, database: all, user: postgres, auth_method: peer }
- { type: local, database: all, user: all, auth_method: peer }
- {
type: host,
database: all,
user: all,
address: "127.0.0.1/32",
auth_method: trust,
}
- {
type: host,
database: all,
user: all,
address: "::1/128",
auth_method: trust,
}
postgresql_users:
- name: greenlight
state: present
postgresql_databases:
- name: greenlight_production
owner: greenlight
state: present
roles:
- nginx
- nginx-tls
- geerlingguy.redis
- role: geerlingguy.postgresql
become: yes
- geerlingguy.ruby
- geerlingguy.nodejs
- greenlight
- name: Monitoring
hosts: loadbalancer
become: yes
tags:
- scalelite-config
- monitoring
vars_files:
- vars.yml
vars:
nginx_domain_name: mon.timeout.srcf.net
prometheus_targets:
node:
- targets: "{{ groups['all'] | map('extract', hostvars, ['inventory_hostname']) | map('regex_replace', '$', ':9100') | list }}"
bbb:
- targets: "{{ groups['bbb'] | map('extract', hostvars, ['inventory_hostname']) | map('regex_replace', '$', ':9688') | list }}"
coturn:
- targets:
- "{{ groups['turn'] | map('extract', hostvars, ['inventory_hostname']) | map('regex_replace', '$', ':9461') | list }}"
- "{{ groups['bbb'] | map('extract', hostvars, ['inventory_hostname']) | map('regex_replace', '$', ':9688') | list }}"
prometheus_scrape_configs:
- job_name: "prometheus"
metrics_path: "/metrics"
static_configs:
- targets:
- "127.0.0.1:9090"
- job_name: "node"
file_sd_configs:
- files:
- "/etc/prometheus/file_sd/node.yml"
relabel_configs:
- source_labels: ["__address__"]
separator: ":"
regex: "(.*):.*"
target_label: "instance"
replacement: "$1"
- job_name: "bbb"
file_sd_configs:
- files:
- "/etc/prometheus/file_sd/bbb.yml"
relabel_configs:
- source_labels: ["__address__"]
separator: ":"
regex: "(.*):.*"
target_label: "instance"
replacement: "$1"
grafana_address: 127.0.0.1
grafana_port: 3001
grafana_url: "https://mon.timeout.srcf.net"
grafana_domain: "mon.timeout.srcf.net"
grafana_database:
type: postgres
host: 127.0.0.1:5432
name: grafana
user: grafana
password: trust
grafana_datasources:
- name: prometheus
type: prometheus
access: proxy
url: "http://localhost:9090"
basicAuth: false
isDefault: true
grafana_dashboards_dir: files/grafana/dashboards
grafana_security:
admin_user: admin
admin_password: "{{ monitoring_grafana_admin_password }}"
grafana_users:
allow_sign_up: false
default_theme: dark
auto_assign_org: true
editors_can_admin: true
auto_assign_org_role: Editor
grafana_auth:
disable_login_form: false
anonymous:
enabled: true
org_name: srcf
org_role: Viewer
roles:
- cloudalchemy.prometheus
- prometheus-ufw
- cloudalchemy.grafana
- nginx-tls-monitoring