Slide 1

Slide 1 text

Unikernels
 and hyper-elastic clouds … on behalf of a merry crew: Anil Madhavapeddy, Thomas Gazagnaire, David Scott, Thomas Leonard, Richard Mortier, Magnus Skjegstad, David Sheets, Balraj Singh, Jon Crowcroft, Mindy Preston, and many others! CodeMesh November 2015 @amirmc Amir Chaudhry

Slide 2

Slide 2 text

About me Work on MirageOS (herd cats) I like systems stuff! Previously Physicist, Neuroscientist,
 CompSci (ish), Startups, BigCo. @amirmc

Slide 3

Slide 3 text

Software today… …is an application … @amirmc

Slide 4

Slide 4 text

Software today… …is an application … … on top of an Operating System. @amirmc

Slide 5

Slide 5 text

Software today… … is built locally… @amirmc

Slide 6

Slide 6 text

Software today… … is built locally… … but deployed remotely. @amirmc

Slide 7

Slide 7 text

Software today… … needs more tools. @amirmc

Slide 8

Slide 8 text

Software today… …is complex! Even though most apps are single-purpose @amirmc

Slide 9

Slide 9 text

Complexity is the enemy… More layers -> tricky config Duplication -> inefficiency Large sizes -> long boot times More stuff -> larger attack surface @amirmc

Slide 10

Slide 10 text

We build for clouds as we do for desktops Why?

Slide 11

Slide 11 text

Can we do better? @amirmc Hardware Kernel Userland App A App B App C Full OS

Slide 12

Slide 12 text

Can we do better? @amirmc Hardware Hardware Kernel Userland App A App B App C Kernel Container A Container B Container C Full OS Minimal OS

Slide 13

Slide 13 text

Can we do better? @amirmc Hardware Hardware Hardware Kernel Userland App A App B App C Kernel Container A Container B Container C Full OS Minimal OS ? Specialisation

Slide 14

Slide 14 text

Can we do better? Disentangle applications from the OS Break up OS functionality into modular libraries Link only the system functionality your app needs Target alternative platforms from a single codebase @amirmc

Slide 15

Slide 15 text

Can we do better? @amirmc Hardware Hardware Hardware Kernel Userland App A App B App C Kernel Container A Container B Container C Full OS Minimal OS ? Specialisation

Slide 16

Slide 16 text

Can we do better? @amirmc Hardware Hardware Hardware Kernel Userland App A App B App C Kernel Container A Container B Container C A B C Full OS Minimal OS Unikernels Specialisation

Slide 17

Slide 17 text

The Rise of the Unikernel Unikernels are specialised machine images built from a modular stack adding system libraries and configuration to application code Every application is compiled into its own specialised OS that runs on the cloud or embedded devices @amirmc https://en.wikipedia.org/wiki/Unikernel

Slide 18

Slide 18 text

• ClickOS • Clive • Drawbridge • HaLVM • IncludeOS • LING • MirageOS • OSv • Rumprun The Rise of the Unikernel @amirmc

Slide 19

Slide 19 text

MirageOS @amirmc

Slide 20

Slide 20 text

MirageOS unikernel } @amirmc

Slide 21

Slide 21 text

MirageOS unikernel } @amirmc Familiar development cycle Broad deployment scenarios

Slide 22

Slide 22 text

MirageOS Unix Develop logic MirageOS System Libs @amirmc

Slide 23

Slide 23 text

MirageOS Specialise for deploy… … to multiple environments @amirmc Xen

Slide 24

Slide 24 text

So what?

Slide 25

Slide 25 text

Example: Static websites (though applicable to any application)

Slide 26

Slide 26 text

Examples • Secure services • Jekyll to Unikernel • Automated deployment • Summon on demand • Upcoming releases!

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

• Rewrote TLS • Functional core • Less code Bitcoin Piñata Secure services

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

8.2MB 102 kloc 2560 kloc ~200MB No extra stuff! Small &
 Secure! Much better security

Slide 32

Slide 32 text

Easy deployment • Jekyll to Unikernel • Automated deployment

Slide 33

Slide 33 text

Develop Deploy Test Example …in ~100 lines of code @amirmc

Slide 34

Slide 34 text

Summon on demand • Boots on demand • Masks latency • Increased Efficiency Jitsu

Slide 35

Slide 35 text

Recap • Secure services • Easy deployment • Summon on demand • Upcoming releases!

Slide 36

Slide 36 text

General workflow …in ~100 lines of code Develop Deploy Test

Slide 37

Slide 37 text

Deployments @amirmc

Slide 38

Slide 38 text

Trade-off (for now)… @amirmc

Slide 39

Slide 39 text

… however :)

Slide 40

Slide 40 text

Why I care @amirmc Empower individuals Distributed personal clouds Resilient, scalable systems

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

Why I care MirageOS (OS/application) Irmin (Storage/Sync) Signpost (Identity/Connectivity) OCaml (Safety/Modularity) Mail Contacts Calendar @amirmc

Slide 45

Slide 45 text

Contribute! @amirmc https://mirage.io http://nymote.org http://ocaml.org