Skip to content

Commit 73db208

Browse files
committed
Configure judgehost on AWS
This is also a good example for people on Digital Ocean etc.
1 parent 06daf51 commit 73db208

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ ICPC_IMAGE: false
2727
# Set this to true when you are using a graphical desktop
2828
GRAPHICAL: false
2929

30+
# Set this to true when you use an (ICPC) AWS machine
31+
AWS: true
32+
3033
# Set this when on the blue network at the World Finals where no
3134
# internet access is available and "packages" must be used as APT repo
3235
# server.

provision-contest/ansible/roles/judgedaemon/tasks/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,21 @@
5454
regexp: '^GRUB_CMDLINE_LINUX_DEFAULT='
5555
line: "GRUB_CMDLINE_LINUX_DEFAULT=\"{{ procline }}\""
5656

57+
- name: Pre-generate the kernel flags for ansible usage (specific AWS)
58+
# AWS machines overwrite the variable from the last step in another file
59+
# console: https://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/configure-kernel.html
60+
# nvme_core: https://docs.aws.amazon.com/ebs/latest/userguide/nvme-ebs-volumes.html#timeout-nvme-ebs-volumes
61+
when: AWS
62+
set_fact:
63+
procline_aws: "console=tty1 console=ttyS0 nvme_core.io_timeout=4294967295 {{ procline }}"
64+
65+
- name: Add cgroup kernel parameters for AWS machines
66+
when: AWS
67+
lineinfile:
68+
dest: /etc/default/grub.d/50-cloudimg-settings.cfg
69+
regexp: '^GRUB_CMDLINE_LINUX_DEFAULT='
70+
line: "GRUB_CMDLINE_LINUX_DEFAULT=\"{{ procline_aws }}\""
71+
5772
- name: Check cgroup kernel parameters
5873
command: cat /proc/cmdline
5974
register: kernel_cmdline

0 commit comments

Comments
 (0)