v0.5.0 Configuration Guide
Configure the AutolabJS components by editing the configuration parameters in the inventory file (
Note that you are encouraged to use domain names instead of IP address of the machines. In case a domain name is not allocated to the machine, you can use the IP address for installation.
AutolabJS is installed on a server machine which has a host name / IP address. The host name of server machine is represented using
ansible_hostvariable which is set to
localhostas default. You need to change
ansible_hostto either host name or IP address of the server machine. Otherwise, the AutolabJS installation will not be accessible on other computers.
This configuration setting is applicable if you run openssh server. SSH server allows remote access to a server. One of the AutolabJS components, namely GitLab, also runs SSH service for remote access to git repositories. GitLab assumes that port 22 is available for running SSH service. Thus if you have openssh server running in default configuration, GitLab will not be able to provide access to git repositories.
One way to solve the problem is to change the port at which the SSH service is provided by the openssh server. You need to modify
Portvariable in (
/etc/ssh/sshd_config) to a non-conflicting port (say 2222). The new SSH port need to be assigned to
sys_ssh_portvariable. This variable is used to properly set the UFW firewall settings.
Passwords provide access control to different components of AutolabJS. Do remember to change the default passwords.
The passwords that need to be changed are:
Password for Variable Default Value Explanation Database mysql_root_pass root Root password for MySQL DB Gitlab gitlab_password 12345678 Root password for GitLab Course IC ms_admin_pass 12345678 Course Instructor's password for updating labs on website Root Certificate password autolabjs Password for Root CA certificate
You can change the course settings to suit the your course offering.
Item Variable Default Value Explanation Course Name course_name Object Oriented Programming Can be any valid string Course Number course_number CS F213 Can be any valid string Course IC instructor_in_charge Prasad Talasila Course instructor-in-charge Other Instructors other_instructors ["Rajat Agarwal","Ankshit Jain"] Can be a valid array of strings Submission Instructions submission_url https://github.com/AutolabJS/AutolabJS/wiki/v0.5.0-Making-a-Submission Needs to be a valid URL Self-evaluation Instructions self_evaluation_url https://github.com/AutolabJS/AutolabJS/wiki/v0.5.0-Post-lab-self-evaluation Needs to be a valid URL
Submission instructions contain specific instructions for students to prepare and submit code to AutolabJS. Self-evaluation instructions are useful for practice exercises that get can be run both off-line and online on AutolabJS. You can adopt the sample instructions given at above URLs to suit your course scenario.
For every new node to be added, a line in the
executionnodessection has to be added.
For example: suppose you want 12 nodes to be installed. The section
executionnodeswould look like this:
[executionnodes] en1 en_port=8091 en2 en_port=8092 en3 en_port=8093 en4 en_port=8094 en5 en_port=8095 en6 en_port=8096 en7 en_port=8097 en8 en_port=8098 en9 en_port=8099 en10 en_port=8100 en11 en_port=8101 en12 en_port=8102
Note: There is no hard restriction for the port values to be the same, but for easier maintenance, it is recommended that you keep them as an increasing sequence.
If you want to reduce the number of execution nodes to be installed to fewer than ten, then you can remove the existing lines to the necessary number. For example, to reduce the number of execution nodes to two, you can do the following.
[executionnodes] en1 en_port=8091 en2 en_port=8092
All the AutolabJS components can refer to each other using domain names. The domain names of these AutolabJS components are assigned to
ansible_hostvariable. This is okay for single machine installations.
Component Name Short Alias Host name Variable Default Value Main Server ms ms_hostname ansible_host=localhost Load Balancer lb lb_hostname ansible_host=localhost GitLab gitlab gitlab_hostname ansible_host=localhost Database autolabjs-db db_hostname ansible_host=localhost Execution Nodes en1,en2,... ansible_host localhost
Unless you have special requirements, you can use the default host name mappings. When the host name of AutolabJS server is assigned to
ansible_host, the same host name value gets used for all the AutolabJS components. For installation on more than one machine, it makes sense to change the host names of the AutolabJS components to correspond to the servers on which the components are installed.
AutolabJS components run on different network sockets. Each socket is identified by a combination of IP address and port. And there is a requirement for the <IP, port> combination to be unique on a host. We have selected some default ports for AutolabJS components. The variables for holding port values and their defaults are listed below.
Component Port Variable Default Value Main Server ms_port 9000 Load Balancer lb_port 8081 GitLab gitlab_port 80 (DON'T CHANGE) Execution Node1 en_port 8091 Execution Node2 en_port 8092 Execution Node3 en_port 8093 Execution Node4 en_port 8094 Execution Node5 en_port 8095 Execution Node6 en_port 8096 Execution Node7 en_port 8097 Execution Node8 en_port 8098 Execution Node9 en_port 8099 Execution Node10 en_port 8100
Unless you have special requirements, you can use the port numbers. If you have any other service that is running on any of the above ports, then it makes sense to change the default port numbers. The only restriction is that you choose unique values for all the port variables.
GitLab uses port 80 to serve HTTP traffic and port 443 to serve HTTPS traffic. The configuration file only allows modification of HTTP port (
gitlab_port). But, you are advised not to change this setting. If you have any other network service running on ports 80, 443, then you are encouraged to either move AutolabJS to another server.
The default configuration installs ten execution nodes. Each execution node (en1 to en10) run on a different port. The port used by an execution node is identified using
en_portvariable. The port (
en_port) of an execution node can be changed on the same line.
Variable Default Value Explanation firstname.lastname@example.org Email of admin responsible for newly created Root CA. app_name AutolabJS URL of the website at which AutolabJS is to be available. organization autolabjs.com Organization / University to which the certificate belongs to. organizational_unit CSIS Department of University to which the certificate belongs to. country IN Geographic country state Goa Geographic state / region / province locality Goa Geographic city
By default, AutolabJS gets installed into
/opt/autolabjs. You can specify another installation directory for AutolabJS by modifying
Docker images (For developers only)
Variable Default Value Explanation load_docker_images no Don't load docker images. Instead, download the images from Internet. If you want to load the docker images from a location on disk, set this boolean flag to yes. docker_images_location /path/to/docker/images File location at which the images are saved as tar files. Trailing slash should not be used in the path.
If you already have saved docker images of AutolabJS components, you can use optionally load the available docker images from you system instead of downloading the images from Internet. In case, you need this functionality, make the value of
yesand provide the base path where all the docker images are stored in the parameter
Allows you to specify limits of logs in AutolabJS. There are two kinds of logs. First kind are the application logs generated by AutolabJS components. Second kind are the evaluation logs generated while completing an evaluation request from a participant. These two log limits are specified using,
Variable Default Value Explanation max_log_size 5242880 Maximum size of AutolabJS logs; defaults to 5MB per component. max_eval_log_size 256kb Maximum size of evaluation logs; defaults to 256kb.