This is an attempt to resolve #46 by allowing checkers to run on a different server (or, in fact, multiple different servers) from the main catsoop instance. We ran 6.009 on this branch in spring 2020, and it seemed to work just fine (no major hiccups).
Under this implementation, setting up multiple checkers requires a few things:
- courses need to be specified inside of Git repositories
- the webserver and all remote checkers’ courses need to be named the same, and be cloned from the same sources
- the webserver’s copy needs to be set up so that its working copy tracks
origin/master(so that when checkers run git pull, they end up at the same revision as the webserver)
- the checker machines need to be able to pull those repos non-interactively (
git pullat the checkers’ user needs to run without any prompts of any kind). this probably means publickey authentication, and doing a clone or pull ahead of time to get through the prompt about the repo host’s keys
- courses’ checkers cannot rely on accessing any files outside the course tree (though the webserver accessing files outside for the purposes of determining what to display is fine). this means no checkers that rely on reading logs, too, unfortunately.
- on all machines, clone the course repositories and make sure they’re pointing to the right spots
- on all machines, set
cs_remote_checker_shared_secretto a bytes object (not str) containing a small shared secret (i used 32-byte random alphanumeric characters, but any bytestring should be fine, really)
'db'on both machines (otherwise file uploads would be stored in a place the checker can’t access)
cs_url_rooton all machines (all need to be accessible, since we rely on bidirectional communication via POST requests to a _util page)
cs_remote_checker_foron the remote checkers to the
cs_url_rootof the web server
- configure cs_checker_parallel_checks, etc, as necessary on the remote checkers.
Then start the web server as normal:
$ catsoop start
You can also start the checkers the same way, or, since they don’t need a reporter or other things like that, you can use:
$ catsoop start -o web -o checker