Skip to content
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

Configure judgehost on AWS #117

Merged
merged 1 commit into from
Apr 6, 2024
Merged
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
3 changes: 3 additions & 0 deletions provision-contest/ansible/group_vars/all/all.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ ICPC_IMAGE: false
# Set this to true when you are using a graphical desktop
GRAPHICAL: false

# Set this to true when you use an (ICPC) AWS machine
AWS: true

# Set this when on the blue network at the World Finals where no
# internet access is available and "packages" must be used as APT repo
# server.
Expand Down
15 changes: 15 additions & 0 deletions provision-contest/ansible/roles/judgedaemon/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@
regexp: '^GRUB_CMDLINE_LINUX_DEFAULT='
line: "GRUB_CMDLINE_LINUX_DEFAULT=\"{{ procline }}\""

- name: Pre-generate the kernel flags for ansible usage (specific AWS)
# AWS machines overwrite the variable from the last step in another file
# console: https://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/configure-kernel.html
# nvme_core: https://docs.aws.amazon.com/ebs/latest/userguide/nvme-ebs-volumes.html#timeout-nvme-ebs-volumes
when: AWS
set_fact:
procline_aws: "console=tty1 console=ttyS0 nvme_core.io_timeout=4294967295 {{ procline }}"

- name: Add cgroup kernel parameters for AWS machines
when: AWS
lineinfile:
dest: /etc/default/grub.d/50-cloudimg-settings.cfg
regexp: '^GRUB_CMDLINE_LINUX_DEFAULT='
line: "GRUB_CMDLINE_LINUX_DEFAULT=\"{{ procline_aws }}\""

- name: Check cgroup kernel parameters
command: cat /proc/cmdline
register: kernel_cmdline
Expand Down
Loading