Skip to content

Commit fed0f65

Browse files
Michael Vasseurvmcj
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 fa1812d commit fed0f65

21 files changed

+159
-11
lines changed

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

Lines changed: 10 additions & 11 deletions
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,24 +16,23 @@ 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 to true when you use an (ICPC) AWS machine
3130
AWS: true
3231

3332
# Set this when on the blue network at the World Finals where no
3433
# internet access is available and "packages" must be used as APT repo
3534
# server.
36-
WF_RESTRICTED_NETWORK: false
35+
WF_RESTRICTED_NETWORK: true
3736
WF_GREEN: false
3837

3938
# Static IP address configuration. Uses the ansible_host variable as the static
@@ -65,17 +64,17 @@ PHP_POST_MAX_SIZE: 256M
6564
PHP_MAX_FILE_UPLOADS: 101
6665

6766
# Git repo URL
68-
DJ_GIT_HOST: "{{LOCAL_GIT_IP}}"
67+
DJ_GIT_HOST: "{{ LOCAL_GIT_IP }}"
6968
DJ_GIT_REPO: "https://github.com/domjudge/domjudge.git"
70-
DJ_GIT_REPO_RESTRICTED: "domjudge@{{DJ_GIT_HOST}}:domjudge"
69+
DJ_GIT_REPO_RESTRICTED: "domjudge@{{ DJ_GIT_HOST }}:domjudge"
7170
DJ_GIT_REPO_SCRIPTS: "https://github.com/domjudge/domjudge-scripts.git"
72-
DJ_GIT_REPO_SCRIPTS_RESTRICTED: "domjudge@{{DJ_GIT_HOST}}:domjudge-scripts-bare"
73-
CONTEST_REPO: "wf2021"
71+
DJ_GIT_REPO_SCRIPTS_RESTRICTED: "domjudge@{{ DJ_GIT_HOST }}:domjudge-scripts-bare"
72+
CONTEST_REPO: "wfluxor"
7473

7574
PHPSTORM_VERSION: 2022.2
7675
PHPSTORM_FULL_VERSION: 222.4345.15
7776

78-
GRAFANA_MONITORING: false
77+
GRAFANA_MONITORING: true
7978

8079
# Hostname of the CDS. If set, will add an nginx in front of the CDS
8180
# If not set, will only expose CDS directly
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
analyst
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
analyst
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/secret.yml
2+
/all.yml
Lines changed: 12 additions & 0 deletions
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
Lines changed: 3 additions & 0 deletions
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}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
online
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
online
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/secret.yml
2+
/all.yml
Lines changed: 95 additions & 0 deletions
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

0 commit comments

Comments
 (0)