Monarch Of The Hill - base infrastructure for computer-based puzzle contests
Go to file
Neale Pickett b6dde238f6 Combine points log and open puzzles call 2018-05-23 20:37:49 +00:00
bin Look for "until" file to disable contest by time 2018-01-28 10:24:49 -07:00
docs Combine points log and open puzzles call 2018-05-23 20:37:49 +00:00
example-puzzles Add a counting example puzzle 2018-04-12 14:58:12 +00:00
src Mothball work 2018-05-10 03:52:52 +00:00
tools Rewrite devel server to be more reliable, accept seed in URL 2018-05-11 21:45:40 +00:00
www Merge branch 'mothv3' of https://github.com/dirtbags/moth into mothv3 2018-05-11 14:27:38 +00:00
.dockerignore More dockering 2017-09-11 16:12:22 +00:00
.gitignore Reworked some basics of how the Puzzle class works. Shouldn't look to different from the outside. 2016-10-17 13:24:54 -06:00
Dockerfile.moth Add a fifth logo 2018-05-10 16:54:36 +00:00
Dockerfile.moth-compile Rewrite devel server to be more reliable, accept seed in URL 2018-05-11 21:45:40 +00:00
Dockerfile.moth-devel Rewrite devel server to be more reliable, accept seed in URL 2018-05-11 21:45:40 +00:00
Dockerfile.package-puzzles Move to base alpine image so I can get PIL 2017-09-14 15:06:07 +00:00
LICENSE.md Change license to comply with LANL legal request 2017-09-08 20:58:33 +00:00
README.md Make an actually working server, hopefully 2017-02-05 16:42:41 -07:00
devel.sh update usage message 2017-09-15 10:27:53 -06:00
install.sh Make CGIs executable on installation 2017-06-17 06:27:01 +00:00
setup.cfg devel-server use new Puzzles obj. Needs cleanup. 2016-10-18 05:02:05 +00:00

README.md

Dirtbags Monarch Of The Hill Server

This is a set of thingies to run our Monarch-Of-The-Hill contest, which in the past has been called "Tracer FIRE", "Project 2", "HACK", "Queen Of The Hill", "Cyber Spark", and "Cyber Fire".

Information about these events is at http://dirtbags.net/contest/

This software serves up puzzles in a manner similar to Jeopardy. It also tracks scores, and comes with a JavaScript-based scoreboard to display team rankings.

How everything works

This section wound up being pretty long. Please check out the overview for details.

Getting Started Developing

If you don't have a puzzles directory, you can copy the example puzzles as a starting point:

$ cp -r example-puzzles puzzles

Then launch the development server:

$ python3 tools/devel-server.py

Point a web browser at http://localhost:8080/ and start hacking on things in your puzzles directory.

More on how the devel sever works in the devel server documentation

Running A Production Server

XXX: Update this

How to install it

It's made to be virtualized, so you can run multiple contests at once if you want. If you were to want to run it out of /srv/moth, do the following:

$ mothinst=/srv/moth/mycontest
$ mkdir -p $mothinst
$ install.sh $mothinst

Yay, you've got it installed.

How to run a contest

mothd runs through every contest on your server every few seconds, and does housekeeping tasks that make the contest "run". If you stop mothd, people can still play the contest, but their points won't show up on the scoreboard.

A handy side-effect here is that if you need to meddle with the points log, you can just kill mothd, do you work, then bring mothd back up.

$ cp src/mothd /srv/moth
$ /srv/moth/mothd

You're also going to need a web server if you want people to be able to play.

How to run a web server

Your web server needs to serve up files for you contest out of $mothinst/www.

If you don't want to fuss around with setting up a full-featured web server, you can use tcpserver and eris, which is what we use to run our contests.

tcpserver is part of the uscpi-tcp package in Ubuntu. You can also use busybox's tcpsvd (my preference, but a PITA on Ubuntu).

eris can be obtained at https://woozle.org/neale/g.cgi/net/eris/about/

$ mothinst=/srv/moth/mycontest
$ $mothinst/bin/httpd

Installing Puzzle Categories

Puzzle categories are distributed in a different way than the server. After setting up (see above), just run

$ /srv/koth/mycontest/bin/install-category /path/to/my/category

Permissions

It's up to you not to be a bonehead about permissions.

Install sets it so the web user on your system can write to the files it needs to, but if you're using Apache, it plays games with user IDs when running CGI. You're going to have to figure out how to configure your preferred web server.