
AuTA
Runtime requirements
Core
AuTA's core requires a Java 11 runtime and MongoDB running on localhost. Optionally Graphviz can be installed to enable UML generation.
Furthermore, the path /srv/auta
must be readable and writable by the user AuTA runs as.
Worker
Like the core, the worker requires a Java 11 runtime.
Usage
Core
Jar
Start the core as follows:
java -jar core.jar
Docker
docker run f00f/auta-core
The following environment variables can be passed:
Environment variable | Description | Required |
---|---|---|
JAVA_ARGS | Arbitrary command line arguments to pass to the java process | 🙅 |
AUTA_ARGS | Arbitrary command line arguments to pass to the AuTA process | 🙅 |
The server allows for set-up using username admin
and password admin
. Configure the server
as needed and restart the process.
Worker
Workers can be started with the worker jar or the worker docker image:
Jar:
java -jar worker.jar name=$NAME host=$HOST api-token=$APITOKEN api-protocol=$PROTOCOL api-port=$PORT
A table of arguments and their description:
Argument | Description | Required | Default |
---|---|---|---|
name | The name of this worker | 🙅 | Generated |
api-token | Worker API token | 👌 | N/A |
host | The host on which to reach the core | 🙅 | localhost |
api-protocol | Protocol to use for the API (http/https) | 🙅 | https |
docker-api | The URI to the Docker API | 🙅 | unix:///var/run/docker.sock |
Docker:
docker run -e {environment variables} f00f/auta-worker
As opposed to running the worker with the jar, all environment variables are mandatory.
A table of environment variables that should be passed to the container:
Environment variable | Description | Required |
---|---|---|
COREADDRESS | Address to reach the core on | 👌 |
APIKEY | Worker API token | 👌 |
APIPORT | Port to reach the API on | 👌 |
APIPROTOCOL | Protocol to use for the API (http/https) | 👌 |
JAVA_ARGS | Arbitrary command line arguments to pass to the java process | 🙅 |
AUTA_ARGS | Arbitrary command line arguments to pass to the AuTA process | 🙅 |
Devops
AuTA can be integrated in GitLab's Auto DevOps using
Trampoline, which is a lightweight Docker container
that can zip a repository, send them to AuTA's /api/v1/assignment/{aid}/submission/{sid}/direct-upload
endpoint and accepts a report.json which can then be uploaded as an artifact. Optionally, AuTA can
produce a more readable HTML formatted report if the optional ?format=html
parameter is passed by
trampoline when polling the GET /api/v1/assignment/{aid}/submission/{sid}
endpoint.
This endpoint creates a new submission for the given sid, which should be equal to the SHA-1 commit hash that GitLab generates. If a submission already exists in AuTA's database (for example if the pipeline for a commit is run twice) then AuTA will delete previous submission data.