Skip to content

Commit 11f14fd

Browse files
committed
Split for WF setups
1 parent 9adfd25 commit 11f14fd

File tree

10 files changed

+102
-2
lines changed

10 files changed

+102
-2
lines changed

Diff for: provision-contest/ansible/domserver.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- python3-netaddr
1414

1515
- name: Setup domserver
16-
hosts: domserver
16+
hosts: domserver,online-domserver
1717
vars:
1818
host_type: domserver
1919
become: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../onprem/all.yml.example
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../onprem/secret.yml.example
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/secret.yml
2+
/all.yml

Diff for: provision-contest/ansible/hosts.example

+22
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ ansible_python_interpreter=/usr/bin/python3
55
# When moving clients for ad-hoc actions:
66
# move them to their own group to keep hosts files on deployed machines in sync.
77

8+
[onprem:children]
9+
domserver
10+
judgehost
11+
cds
12+
grafana
13+
admin
14+
presclient
15+
presadmin
16+
scoreboard
17+
mgmt
18+
autoanalyst
19+
20+
[online:children]
21+
online-domserver
22+
online-judgehost
23+
824
[domserver]
925
domjudge-primary ansible_host=10.3.3.216 KEEPALIVED_PRIORITY=100 EFI_ORDER='0\,1\,3\,4'
1026
domjudge-backup ansible_host=10.3.3.217 KEEPALIVED_PRIORITY=99 EFI_ORDER='0\,1\,3\,4'
@@ -63,3 +79,9 @@ domjudge-scoreboard ansible_host=10.2.2.229
6379
domjudge-mgmg ansible_host=10.3.3.223
6480

6581
[autoanalyst]
82+
83+
[online-domserver]
84+
online-domserver ansible_host=192.168.255.255
85+
86+
[online-judgehost]
87+
online-judgehost1 ansible_host=192.168.255.255

Diff for: provision-contest/ansible/judgehost.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This playbook installs the DOMjudge judgehosts
33

44
- name: Setup judgehost
5-
hosts: judgehost
5+
hosts: judgehost,online-judgehost
66
strategy: free
77
vars:
88
host_type: judgehost

Diff for: provision-contest/ansible/roles/grafana/templates/prometheus.yml.j2

+74
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,77 @@ scrape_configs:
154154
{% for host in groups["domserver"] %}
155155
- {{ hostvars[host].ansible_host }}:9253
156156
{% endfor %}
157+
- job_name: 'online-db'
158+
basic_auth:
159+
username: "prometheus"
160+
password: "{{ PROMETHEUS_PASS }}"
161+
tls_config:
162+
insecure_skip_verify: true
163+
scheme: https
164+
static_configs:
165+
- targets:
166+
{% for host in groups["online-domserver"] %}
167+
- {{ hostvars[host].ansible_host }}:9104
168+
{% endfor %}
169+
- job_name: node_domserver_online
170+
basic_auth:
171+
username: "prometheus"
172+
password: "{{ PROMETHEUS_PASS }}"
173+
tls_config:
174+
insecure_skip_verify: true
175+
scheme: https
176+
static_configs:
177+
- targets:
178+
{% for host in groups["online-domserver"] %}
179+
- {{ hostvars[host].ansible_host }}:9100
180+
{% endfor %}
181+
- job_name: online-domjudge
182+
basic_auth:
183+
username: admin
184+
password: {{ ADMIN_PASSWORD }}
185+
metrics_path: /api/v4/metrics/prometheus
186+
scheme: https
187+
tls_config:
188+
insecure_skip_verify: true
189+
static_configs:
190+
- targets:
191+
{% for host in groups["online-domserver"] %}
192+
- {{ hostvars[host].ansible_host }}
193+
{% endfor %}
194+
- job_name: 'web_nginx_domserver_online'
195+
basic_auth:
196+
username: "prometheus"
197+
password: "{{ PROMETHEUS_PASS }}"
198+
tls_config:
199+
insecure_skip_verify: true
200+
scheme: https
201+
static_configs:
202+
- targets:
203+
{% for host in groups["online-domserver"] %}
204+
- {{ hostvars[host].ansible_host }}:9113
205+
{% endfor %}
206+
- job_name: 'web_fpm_domserver_online'
207+
basic_auth:
208+
username: "prometheus"
209+
password: "{{ PROMETHEUS_PASS }}"
210+
tls_config:
211+
insecure_skip_verify: true
212+
scheme: https
213+
static_configs:
214+
- targets:
215+
{% for host in groups["online-domserver"] %}
216+
- {{ hostvars[host].ansible_host }}:9253
217+
{% endfor %}
218+
- job_name: node_judgehost_online
219+
basic_auth:
220+
username: "prometheus"
221+
password: "{{ PROMETHEUS_PASS }}"
222+
tls_config:
223+
insecure_skip_verify: true
224+
scheme: https
225+
static_configs:
226+
- targets:
227+
{% for host in groups["online-judgehost"] %}
228+
- {{ hostvars[host].ansible_host }}:9100
229+
{% endfor %}
230+

0 commit comments

Comments
 (0)