Skip to content

v0.5.0 JSON files documentation

Prasad Talasila edited this page Jan 16, 2019 · 2 revisions

This page contains the documentation for all the JSON files. These JSON files are stored as Ansible Jinja2 template files. During installation, the template files are converted to JSON files.

Files at deploy/plays/templates

Main Server

/main_server/APIKeys.json

- keys -> an array containing instructor's password for logging into admin area

Please see an example.

/main_server/course.json

- name                 -> course name
- course number        -> official course number
- instructor in charge -> name of lead instructor for the course
- other instructors    -> co-instructors, TAs / PAs specified in array format

Please see an example.

/main_server/conf.json

- load_balancer -> Provides the hostname and port of the load_balancer which can 
                   generate the URL for load balancer  ('https://' + hostname + ':' +  port = URL)
- database      -> Provides the authentication credentials for the MYSQL database.
                   Name of the database used in MYSQL = AutolabJS
- gitlab        -> Provides the authentication credentials for Gitlab.
- main_server   -> The port at which the Main server can be accessed. 

Please see an example.

/main_server/labs.json

- Labs -> An array of objects with each element describing the properties:-
             1. Lab Number
             2. Start Date and Time of the lab
             3. End Date and Time of the lab
             4. Hard deadline for lab submission
             5. Penalty
         NOTE:- Upon submission between the End time of the lab and the hard deadline penalty will be imposed.
                And after the hard deadline, no submissions will be accepted.

Please see an example.

Load Balancer

/load_balancer/nodes_data_conf.json

- Nodes          -> An array of objects in which element provides the URL ('https://' + hostname + ':' +  port =  URL) 
                    of all execution nodes currently on-line and connected to the load balancer.
- server_info    -> Provides the URL ('https://' + hostname + ':' +  port = URL) of the main server.
- gitlab         -> Provides the URL ('https://' + hostname + ':' +  port = URL) of the Gitlab server.
- database       -> Provides the authentication credentials for the MYSQL database.
                    Name of the database used in MYSQL = AutolabJS
- load_balancer  -> Provides the port though which the load balancer can be accessed.
- maxLogLength   -> Maximum size of the log file used by load balancer. Default value is  `256kb`.

Please see an example.

Execution Nodes

/execution_node/conf.json

- load_balancer  -> Provides the URL ('https://' + hostname + ':' +  port = URL) of the load balancer all execution 
                    nodes are connected to.
- gitlab         -> Provides the URL ('https://' + hostname + ':' +  port = URL) of the Gitlab server.
- execution_node -> Provides the URL ('https://' + hostname + ':' +  port = URL) of the execution node.

Please see an example.

/execution_node/scores.json

- node_details       -> Provides the URL ('https://' + hostname + ':' +  port = URL) of the execution node.
- submission_details -> Provides the following info for each submission that the execution node processed :- 
                          1. Marks
                          2. Comments
                          3. ID of the submission
                          4  Lab number of the submission
                          5. Latest commit before submission
                          6. Time of submission
                          7. Status of submission
                          8. Penalty incurred by student due to late submission
                          9. Unique Socket ID of the student

Please see an example.

Util

/util/logger.json

- roles        -> This array contains the roles of all the components that can create a correctly configured logger 
                  object. 
- maxSize      -> This is the max size of any log file generated by the logger.
- logDirectory -> This is the default log directory that will store the generated log files.

Please see an example.

Status response given by the /status page

 - components       -> An array containing the status of all the execution nodes and load balancer. Each array 
                       element has the following properties.
                       - role     -> Specifies the component is an execution node or load balancer
                       - hostname -> The host name and port of the component can be used to generate the URL of the 
                       - port     -> component. ('https://' + hostname + ':' +  port = URL)
                       - status   -> Specifies whether the component is up or down

 - job_queue_length -> The number of jobs pending for evaluation that are yet to be assigned an evaluation node.
 - timestamp        -> Time stamp when status was taken for all the components.     

An example status message would be as:

{ 
   "components":[
      {"role":"execution_node","hostname":"autolab.bits-goa.ac.in","port":"8082","status":"up"},  
      {"role":"load_balancer","hostname":"autolab.bits-goa.ac.in","port":"8081","status":"up"}
   ],
   "job_queue_length":0,
   "timestamp":"Wed Jan 17 2018 22:11:18 GMT+0530 (IST)"
}

Clone this wiki locally
You can’t perform that action at this time.