Skip to content

Commit 6fd8bb4

Browse files
Michael Vasseurvmcj
Michael Vasseur
authored andcommitted
Symlink all group names used
There is not clean way to keep the playbooks the same and keep our generic variables. The structure: wf46 - domserver wf47 - domserver would get all variables from wf47 as that is the last defined hostgroup above domserver, putting the contest below would put all hosts (even judgehosts) in the domserver group. By symlinking we get the least worse solution as we have the variables, but for ansible those all look like new groups. Where possible we use the value from `all`, online is fully copied to make sure we don't pick any value from the onsite branch. Use default values for Luxor
1 parent 7aa1ec7 commit 6fd8bb4

21 files changed

+159
-11
lines changed

provision-contest/ansible/group_vars/all/all.yml.example

+10-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
DJ_DIR: /opt/domjudge
33

44
# Branch to checkout and use.
5-
DJ_BRANCH: main
5+
DJ_BRANCH: wfluxor
66

77
# Whether to force-pull changes to the checkout, overwriting any local changes.
88
DJ_FORCE_UPDATE: true
@@ -16,21 +16,20 @@ LOCAL_GIT_IP: "{{SERVER_IP_PREFIX}}.207"
1616
# URL and IP of domserver from judgehosts. A hostname 'domserver' with
1717
# DOMSERVER_IP will be added to the judgehost /etc/hosts file.
1818
DOMSERVER: https://domjudge
19-
DOMSERVER_IP: "{{SERVER_IP_PREFIX}}.215"
20-
DOMSERVER_URL: "{{DOMSERVER}}"
19+
DOMSERVER_URL: "{{ DOMSERVER }}"
2120
DOMSERVER_SSL_CERT: /etc/ssl/certs/domserver.crt
2221
DOMSERVER_SSL_KEY: /etc/ssl/private/domserver.key
2322

2423
# Set this to true when you are using the ICPC World Finals Contest Image
25-
ICPC_IMAGE: false
24+
ICPC_IMAGE: true
2625

2726
# Set this to true when you are using a graphical desktop
28-
GRAPHICAL: false
27+
GRAPHICAL: true
2928

3029
# Set this when on the blue network at the World Finals where no
3130
# internet access is available and "packages" must be used as APT repo
3231
# server.
33-
WF_RESTRICTED_NETWORK: false
32+
WF_RESTRICTED_NETWORK: true
3433
WF_GREEN: false
3534

3635
# Static IP address configuration. Uses the ansible_host variable as the static
@@ -62,17 +61,17 @@ PHP_POST_MAX_SIZE: 256M
6261
PHP_MAX_FILE_UPLOADS: 101
6362

6463
# Git repo URL
65-
DJ_GIT_HOST: "{{LOCAL_GIT_IP}}"
64+
DJ_GIT_HOST: "{{ LOCAL_GIT_IP }}"
6665
DJ_GIT_REPO: "https://github.com/domjudge/domjudge.git"
67-
DJ_GIT_REPO_RESTRICTED: "domjudge@{{DJ_GIT_HOST}}:domjudge"
66+
DJ_GIT_REPO_RESTRICTED: "domjudge@{{ DJ_GIT_HOST }}:domjudge"
6867
DJ_GIT_REPO_SCRIPTS: "https://github.com/domjudge/domjudge-scripts.git"
69-
DJ_GIT_REPO_SCRIPTS_RESTRICTED: "domjudge@{{DJ_GIT_HOST}}:domjudge-scripts-bare"
70-
CONTEST_REPO: "wf2021"
68+
DJ_GIT_REPO_SCRIPTS_RESTRICTED: "domjudge@{{ DJ_GIT_HOST }}:domjudge-scripts-bare"
69+
CONTEST_REPO: "wfluxor"
7170

7271
PHPSTORM_VERSION: 2022.2
7372
PHPSTORM_FULL_VERSION: 222.4345.15
7473

75-
GRAFANA_MONITORING: false
74+
GRAFANA_MONITORING: true
7675

7776
# Hostname of the CDS. If set, will add an nginx in front of the CDS
7877
# If not set, will only expose CDS directly
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
analyst
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
analyst
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/secret.yml
2+
/all.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Server VLAN IP prefix.
2+
SERVER_IP_PREFIX: 172.29.1
3+
4+
# URL and IP of domserver from judgehosts. A hostname 'domserver' with
5+
# DOMSERVER_IP will be added to the judgehost /etc/hosts file.
6+
DOMSERVER: https://domjudge
7+
DOMSERVER_IP: "{{SERVER_IP_PREFIX}}.240"
8+
9+
# Set this when on the blue network at the World Finals where no
10+
# internet access is available and "packages" must be used as APT repo
11+
# server.
12+
WF_GREEN: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
DB_PASSWORD: {some-strong-database-password-analyst}
2+
JUDGEHOST_PASSWORD: {some-strong-judgehost-password-analyst}
3+
ADMIN_PASSWORD: {some-admin-password-analyst}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
online
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
online
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/secret.yml
2+
/all.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Directory of the domjudge repository checkout.
2+
DJ_DIR: /opt/domjudge
3+
4+
# Branch to checkout and use.
5+
DJ_BRANCH: wfonline
6+
7+
# Whether to force-pull changes to the checkout, overwriting any local changes.
8+
DJ_FORCE_UPDATE: true
9+
10+
# Server VLAN IP prefix.
11+
SERVER_IP_PREFIX: 10.3.3
12+
13+
# IP address of the git server.
14+
LOCAL_GIT_IP: "{{SERVER_IP_PREFIX}}.207"
15+
16+
# URL and IP of domserver from judgehosts. A hostname 'domserver' with
17+
# DOMSERVER_IP will be added to the judgehost /etc/hosts file.
18+
DOMSERVER: https://domjudge
19+
DOMSERVER_URL: "{{ DOMSERVER }}"
20+
DOMSERVER_SSL_CERT: /etc/ssl/certs/domserver.crt
21+
DOMSERVER_SSL_KEY: /etc/ssl/private/domserver.key
22+
23+
# Set this to true when you are using the ICPC World Finals Contest Image
24+
ICPC_IMAGE: false
25+
26+
# Set this to true when you are using a graphical desktop
27+
GRAPHICAL: false
28+
29+
# Set this when on the blue network at the World Finals where no
30+
# internet access is available and "packages" must be used as APT repo
31+
# server.
32+
WF_RESTRICTED_NETWORK: false
33+
WF_GREEN: false
34+
35+
# Static IP address configuration. Uses the ansible_host variable as the static
36+
# IP address. Only configured if STATIC_IP_ENABLED is true.
37+
STATIC_IP_ENABLED: false
38+
STATIC_IP_NETMASK: 255.255.252.0
39+
STATIC_IP_GATEWAY: 172.29.0.1
40+
STATIC_IP_INTERFACE: enp1s0
41+
42+
# Additional entries for the /etc/hosts file.
43+
HOSTS:
44+
cds: 10.3.3.207
45+
packages: 10.3.3.209
46+
ntp1: 10.3.3.208
47+
ntp2: 10.3.3.209
48+
nisprint: 10.3.3.211
49+
nismaster: 10.3.3.211
50+
printsrv: 10.3.3.211
51+
domjudge-laptop: 10.3.3.200
52+
pc2: 10.3.3.241
53+
54+
TIMEZONE: "Asia/Dhaka"
55+
56+
PHP_FPM_MAX_CHILDREN: 400
57+
PHP_FPM_MAX_REQUESTS: 500
58+
PHP_MEMORY_LIMIT: 1024M
59+
PHP_UPLOAD_MAX_FILESIZE: 256M
60+
PHP_POST_MAX_SIZE: 256M
61+
PHP_MAX_FILE_UPLOADS: 101
62+
63+
# Git repo URL
64+
DJ_GIT_HOST: "{{ LOCAL_GIT_IP }}"
65+
DJ_GIT_REPO: "https://github.com/domjudge/domjudge.git"
66+
DJ_GIT_REPO_RESTRICTED: "domjudge@{{ DJ_GIT_HOST }}:domjudge"
67+
DJ_GIT_REPO_SCRIPTS: "https://github.com/domjudge/domjudge-scripts.git"
68+
DJ_GIT_REPO_SCRIPTS_RESTRICTED: "domjudge@{{ DJ_GIT_HOST }}:domjudge-scripts-bare"
69+
CONTEST_REPO: "wfluxor"
70+
71+
PHPSTORM_VERSION: 2022.2
72+
PHPSTORM_FULL_VERSION: 222.4345.15
73+
74+
GRAFANA_MONITORING: true
75+
76+
# Hostname of the CDS. If set, will add an nginx in front of the CDS
77+
# If not set, will only expose CDS directly
78+
CDS_HOSTNAME: cds
79+
CDS_PORT: 80
80+
CDS_PORT_SECURE: 443
81+
82+
# CDS SSL cert and key. Only needed when CDS_HOSTNAME is set
83+
CDS_SSL_CERT: /etc/ssl/certs/cds.crt
84+
CDS_SSL_KEY: /etc/ssl/private/cds.key
85+
86+
# Hostname of the static scoreboard
87+
STATIC_SCOREBOARD_HOSTNAME: scoreboard
88+
89+
STATIC_SCOREBOARD_SSL_CERT: /etc/ssl/certs/scoreboard.crt
90+
STATIC_SCOREBOARD_SSL_KEY: /etc/ssl/private/scoreboard.key
91+
92+
# Block access to the CDS for IPs other than these
93+
#CDS_IP_FILTER:
94+
# - 127.0.0.1-127.0.0.1
95+
# - 192.168.0.0-192.168.255.255
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
DB_PASSWORD: {some-strong-database-password-online}
2+
3+
# Credentials for the judgehost.
4+
JUDGEHOST_USER: judgehost
5+
JUDGEHOST_PASSWORD: {some-strong-judgehost-password-online}
6+
7+
# Username and password to be used in .netrc files on admin machines
8+
ADMIN_USER: admin
9+
ADMIN_PASSWORD: {some-admin-password-online}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
wf46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
wf46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/secret.yml
2+
/all.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# URL and IP of domserver from judgehosts. A hostname 'domserver' with
2+
# DOMSERVER_IP will be added to the judgehost /etc/hosts file.
3+
DOMSERVER: https://domserver-wf46
4+
DOMSERVER_IP: "{{SERVER_IP_PREFIX}}.215"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
REPLICATION_PASSWORD: {some-strong-replication-password-wf46}
2+
DB_PASSWORD: {some-strong-database-password-wf46}
3+
JUDGEHOST_PASSWORD: {some-strong-judgehost-password-wf46}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
wf47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
wf47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/secret.yml
2+
/all.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# URL and IP of domserver from judgehosts. A hostname 'domserver' with
2+
# DOMSERVER_IP will be added to the judgehost /etc/hosts file.
3+
DOMSERVER: https://domjudge-wf47
4+
DOMSERVER_IP: "{{SERVER_IP_PREFIX}}.218"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
REPLICATION_PASSWORD: {some-strong-replication-password-wf47}
2+
DB_PASSWORD: {some-strong-database-password-wf47}
3+
JUDGEHOST_PASSWORD: {some-strong-judgehost-password-wf47}

0 commit comments

Comments
 (0)