openlab
TRANSCRIPT
OpenlabAutomated testing and evaluation platform of the source code from
assignments
Mihai [email protected]
February 24, 2015
Mihai Iachimovschi [email protected] Openlab February 24, 2015 1 / 19
Problem description
Students have a lot of assignments which are verified andevaluated in a classical manner.
Mihai Iachimovschi [email protected] Openlab February 24, 2015 2 / 19
Problem description (cont.)
The process of verification is very time consuming and inefficientfor the professor
Mihai Iachimovschi [email protected] Openlab February 24, 2015 3 / 19
Perfect solution
Building a platform that will:
• Keep track of all assignments;
• Track deadlines for assignments;
• Accept assignments submissions;
• Test automatically the submissions;
• Evaluate students based on predefined tests;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 4 / 19
Perfect solution
Building a platform that will:
• Keep track of all assignments;
• Track deadlines for assignments;
• Accept assignments submissions;
• Test automatically the submissions;
• Evaluate students based on predefined tests;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 4 / 19
Perfect solution
Building a platform that will:
• Keep track of all assignments;
• Track deadlines for assignments;
• Accept assignments submissions;
• Test automatically the submissions;
• Evaluate students based on predefined tests;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 4 / 19
Perfect solution
Building a platform that will:
• Keep track of all assignments;
• Track deadlines for assignments;
• Accept assignments submissions;
• Test automatically the submissions;
• Evaluate students based on predefined tests;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 4 / 19
Perfect solution
Building a platform that will:
• Keep track of all assignments;
• Track deadlines for assignments;
• Accept assignments submissions;
• Test automatically the submissions;
• Evaluate students based on predefined tests;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 4 / 19
Advantages
Having such a system will offer us features like:
• Penalization for late submissions;
• Rewards for early submissions;
• Saving time of professors and students;
• Motivating competition between students;
• Helping professor to focus on teaching rather than verifying;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 5 / 19
Advantages
Having such a system will offer us features like:
• Penalization for late submissions;
• Rewards for early submissions;
• Saving time of professors and students;
• Motivating competition between students;
• Helping professor to focus on teaching rather than verifying;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 5 / 19
Advantages
Having such a system will offer us features like:
• Penalization for late submissions;
• Rewards for early submissions;
• Saving time of professors and students;
• Motivating competition between students;
• Helping professor to focus on teaching rather than verifying;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 5 / 19
Advantages
Having such a system will offer us features like:
• Penalization for late submissions;
• Rewards for early submissions;
• Saving time of professors and students;
• Motivating competition between students;
• Helping professor to focus on teaching rather than verifying;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 5 / 19
Advantages
Having such a system will offer us features like:
• Penalization for late submissions;
• Rewards for early submissions;
• Saving time of professors and students;
• Motivating competition between students;
• Helping professor to focus on teaching rather than verifying;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 5 / 19
Constraints
The threats that can tangle:
• Security:A user is able to submit malicious code to the server;
• Computing power:Multiple users can submit unoptimized code that can be overloadingthe server;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 6 / 19
Constraints
The threats that can tangle:
• Security:A user is able to submit malicious code to the server;
• Computing power:Multiple users can submit unoptimized code that can be overloadingthe server;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 6 / 19
A possible solution
Isolation?
Mihai Iachimovschi [email protected] Openlab February 24, 2015 7 / 19
A possible solution (cont.)
But how to isolate properly?
Mihai Iachimovschi [email protected] Openlab February 24, 2015 8 / 19
FreeBSD Jails?
FreeBSD jail?
No.
Reasons:
• Quite old;
• Tightly tied to FreeBSD operating system;
• Limited in functionality;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 9 / 19
FreeBSD Jails?
FreeBSD jail? No.
Reasons:
• Quite old;
• Tightly tied to FreeBSD operating system;
• Limited in functionality;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 9 / 19
FreeBSD Jails?
FreeBSD jail? No.
Reasons:
• Quite old;
• Tightly tied to FreeBSD operating system;
• Limited in functionality;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 9 / 19
Virtualization
Classical virtualization?
Maybe, but no.
Reasons:
• Too much overhead by virtualizing the hardware;
• Each virtual instance should have its own OS;
• Less efficient for our use case;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 10 / 19
Virtualization
Classical virtualization? Maybe, but no.
Reasons:
• Too much overhead by virtualizing the hardware;
• Each virtual instance should have its own OS;
• Less efficient for our use case;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 10 / 19
Virtualization
Classical virtualization? Maybe, but no.
Reasons:
• Too much overhead by virtualizing the hardware;
• Each virtual instance should have its own OS;
• Less efficient for our use case;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 10 / 19
Containerization
Containerization?
Definitely yes.
Reasons:
• Kernel level isolation;
• Secure;
• Highly reliable;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 11 / 19
Containerization
Containerization? Definitely yes.
Reasons:
• Kernel level isolation;
• Secure;
• Highly reliable;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 11 / 19
Containerization
Containerization? Definitely yes.
Reasons:
• Kernel level isolation;
• Secure;
• Highly reliable;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 11 / 19
Virtualization vs. Containerization
Mihai Iachimovschi [email protected] Openlab February 24, 2015 12 / 19
What is a container?
A container combines two things:
• cgroups
• namespaces
Mihai Iachimovschi [email protected] Openlab February 24, 2015 13 / 19
Linux cgroups
cgroups represent:
• Group of processes;
• Can be nested;
• Limits and isolates:– CPU;– Memory;– Disk I/O;– Network, etc;
Mihai Iachimovschi [email protected] Openlab February 24, 2015 14 / 19
Linux namespaces
namespaces restrict your view of the system:
• Mounts (CLONE NEWNS);
• UTS (CLONE NEWUTS);
• IPC (CLONE NEWIPC);
• PID (CLONE NEWPID);
• Networks (CLONE NEWNET);
• User (CLONE NEWUSER);
Mihai Iachimovschi [email protected] Openlab February 24, 2015 15 / 19
Docker
For our system we will use Docker containers.
Mihai Iachimovschi [email protected] Openlab February 24, 2015 16 / 19
Docker in a docker
Mihai Iachimovschi [email protected] Openlab February 24, 2015 17 / 19
Docker - multiple applications
This is how docker can execute multiple, completely isolatedapplications.
Mihai Iachimovschi [email protected] Openlab February 24, 2015 18 / 19