auca-judge-agent is a remote control agent for build and test execution inside containers for the auca-judge system.
auca-judge-agent allows to move the build and test container runtime to a separate host from the auca-judge-back.
The fat version of auca-judge-agent is based on Ubuntu Docker images. Use it if the target build and test system is not available on Alpine Linux.
auca-judge-agent is part of the auca-judge system to test code submissions to help conducting laboratory classes and programming contests at AUCA.
- UI front
- Queue service
- Task runner
- Container's control and communication endpoint
- Images for various programming languages and environments
- Go
>=1.5
auca-judge-agent searches for configuration files in the JSON format in the following locations
- /etc/auca-judge-agent-configuration.json
- ~/.auca-judge-agent-configuration.json
- ./auca-judge-agent-configuration.json
- file specified in the
AUCA_JUDGE_AGENT_CONFIGURATION
environment variable
Multiple configuration files are merged together. Values in files with higher priority override values from files with lower priority. For example, fields from ./auca-judge-agent-configuration.json will override values from /etc/auca-judge-agent-configuration.json.
Every configuration option in configuration files can be overriden by a command line flag with the same name.
{
"option": "value",
"option": ["value", "value"],
"option": 42
}
-
"port": number
(--port=number)a port to bind to (set to 8080 by default)
-
"command": string
(--command=string)a command to start
The agent searches for an executable in all locations specified by the
PATH
environment variable. If the command contains a slash, it is tried directly and the search throughPATH
is not performed. -
"arguments": [string, ...]
(--arguments=string,string,...)a list of arguments to the command
-
"shell": string
(--shell=string)a command with all its parameters to be run in a shell with
/bin/sh -c
shell
overrides thecommand
andarguments
options. -
"workingDirectory": string
(--workingDirectory=string)a path to a directory to switch to before starting a command or shell (set to the process's current working directory
"."
by default) -
"artifacts": [string, ...]
(--artifacts=string,string,...)a list of generated files to send back
{
"port": 7070,
"command": "gcc",
"arguments": ["-o", "submission", "submission.c"],
"workingDirectory": ".",
"artifacts": ["submission"]
}
{
"shell": "./compile.sh",
"workingDirectory": ".",
"artifacts": ["submission"]
}
{
"shell": "./submission < input > output",
"artifacts": ["output"]
}
auca-judge-agent responds to the following HTTP request
POST /process
{
"files": {
"file name": "file data as a Base64 string",
"file name": "file data as a Base64 string"
}
}
For the /process
request auca-judge-agent saves every file to the current
working directory, starts a command or shell specified in the configuration,
waits for it to exit, and returns the exit status, captured output streams, and
all generated artifact files specified in the configuration.
{
"status": 0,
"stdout": "standard output",
"stderr": "standard error",
"artifacts": {
"file name": "file data as a Base64 string",
"file name": "file data as a Base64 string",
"file name": null
}
}
docker-compose build
to build the image
auca-judge-agent is licensed under the MIT license. See LICENSE for the full license text.
auca-judge-agent was created by Dmitrii Toksaitov.