Skip to content

bccfilkom-cp/domjudge-docker

Repository files navigation

DOMJudge Docker Deployment

DOMJudge Docker Deployment made easy for ubuntu distro.

⚙️ How to use

There are two ways how to setup domjudge docker

✨ Basic Setup

Basic setup needs you to install the docker already in the VM that you intend to host as the domserver and judgehost. It expects you to already enable cgroupv2

  1. Clone this repository
https://github.com/bccfilkom-cp/domjudge-docker.git #https
git@github.com:bccfilkom-cp/domjudge-docker.git #ssh
  1. Copy the environment files
cp .env.example .env
cp .db.env.example .db.env  
  1. Configure the environment variables in those files

  2. Make the shell script to be executeable by running this command

chmod +x prepare-contest-env.sh
  1. Fill needed variables in the shell script

  2. Run the shell script

./prepare-contest-env.sh

🔥 Ansible Setup

With ansible, everything is fast to the moon and it's all automated. Ansible setup also takes care docker installation and enable cgroup for you! Note that ansible expects your VM OS to be ubuntu.

  1. Make the ansible setup script to be executeable
chmod +x ansible-setup.sh
  1. Fill needed variables in inventory files including hosts and vars
  2. Run the ansible setup script
./ansible-setup.sh
  1. If you just need to clone and deploy without installing the docker, you can run deploy playbook
cd ansible
ansible-playbook -e @inventory/vars.yaml playbooks/deploy.yml
  1. SSH to your VM and go to ~/domjudge-docker/output.txt to see the shell process result. You can also find the admin password in the file. Make sure to delete the file after.

💥 Spawn Judgehost Container

To spawn Judgehost containers in different host than the DOMserver host, you can look up start-judgehost.sh shell script, fill the needed variables and execute it in your local machine or separate machine than the DOMserver machine.

📝 NOTES

Please read this notes for further information regarding to deploy DOMJudge docker.

  1. Use host.docker.internal as DOMSERVER_IP_ADDR in shell script if you want to run the judgehost in the same host as the domserver

  2. If the judgehost is running on different host than the domserver, then you can't instantly run the shell script since the script expects you to run judgehost on the same host as the domserver.

  3. If judgehost failed to start and the judgehost container logs said auth failed, then you need to change judgehost account password in domjudge jury interface and restart the judgehost container

  4. To reset admin's password, you can execute the bellow command

docker exec -it domjudge-srv /opt/domjudge/domserver/webapp/bin/console domjudge:reset-user-password admin

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

DOMjudge Docker Config for Contest Environment, judgehost included

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages