Admin/Competition Setup
Overview
This document describes the Administrator setup for running a normal competition with registration, or running competitions on the player side with a single registration for testing purposes.
The basic steps for running a competition (from scratch) are:
- Unpack the Admin files directory
- Run Pre-registration
- Pre-register Players: Teams register a team name, password, and team member names in order to be considered for later competitions
- Run admin.jar (Registration and Competition will result)
- Startup Players: Players will (automatically) register with the administrator, and wait for the competition time.
- Competition runs/completes
- Shutdown Players
For the sake of this document, we will assume that we have created a directory in which to place our files (say setup), within it we have created two subdirectories, admin and players, and you have access to a number of terminals/shell prompts.
Main Competition Setup
The normal competition setup is essentially what is described above... but here are the details.
Setup the Admin Files
- Copy admin.jar into setup/admin/
- Within setup/admin/, run:
jar -xf admin.jar files/config.txt prereg/prereg.html
- Also run:
mkdir -p files/history
Pre-registration
- Within setup/admin/ run:
java -cp admin.jar prereg.PreRegServer 7000
- Open the prereg page in FireFox:
firefox ./prereg/prereg.html
- Submit registrations for Players/Teams to be involved.
- Close the PreRegServer (hit enter in the Prereg terminal)
Running a Main Competition
Starting the administrator is quite simple. There are two major running modes of the Admin, for running competitions at absolute and/or relative dates.
Absolute:
From within setup/admin/ run:java -jar admin.jar "MM/DD/YYYY hh:mm:ss am|pm"Where the string is the starting date/time of the competition (fill in the date/time/am/pm accordingly). Registration will be open until the competition time. Player that are registered will be contacted to take each of their turns in the contest.
Relative:
From within setup/admin/ run:java -jar admin.jar --relative SECONDSWhere SECONDS is the number of seconds (i.e., an integer) before the competition starts. Registration will be open until the competition time, and those registered will be contacted to take their turns.
Once the Admin is running, you can start your player(s):
java -jar player.jar 9000 server.domain.name "TeamName" "Password"Where 9000 is the port we've chosen for our Player to comunicate on, server.domain.name is the address/machine where the Admin is running. For course competitions, the Admin address will be given by the course staff. For local competitions (Admin/Players running on the same machine) you can use the local host address: 127.0.0.1
No Registration Setup
While testing players it is usful to be able to run several competitions without the need to continually register players. We basically run a separate registration once, and reuse the Player address/port when contacting them.
Separate Regististration
- Choose free Ports for the Players (say 9000-9005)
- Within setup/admin/
java -cp admin.jar reg.RegServer 8000
- Within setup/players/ register each of the
Players:
java -cp player.jar player.Register 9000 server.domain.name:8000 "Team1" "Pass1" java -cp player.jar player.Register 9001 server.domain.name:8000 "Team2" "Pass2" ... - Close the RegServer (hit enter in the Reg terminal)
Running a noreg Competition
- Start each Player (without registration):
java -jar player.jar 9000 --noreg java -jar player.jar 9001 --noreg ... - Run the Admin (also without registration)
Absolute:java -jar admin.jar --noreg "MM/DD/YYYY hh:mm:ss am|pm"
Or Relative:java -jar admin.jar --noreg --relative SECONDS