Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
139 lines (108 sloc) 4.63 KB
# DOMjudge-live image
This DOMjudge-live system contains a ready-to-use copy of the DOMjudge
programming contest jury system. It runs on the Debian GNU/Linux
operating system and the Apache webserver.
## Booting the image
The image contains a default minimal Debian installation with
recently released DOMjudge Debian packages and dependencies added.
Everything is preconfigured for running a (test) contest.
The boot menu has multiple options to start any combination of
domserver and/or judgehost. These correspond to systemd targets
(a.k.a. sysV "runlevels") and can be changed by executing
systemctl isolate <target>.target
where `<target>` is one of:
default = plain Debian (no domserver or judgehost)
domjudge-all = run both domserver and judgehost (the default)
domserver = run domserver only
judgehost = run judgehost with judgedaemon only
A script `dj-live` is included to perform some basic tasks, such as
changing passwords from the defaults. Run it without arguments on the
console for more information.
## Running separate judgehosts
If you want to run additional judgehosts on separate machines, then
the DOMjudge REST API credentials on the domserver need to be
synchronized to each judgehost and edited to point to the domserver.
Furthermore, each judgehost must be assigned a new, unique hostname
(which need not necessarily match its DNS name).
## Accessing the web interfaces
The web interfaces for jury, team, and public can be found under
`http://<hostname>/domjudge/{jury,team,public}` respectively. Here
`<hostname>` is the DNS name of the DOMjudge-live system. Initially
there is the user 'admin' with password 'admin'.
## Running the image from a harddisk or as virtual machine
This image can be written to an USB stick or similar, but it can also
be written to a harddisk or used as virtual machine image, e.g. to use
it as the base of a more permanent DOMjudge instance. In that case you
might want to resize the image beyond its preset size (currently
When the image is written to a harddisk, it is probably easiest to
boot from a rescue CD and run `parted` or `gparted` from it.
Resizing an image file is easiest using the libguestfs tools.
First, create a new image file of the preferred size and format, e.g.
for a raw format:
truncate -s 6G <resized.img>
Then run 'virt-resize' from the libguestfs toolset (as root):
virt-resize --expand /dev/sda2 <original.img> <resized.img>
This extends the partition that contains the root (ext4) filesystem,
as well as the filesystem itself.
For VirtualBox: running the following command gives you a VDI image
which can be loaded directly by VirtualBox:
vboxmanage convertfromraw domjudge-live_YYYY-MM-DD.img \
## Generating the image from sources
NOTE: these images are not Debian-live systems in the sense of but plain Debian installations that can
be copied onto an USB stick and booted from there. That is, any
changes are persistently stored on the image.
This image can be generated semi-automatically from sources.
Obtain a copy of the DOMjudge packaging Git repository:
git clone
and chdir to the `domjudge-packaging/live-image` subdirectory.
First, build a Debian image. Download a Debian netinst CD for
stable/amd64 from ``. Make the file
`preseed.cfg` available on a URL that can be accessed in the next
Create a file (or use a real block device) of at least 4GB to put the
image on. Now boot the netinst CD in a VM like qemu/kvm:
kvm -boot d -cdrom <debian-netinst.iso> -hda <domjudge-live-target.img>
hit ESCAPE on the Debian installer boot screen and specify the
following kernel boot options:
auto url=<webhost>/<path>/preseed.cfg
where the `preseed.cfg` file is made available at that url. Now a
complete Debian system should automatically be installed onto the
specified image.
After rebooting the image, optionally copy SSH keys for easier access:
ssh-copy-id root@<dhcp_hostname>
Note that the root password is set to 'domjudge'.
Before running the DOMjudge-live script below, it is
advisable to first run as root the script to
generate a unique root partition UUID and run fsck:
sudo ./ <domjudge-live-target.img>
Now run the DOMjudge-live specific install script:
./ <dhcp_hostname>
This will generate `extra-files.tgz` from the subtree `files`,
copy and extract it onto the image and run `` there.
When this is finished, you should have a freshly generated
DOMjudge-live image.