Peteramati is a Web system for collecting, evaluating, and grading student programming assignments. It collects student assignments using Git. It uses Linux containers to run student assignments; assignment code is segregated from the main machine. Students can run test code themselves.
Peteramati is configured primarily through the psets.json file. See
doc/psetsjson.md for more information.
-
Run
lib/createdb.shto create the database. Uselib/createdb.sh OPTIONSto pass options to MySQL, such as--userand--password. Many MySQL installations require privilege to create tables, so you may needsudo lib/createdb.sh OPTIONS. Runlib/createdb.sh --helpfor more information. You will need to decide on a name for your database (no spaces allowed). -
Edit the
conf/options.phpfile with information about your class. The username and password information for the conference database is stored here. -
Configure your web server to access Peteramati. The right way to do this depends on which server you’re running.
Apache: Add a
<Directory>tohttpd.conf(or one of its inclusions) for the Peteramati directory; anAliasredirecting your preferred URL path to that directory; and aFallbackResourcefor that URL path. This example makes/testclasspoint at a Peteramati installation in /home/kohler/peteramati:# Apache 2.4 and later: <Directory "/home/kohler/peteramati"> Options Indexes Includes FollowSymLinks AllowOverride all Require all granted FallbackResource /testclass/index.php </Directory> Alias /testclass /home/kohler/peteramatiNote that the first argument to Alias should NOT end in a slash. If you get an Error 500, see “Configuration notes”.
Everything under Peteramati’s URL path (here,
/testclass) should be served by Peteramati. This normally happens automatically. However, if the URL path is/, you may need to turn off your server’s default handlers for subdirectories such as/doc.Nginx: Configure Nginx to access
php-fpmfor anything under the Peteramati URL path. All accesses should be redirected toindex.php. This example, which would go in aserverblock, makes/testclasspoint at a Peteramati installation in /home/kohler/peteramati (assuming that the runningphp-fpmis listening on port 9000):location /testclass/ { fastcgi_pass 127.0.0.1:9000; fastcgi_split_path_info ^(/testclass)(/.*)$; fastcgi_param SCRIPT_FILENAME /home/kohler/peteramati/index.php; include fastcgi_params; }You may also set up separate
locationblocks so that Nginx directly serves static files under/testclass/images/,/testclass/scripts/, and/testclass/stylesheets/. -
Build the
pa-jailprogram and other helper programs.cd jail && makeThe
pa-jailprogram must be set-uid/gid root, so you may need to build it usingsudo make. -
XXX Configure conf/gitssh_config and conf/sshid
-
XXX Configure the jail