Moe can be installed in two possible ways:
Just invoke make
and edit the top-level config file to suit
your needs, leaving TEST_USER
commented out.
In this setup, everything lives in the source tree you have started with and you don't need any special privileges for neither installation or running of the evaluator.
Beware: The evaluated programs are NOT fully separated from the evaluation environment and they could interfere with it. Use it only for playing with the package, not for any real competition.
The recommended way is to let the evaluator use two user accounts. One (let's
call the user moe
) runs the evaluator and keeps all secret
files like the test data, another one (mo-test
) runs the tested
programs. There can be multiple test users if you want to run several evaluators
in parallel. However, in practice the evaluation is so fast that this is seldom
needed.
How to set up this installation:
make
to compile all programs.
config
to suit your needs, in particular set MO_ROOT
,
EVAL_USER
, EVAL_GROUP
, TEST_USER
and TEST_USERS
.
$MO_ROOT
(here we will assume that it's set to /aux/mo
moe:x:65000:65000:MO Evaluator:/aux/mo/eval/moe:/bin/bash mo-test1:x:65001:65000:MO Tester 1:/aux/mo/eval/mo-test1:/bin/bash mo-test2:x:65002:65000:MO Tester 2:/aux/mo/eval/mo-test2:/bin/bash
moe:x:65000:
bin/mo-install
as root to create the directory hierarchy under $MO_ROOT
install all parts of the evaluator there and set the correct access rights.
moe
and do everything else from there.
mo-create-public
to update the public data available to contestants
according to the contents of the public
directory
mo-create-testusers
to update the home directory of the mo-test
users.
Moe can either take care of the home directories of contestants or use an existing infrastructure. In the former case, you need to do the following:
CT_UID_MIN
and CT_UID_MAX
in the top-level config file.
(The evaluator users described above should be outside this range!).
mo00:x:65100:65100:MO Contestant 00:/aux/mo/users/mo00/mo00:/bin/bash ... mo99:x:65199:65199:MO Contestant 99:/aux/mo/users/mo99/mo99:/bin/bash
mo00:x:65100: ... mo99:x:65199:
bin/mo-create-logins
script to automate this
process, including printing of leaflets with passwords, but you will probably need
to customize the script.)
bin/mo-create-contestants
as root to create the home directories.
(The permissions are set up so that the contestants cannot see each other's directory
even if they want. However you still need to make sure that there is no directory
all of them can write to, like the system-wide /tmp
. In our contest,
the users work on their own machines and only the home directories are shared across
the network, so this problem doesn't arise.)
limits.conf
for that, because sshd
applies the limits as root, so you either
limit root or the limits don't work at all. In such cases, modify /etc/profile
:
if [ $UID -ge 65100 -a $UID -le 65199 ] ; then ulimit -Sc 8192 # core file size ulimit -SHu 32 # processes ulimit -SHn 256 # max open files ulimit -SHv 262144 # max virtual memory fi