#66 Remote Checkers

Closed
hz wants to merge 50 commits from remote_checkers into master
hz commented 1 month ago

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 pull at 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.

Then:

  • 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_secret to a bytes object (not str) containing a small shared secret (i used 32-byte random alphanumeric characters, but any bytestring should be fine, really)
  • set cs_upload_management to 'db' on both machines (otherwise file uploads would be stored in a place the checker can’t access)
  • set cs_url_root on all machines (all need to be accessible, since we rely on bidirectional communication via POST requests to a _util page)
  • set cs_remote_checker_for on the remote checkers to the cs_url_root of 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
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 pull` at 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. Then: * 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_secret` to a **bytes** object (not str) containing a small shared secret (i used 32-byte random alphanumeric characters, but any bytestring should be fine, really) * set `cs_upload_management` to `'db'` on both machines (otherwise file uploads would be stored in a place the checker can't access) * set `cs_url_root` on all machines (all need to be accessible, since we rely on bidirectional communication via POST requests to a _util page) * set `cs_remote_checker_for` on the remote checkers to the `cs_url_root` of 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
hz added the
enhancement
label 1 month ago
hz added this to the 2020.9.0 milestone 1 month ago
hz commented 1 month ago
Owner

Closing in favor of #76

Closing in favor of #76
hz closed this pull request 1 month ago
This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.