Skip to content

ICPC 2025 image fixes #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion provision-contest/ansible/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ $(SSHKEY) $(SSHKEY).pub:

$(SSL_DOMSERVER_FILES):
openssl req -x509 -nodes -newkey rsa:4096 -subj "/O=DOMjudge/CN=domjudge" \
-addext "subjectAltName = DNS:wf46-domjudge,DNS:wf47-domjudge,DNS:analyst" \
-addext "subjectAltName = DNS:domjudge" \
-sha256 -days 365 -keyout $(SSL_DOMSERVER).key -out $(SSL_DOMSERVER).crt
$(SSL_NODEEXPORT_FILES):
openssl req -x509 -nodes -newkey rsa:4096 -subj "/O=DOMjudge/CN=metricexporter" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ INSTALLED_PACKAGES:
- php-mysql
- php-xml
- php-zip
- php-bcmath
- pv
- python3-sphinx
- python3-sphinx-rtd-theme
Expand Down
11 changes: 6 additions & 5 deletions provision-contest/ansible/roles/base_packages/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
block:
- name: Replace pc2.ecs.baylor.edu by packages in apt sources
replace:
dest: "/etc/apt/{{ item }}"
dest: "/etc/apt/sources.list.d/{{ item }}"
regexp: 'sysopspackages\.icpc\.global'
replace: 'packages'
loop:
- sources.list
- sources.list.d/mono.list
- sources.list.d/vscode.list
- sources.list.d/pypy-ubuntu-ppa-jammy.list
- ubuntu.sources
- vscode.sources
- firefox.sources
- sysopspackagesicpcglobal.sources
- jetbrains.sources
notify: Run apt update

- name: Add packages to hosts file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Restart gdm
- name: Restart lightdm
service:
name: gdm3
name: lightdm
enabled: true
state: restarted
20 changes: 11 additions & 9 deletions provision-contest/ansible/roles/domjudge_user/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,23 @@

- name: Setup autologin on desktop installs
block:
- name: Enable GDM autologin
- name: Enable lightdm autologin
lineinfile:
path: /etc/gdm3/custom.conf
regexp: 'AutomaticLoginEnable'
line: 'AutomaticLoginEnable=true'
path: /etc/lightdm/lightdm.conf
regexp: 'autologin-timeout'
line: 'autologin-timeout=0'
create: true
mode: 0644
notify: Restart gdm
notify: Restart lightdm

- name: Automatically login domjudge user
lineinfile:
path: /etc/gdm3/custom.conf
regexp: 'AutomaticLogin\s*='
line: 'AutomaticLogin=domjudge'
notify: Restart gdm
path: /etc/lightdm/lightdm.conf
regexp: 'autologin-user'
line: 'autologin-user=domjudge'
create: true
mode: 0644
notify: Restart lightdm

- name: Make sure autostart directory exists
file:
Expand Down
2 changes: 1 addition & 1 deletion provision-contest/ansible/roles/domlogo/files/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ First, create the following files:
- `images/photos/crew.png`, an image with a width of 1024 (and any height) to show for teams without a photo.
- `images/photos/idle.png`, an image with a width of 1024 (and any height) to show when the judgedaemon is idle.

Next, add the needed Python dependencies to the `lib` folder, within a folder called `python3.10`. You can copy this
Next, add the needed Python dependencies to the `lib` folder, within a folder called `python3.12`. You can copy this
folder from a local machine and it should contain the `FreeSimpleGUI` and `requests` Python packages.

Optionally you can create a file `images/config.yaml` with something like:
Expand Down
15 changes: 6 additions & 9 deletions provision-contest/ansible/roles/domlogo/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

- name: Fix ownership of domlogo env
file:
path: "/home/domjudge/.local/lib/python3.10"
path: "/home/domjudge/.local/lib/python3.12"
recurse: true
owner: domjudge
group: domjudge
Expand All @@ -46,11 +46,8 @@

- name: Copy domlogo systemd unit file
template:
src: "domlogo.service.j2"
dest: "/etc/systemd/system/domlogo.service"

- name: Enable and start domlogo
systemd:
name: domlogo
enabled: true
state: started
src: "domlogo.desktop.j2"
dest: "/home/domjudge/.config/autostart/domlogo.desktop"
owner: domjudge
group: domjudge
mode: 0755
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[Desktop Entry]
Name=domlogo
Type=Application
Exec=env REQUESTS_CA_BUNDLE=/usr/local/share/ca-certificates/domserver.crt bash -c "sleep 3; cd {{ DJ_DIR }}; python3 ./domlogo.py"

This file was deleted.

4 changes: 2 additions & 2 deletions provision-contest/ansible/roles/judgedaemon/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
- name: Create chroot
shell: "set -o pipefail &&
{{ DJ_DIR }}/misc-tools/dj_make_chroot -y -H
-i icpc-kotlinc,openjdk-17-jdk-headless
-i openjdk-21-jdk-headless
-l \"$(ls /tmp/dj_ansible/install-chroot/*.deb 2>/dev/null | tr '\n' ',')\"
-s \"$(ls /tmp/dj_ansible/chroot-list/*.list 2>/dev/null | tr '\n' ',')\"
2>&1 | tee /tmp/dj_make_chroot.log;
Expand All @@ -52,7 +52,7 @@

- name: Pre-generate the kernel flags for ansible usage
set_fact:
procline: "apparmor=0 systemd.unified_cgroup_hierarchy=0 cgroup_enable=memory swapaccount=1 isolcpus={{ cpucore | join(',') }}"
procline: "apparmor=0 swapaccount=1 isolcpus={{ cpucore | join(',') }}"

- name: Add cgroup kernel parameters
lineinfile:
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions provision-contest/ansible/roles/system_fixes/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,6 @@
fi
fi

- name: Force enable alt-tab for switching windows
copy:
src: dconf/
dest: /etc/dconf/
owner: root
group: root
mode: 0755
notify: Update dconf
when: GRAPHICAL

- name: Configure network for static IP address
when: STATIC_IP_ENABLED
block:
Expand Down