Skip to content

Commit 487a67c

Browse files
Updates for Ubuntu 20.04 and newer DOMjudge git code.
1 parent 89691ca commit 487a67c

10 files changed

+29
-21
lines changed

icpc-wf/ansible/admin.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- name: restart nginx
1010
service: name=nginx state=restarted
1111
- name: restart PHP FPM
12-
service: name=php7.2-fpm state=restarted
12+
service: name=php7.4-fpm state=restarted
1313
- name: update-ca-certificates
1414
command: update-ca-certificates
1515
- name: restart rsyslog
@@ -49,7 +49,7 @@
4949
- mariadb-server
5050
- nginx
5151
- php-fpm
52-
- python-mysqldb
52+
- python3-mysqldb
5353
- php-intl
5454
- mycli
5555
- mmv
@@ -59,15 +59,15 @@
5959

6060
- name: set PHP timezone for FPM
6161
lineinfile:
62-
dest: /etc/php/7.2/fpm/php.ini
62+
dest: /etc/php/7.4/fpm/php.ini
6363
state: present
6464
regexp: 'date\.timezone\s*='
6565
line: 'date.timezone = {{TIMEZONE}}'
6666

6767
- name: enable php modules
6868
command: phpenmod {{item}}
6969
args:
70-
creates: /etc/php/7.2/fpm/conf.d/20-{{item}}.ini
70+
creates: /etc/php/7.4/fpm/conf.d/20-{{item}}.ini
7171
with_items:
7272
- zip
7373
- intl

icpc-wf/ansible/common_tasks_all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
- name: set PHP timezone for CLI
5353
lineinfile:
54-
dest: /etc/php/7.2/cli/php.ini
54+
dest: /etc/php/7.4/cli/php.ini
5555
state: present
5656
regexp: 'date\.timezone\s*='
5757
line: 'date.timezone = {{TIMEZONE}}'

icpc-wf/ansible/common_tasks_packages_icpc-wf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
tags: packages
55
replace:
66
dest: /etc/apt/sources.list
7-
regexp: 'pc2cancer\.ecs\.csus\.edu'
7+
regexp: 'pc2\.ecs\.csus\.edu'
88
replace: 'packages'
99

1010
- name: remove pycharm repo

icpc-wf/ansible/domserver-only-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- name: restart nginx
1212
service: name=nginx state=restarted
1313
- name: restart PHP FPM
14-
service: name=php7.2-fpm state=restarted
14+
service: name=php7.4-fpm state=restarted
1515
- name: update-ca-certificates
1616
command: update-ca-certificates
1717
- name: restart collectd

icpc-wf/ansible/domserver.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- name: restart nginx
1212
service: name=nginx state=restarted
1313
- name: restart PHP FPM
14-
service: name=php7.2-fpm state=restarted
14+
service: name=php7.4-fpm state=restarted
1515
- name: update-ca-certificates
1616
command: update-ca-certificates
1717
- name: restart collectd
@@ -35,7 +35,7 @@
3535
- mariadb-server
3636
- nginx
3737
- php-fpm
38-
- python-mysqldb
38+
- python3-mysqldb
3939
- php-intl
4040
- mycli
4141
- macchanger
@@ -45,15 +45,15 @@
4545

4646
- name: set PHP timezone for FPM
4747
lineinfile:
48-
dest: /etc/php/7.2/fpm/php.ini
48+
dest: /etc/php/7.4/fpm/php.ini
4949
state: present
5050
regexp: 'date\.timezone\s*='
5151
line: 'date.timezone = {{TIMEZONE}}'
5252

5353
- name: enable php modules
5454
command: phpenmod {{item}}
5555
args:
56-
creates: /etc/php/7.2/fpm/conf.d/20-{{item}}.ini
56+
creates: /etc/php/7.4/fpm/conf.d/20-{{item}}.ini
5757
with_items:
5858
- zip
5959
- intl

icpc-wf/ansible/files/setup-replication.sh.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ echo "Recreating empty database..."
2424
mysql -e 'STOP SLAVE; DROP DATABASE domjudge;'
2525
{{DJ_DIR}}/sql/dj_setup_database create-db-users
2626

27-
ssh "$MASTER" "service php7.2-fpm stop"
27+
ssh "$MASTER" "service php7.4-fpm stop"
2828

2929
MASTER_STATUS=$(ssh "$MASTER" "mysql -e 'SHOW MASTER STATUS;'" | tail -n1)
3030
MASTER_BINLOG=$(echo "$MASTER_STATUS" | cut -f 1)
@@ -48,7 +48,7 @@ CHANGE MASTER TO MASTER_HOST='10.3.3.${MASTER_SERVER_ID}',
4848
MASTER_LOG_POS=${MASTER_LOGPOS};
4949
START SLAVE;"
5050

51-
ssh "$MASTER" "service php7.2-fpm start"
51+
ssh "$MASTER" "service php7.4-fpm start"
5252

5353
if ! mysql -e 'SHOW SLAVE STATUS\G' | grep 'Slave_SQL_Running: Yes' ; then
5454
echo "Error: slave SQL replication not running."
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[Desktop Entry]
22
Name=taillog-domserver-symfony-error
33
Type=Application
4-
Exec=gnome-terminal --window --geometry 74x17+1000+400 -e 'bash -c "tail -F /opt/domjudge/webapp/var/logs/prod.log"'
4+
Exec=gnome-terminal --window --geometry 74x17+1000+400 -e 'bash -c "tail -F /opt/domjudge/webapp/var/log/prod.log"'

icpc-wf/ansible/judgehost-only-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- name: restart nginx
1212
service: name=nginx state=restarted
1313
- name: restart PHP FPM
14-
service: name=php7.2-fpm state=restarted
14+
service: name=php7.4-fpm state=restarted
1515
- name: update-ca-certificates
1616
command: update-ca-certificates
1717
- name: restart collectd

icpc-wf/ansible/judgehost.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
- name: disable clearing Symfony cache when building
3939
lineinfile:
4040
dest: "{{DJ_DIR}}/Makefile"
41-
regexp: "^(.*-C webapp clear-cache)$"
41+
regexp: "^(.*composer auto-scripts)$"
4242
line: '#\1'
4343
backrefs: yes
4444

@@ -47,7 +47,7 @@
4747
- name: re-enable clearing Symfony cache when building
4848
lineinfile:
4949
dest: "{{DJ_DIR}}/Makefile"
50-
regexp: "^#(.*-C webapp clear-cache)$"
50+
regexp: "^#(.*composer auto-scripts)$"
5151
line: '\1'
5252
backrefs: yes
5353

@@ -106,12 +106,20 @@
106106
notify: restart systemctl
107107

108108
- name: copy create-cgroups systemd unit file
109-
copy: src={{DJ_DIR}}/misc-tools/create-cgroups.service dest=/etc/systemd/system/ remote_src=yes
109+
copy: src={{DJ_DIR}}/lib/judge/create-cgroups.service dest=/etc/systemd/system/ remote_src=yes
110110
tags: updateservice
111111
notify: restart systemctl
112112

113+
- name: Change path of create_cgroups file
114+
lineinfile:
115+
dest: /etc/systemd/system/create-cgroups.service
116+
state: present
117+
regexp: 'ExecStart'
118+
line: 'ExecStart={{DJ_DIR}}/judge/create_cgroups'
119+
notify: restart systemctl
120+
113121
- name: copy judgedaemon systemd unit file
114-
copy: src={{DJ_DIR}}/judge/domjudge-judgehost.service dest=/etc/systemd/system/ remote_src=yes
122+
copy: src={{DJ_DIR}}/lib/judge/domjudge-judgehost.service dest=/etc/systemd/system/ remote_src=yes
115123
tags: updateservice
116124
notify: restart systemctl
117125

icpc-wf/ansible/nginx-setup.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
notify: update-ca-certificates
1313

1414
- name: copy in domjudge FPM conf
15-
copy: src={{DJ_DIR}}/etc/domjudge-fpm.conf remote_src=yes dest=/etc/php/7.2/fpm/pool.d/domjudge.conf
15+
copy: src={{DJ_DIR}}/etc/domjudge-fpm.conf remote_src=yes dest=/etc/php/7.4/fpm/pool.d/domjudge.conf
1616
notify: restart PHP FPM
1717

1818
- name: copy in domjudge nginx conf
@@ -101,7 +101,7 @@
101101

102102
- name: Set PHP settings
103103
lineinfile:
104-
dest: /etc/php/7.2/fpm/pool.d/domjudge.conf
104+
dest: /etc/php/7.4/fpm/pool.d/domjudge.conf
105105
regexp: "{{item.regexp}}"
106106
line: "{{item.key}} = {{item.value}}"
107107
with_items:

0 commit comments

Comments
 (0)