-
Clone the repo.
-
Create
.envfile with the following variables and required values:RABBITMQ_HOSTNAME=192.254.254.254 RABBITMQ_USERNAME=guest RABBITMQ_PASSWORD=guest HOST_XFS_VOLUME=/some/path CONTAINER_NAME=Some-Docker-Container-Name
RABBITMQ_HOSTNAME,RABBITMQ_USERNAME, andRABBITMQ_PASSWORDprovide details needed to access the rabbitmq.HOST_XFS_VOLUMEis a path on the host that will run the automated code. This needs to refer to the location where overseer containers will store their work. Overseer uses this to setup a volume in each container it creates. When multiple overseer instances are run this path needs to be unique for each instance. Overseer will createsandboxandoutputfolders in this location.CONTAINER_NAMEis optional (defaults tooverseer-container) and provides the name of the container that overseer creates. If there are multiple overseer instances then they must have unique container names.
-
Easiest option is to setup rabbitmq alongside overseer in the same docker network, and have it setup to run with the management interface.
-
Alternatively:
-
Configure your machine to add an alias IP address to en0 (or whatever network device you are using) as the value specified to the key
RABBITMQ_HOSTNAMEin the .env file before. On MacOS, you can use:sudo ifconfig en0 alias 192.254.254.254 255.255.255.0 -
Run RabbitMQ server:
docker run -d --hostname my-rabbit --name some-rabbit -p 5672:5672 -p 15672:15672 rabbitmq:3 -
Enable RabbitMQ management plugin:
docker exec -t some-rabbit rabbitmq-plugins enable rabbitmq_management
-
-
Run overseer using:
bundle exec ruby ./app.rb
- When overseer starts is listens to the q.tasks queue on the ontrack exchange of the rabbitmq and awaits any messages marked as task.submission. When a submission is received the message triggers action in overseer.
- Params received include:
output_path: where to store automated assessment resultssubmission: the path to the submission zip file or folderassessment: the path to the submission assessment resourcestimestamp: the time of the submissiontask_id: the task associated with the submissionoverseer_assessment_id: the overseer assessment iddocker_image_name_tag: the tag of the docker image to run the scripts within
- Overseer starts by unpacking the submission along with the assessment resources to the working directory. Files in the assessment resources will override those in the submission if needed.
- Once the files are in place Overseer starts a container with the indicated
CONTAINER_NAMEusing the image details from the assessment resources and runs two scripts:build.shis run and if the result is 0 it runsrun.sh.- Anything written to standard output and standard error from these scripts will be collected in the output message for the task.
- Each of these scripts is passed a path to a yaml file where comment and status changes are stored.
build.shshould write messages to thebuild_messagekey in the yaml file.run.shshould write messages to therun_messagekey in the yaml file.- Both build and run scripts can write a new status to
new_status. - The exit status of the build and run steps is appended to the output text collected from standard out.
- When both scripts have been run, a message is returned to Doubtfire/OnTrack using the
overseer.resultrouting key to theq.overseerof theontrackexchange. This contains the task id, timestamp, and overseer assessment id. The output text and yaml files are also available to OnTrack.