際際滷

際際滷Share a Scribd company logo
Openlab
Automated testing and evaluation platform of the source code from
assignments
Mihai Iachimovschi
iachimih@鍖t.cvut.cz
February 24, 2015
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 1 / 19
Problem description
Students have a lot of assignments which are veri鍖ed and
evaluated in a classical manner.
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 2 / 19
Problem description (cont.)
The process of veri鍖cation is very time consuming and ine鍖cient
for the professor
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 3 / 19
Perfect solution
Building a platform that will:
 Keep track of all assignments;
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 4 / 19
Perfect solution
Building a platform that will:
 Keep track of all assignments;
 Track deadlines for assignments;
Mihai Iachimovschi iachimih@鍖t.cvut.cz 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;
Mihai Iachimovschi iachimih@鍖t.cvut.cz 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;
Mihai Iachimovschi iachimih@鍖t.cvut.cz 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 prede鍖ned tests;
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 4 / 19
Advantages
Having such a system will o鍖er us features like:
 Penalization for late submissions;
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 5 / 19
Advantages
Having such a system will o鍖er us features like:
 Penalization for late submissions;
 Rewards for early submissions;
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 5 / 19
Advantages
Having such a system will o鍖er us features like:
 Penalization for late submissions;
 Rewards for early submissions;
 Saving time of professors and students;
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 5 / 19
Advantages
Having such a system will o鍖er us features like:
 Penalization for late submissions;
 Rewards for early submissions;
 Saving time of professors and students;
 Motivating competition between students;
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 5 / 19
Advantages
Having such a system will o鍖er 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 iachimih@鍖t.cvut.cz Openlab February 24, 2015 5 / 19
Constraints
The threats that can tangle:
 Security:
A user is able to submit malicious code to the server;
Mihai Iachimovschi iachimih@鍖t.cvut.cz 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 overloading
the server;
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 6 / 19
A possible solution
Isolation?
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 7 / 19
A possible solution (cont.)
But how to isolate properly?
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 8 / 19
FreeBSD Jails?
FreeBSD jail?
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 9 / 19
FreeBSD Jails?
FreeBSD jail? No.
Mihai Iachimovschi iachimih@鍖t.cvut.cz 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 iachimih@鍖t.cvut.cz Openlab February 24, 2015 9 / 19
Virtualization
Classical virtualization?
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 10 / 19
Virtualization
Classical virtualization? Maybe, but no.
Mihai Iachimovschi iachimih@鍖t.cvut.cz 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 e鍖cient for our use case;
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 10 / 19
Containerization
Containerization?
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 11 / 19
Containerization
Containerization? De鍖nitely yes.
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 11 / 19
Containerization
Containerization? De鍖nitely yes.
Reasons:
 Kernel level isolation;
 Secure;
 Highly reliable;
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 11 / 19
Virtualization vs. Containerization
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 12 / 19
What is a container?
A container combines two things:
 cgroups
 namespaces
Mihai Iachimovschi iachimih@鍖t.cvut.cz 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 iachimih@鍖t.cvut.cz 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 iachimih@鍖t.cvut.cz Openlab February 24, 2015 15 / 19
Docker
For our system we will use Docker containers.
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 16 / 19
Docker in a docker
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 17 / 19
Docker - multiple applications
This is how docker can execute multiple, completely isolated
applications.
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 18 / 19
End
Thank you.
Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 19 / 19

More Related Content

Openlab

  • 1. Openlab Automated testing and evaluation platform of the source code from assignments Mihai Iachimovschi iachimih@鍖t.cvut.cz February 24, 2015 Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 1 / 19
  • 2. Problem description Students have a lot of assignments which are veri鍖ed and evaluated in a classical manner. Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 2 / 19
  • 3. Problem description (cont.) The process of veri鍖cation is very time consuming and ine鍖cient for the professor Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 3 / 19
  • 4. Perfect solution Building a platform that will: Keep track of all assignments; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 4 / 19
  • 5. Perfect solution Building a platform that will: Keep track of all assignments; Track deadlines for assignments; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 4 / 19
  • 6. Perfect solution Building a platform that will: Keep track of all assignments; Track deadlines for assignments; Accept assignments submissions; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 4 / 19
  • 7. Perfect solution Building a platform that will: Keep track of all assignments; Track deadlines for assignments; Accept assignments submissions; Test automatically the submissions; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 4 / 19
  • 8. 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 prede鍖ned tests; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 4 / 19
  • 9. Advantages Having such a system will o鍖er us features like: Penalization for late submissions; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 5 / 19
  • 10. Advantages Having such a system will o鍖er us features like: Penalization for late submissions; Rewards for early submissions; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 5 / 19
  • 11. Advantages Having such a system will o鍖er us features like: Penalization for late submissions; Rewards for early submissions; Saving time of professors and students; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 5 / 19
  • 12. Advantages Having such a system will o鍖er us features like: Penalization for late submissions; Rewards for early submissions; Saving time of professors and students; Motivating competition between students; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 5 / 19
  • 13. Advantages Having such a system will o鍖er 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 iachimih@鍖t.cvut.cz Openlab February 24, 2015 5 / 19
  • 14. Constraints The threats that can tangle: Security: A user is able to submit malicious code to the server; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 6 / 19
  • 15. 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 overloading the server; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 6 / 19
  • 16. A possible solution Isolation? Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 7 / 19
  • 17. A possible solution (cont.) But how to isolate properly? Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 8 / 19
  • 18. FreeBSD Jails? FreeBSD jail? Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 9 / 19
  • 19. FreeBSD Jails? FreeBSD jail? No. Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 9 / 19
  • 20. FreeBSD Jails? FreeBSD jail? No. Reasons: Quite old; Tightly tied to FreeBSD operating system; Limited in functionality; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 9 / 19
  • 21. Virtualization Classical virtualization? Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 10 / 19
  • 22. Virtualization Classical virtualization? Maybe, but no. Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 10 / 19
  • 23. Virtualization Classical virtualization? Maybe, but no. Reasons: Too much overhead by virtualizing the hardware; Each virtual instance should have its own OS; Less e鍖cient for our use case; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 10 / 19
  • 25. Containerization Containerization? De鍖nitely yes. Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 11 / 19
  • 26. Containerization Containerization? De鍖nitely yes. Reasons: Kernel level isolation; Secure; Highly reliable; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 11 / 19
  • 27. Virtualization vs. Containerization Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 12 / 19
  • 28. What is a container? A container combines two things: cgroups namespaces Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 13 / 19
  • 29. Linux cgroups cgroups represent: Group of processes; Can be nested; Limits and isolates: CPU; Memory; Disk I/O; Network, etc; Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 14 / 19
  • 30. 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 iachimih@鍖t.cvut.cz Openlab February 24, 2015 15 / 19
  • 31. Docker For our system we will use Docker containers. Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 16 / 19
  • 32. Docker in a docker Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 17 / 19
  • 33. Docker - multiple applications This is how docker can execute multiple, completely isolated applications. Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 18 / 19
  • 34. End Thank you. Mihai Iachimovschi iachimih@鍖t.cvut.cz Openlab February 24, 2015 19 / 19