2017 jan-19 meetup-unikernels

27
The next big little thing ? Docker Grenoble Meetup, 19 Jan 2017 Mike Bright, @mjbright @mjbright

Upload: michael-bright

Post on 07-Feb-2017

98 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: 2017 jan-19 meetup-unikernels

Thenextbiglittlething?

DockerGrenobleMeetup,19Jan2017

MikeBright, @mjbright

@mjbright

Page 2: 2017 jan-19 meetup-unikernels

ViktorFarcic,seniorconsultantatCloudBees

...Oneofthemostexcitingareasthatwillbecomeprominentin2017willbeunikernels.

Whilethemajorityoftheindustryisstilltryingtowraptheirheadsaroundcontainers,wewillstartseeingunikernelstakingoverthestage.

Theywill,inaway,unifyfunctionalitiesprovidedbyVMsandcontainers.

http://sdtimes.com/whats-horizon-2017/

Page 3: 2017 jan-19 meetup-unikernels

WhatareUnikernels?

Howdidwegethere?

Unikernelimplementations

CleanSlatePOSIXcompatibleTools

Future

Resources

Unikernels-Overview

@mjbright

Page 4: 2017 jan-19 meetup-unikernels

WhatareUnikernels?"LibraryOS"UnikernelsareapplicationsimagesbuiltwithonlytheOperatingSystem

componentstheyactuallyrequire,e.g.TCPStack,Diskaccess.

Singleprocessapplications(nothreads,forkingormulti-user)withverysmallsize->highperformance,fastbootandsmallattacksurface(secure).

@mjbright

Page 5: 2017 jan-19 meetup-unikernels

"LibraryOSes"

AUnikernelisbuiltbythecompilerlinkingonlytheOScomponentsneededbytheapplication.

TheOSbecomesa"LibraryOS"

Unlike"normal"applicationswhichsitatopagenericmonolithicLinuxkernel(orevenμ-kernel)whichhasmanyunneededfeatures,e.g.floppydriver.

WhatareUnikernels-howdidwegethere?

Page 6: 2017 jan-19 meetup-unikernels

"LibraryOSes"Unneededfeaturesconsumeresourcesunnecessarily.

Unneededlegacyfeaturesrepresentasecurityrisk-especiallyinthecloud.

WhatareUnikernels-howdidwegethere?

Page 7: 2017 jan-19 meetup-unikernels

"LibraryOSes"Unneededfeaturesconsumeresourcesunnecessarily.

Unneededlegacyfeaturesrepresentasecurityrisk-especiallyinthecloud.

AtOctober's"DockerDistributedSummit",DockereventalkedofminimizingtheHypervisoralso.

"UnikernelsTheriseofthelibraryhypervisorinMirageOS"

(ACM:Unikernels:RiseoftheVirtualLibraryOperatingSystem,Jan2014)

WhatareUnikernels-howdidwegethere?

Page 8: 2017 jan-19 meetup-unikernels

"LibraryOSes"Unneededfeaturesconsumeresourcesunnecessarily.

Unneededlegacyfeaturesrepresentasecurityrisk-especiallyinthecloud.

AtOctober's"DockerDistributedSummit",DockereventalkedofminimizingtheHypervisoralso.

"UnikernelsTheriseofthelibraryhypervisorinMirageOS"

(ACM:Unikernels:RiseoftheVirtualLibraryOperatingSystem,Jan2014)

Theseminimalsystemscantake~200msectoboot.

Thisopensupthepossibilityofservicesbeingspinupondemand(MirageOSjitsu).

WhatareUnikernels-howdidwegethere?

Page 9: 2017 jan-19 meetup-unikernels

"LibraryOSes"Applicationdomains

Cloud,e.g.serverless

IoT(Embedded)

HPC

NFV( UnikernelsmeetNFVEricssonResearch)

WherewillUnikernelsbeused?

Page 10: 2017 jan-19 meetup-unikernels

"LibraryOSes"Applicationdomains

Cloud,e.g.serverless

IoT(Embedded)

HPC

NFV( UnikernelsmeetNFVEricssonResearch)

FromtheNFVContainersWhitePaper(2.3.Unikernels):

Unikernelsareessentiallysingle-applicationvirtualmachinesbasedonminimalisticOSes.SuchminimalisticOSeshaveminimumoverheadandaretypicallysingle-addressspace(sonouser/kernelspacedivideandnoexpensivesystemcalls)andhaveaco-operativescheduler(soreducingcontextswitchcosts).

ExamplesofsuchminimalisticOSesareMiniOS[MINIOS]whichrunsonXenandOSv[OSV]whichrunsonKVM,XenandVMWare.

https://datatracker.ietf.org/doc/draft-natarajan-nfvrg-containers-for-nfv/?include_text=1

WherewillUnikernelsbeused?

@mjbright

Page 11: 2017 jan-19 meetup-unikernels

UnikernelFamilies ManyUnikernelimplementationsexist,therearetwo

mainclassesofUnikernels

Unikernelimplementations

Page 12: 2017 jan-19 meetup-unikernels

UnikernelFamilies ManyUnikernelimplementationsexist,therearetwo

mainclassesofUnikernels

Sometakeaclean-slateapproachandemphasizesafetyandsecurity.ThesetendtousethesamelanguagefortheapplicationandtheLibraryOScomponents.

MirageOS(Ocaml)HalVM(Haskell)

Unikernelimplementations

Page 13: 2017 jan-19 meetup-unikernels

UnikernelFamilies ManyUnikernelimplementationsexist,therearetwo

mainclassesofUnikernels

Sometakeaclean-slateapproachandemphasizesafetyandsecurity.ThesetendtousethesamelanguagefortheapplicationandtheLibraryOScomponents.

MirageOS(Ocaml)HalVM(Haskell)

OthersfavourbackwardcompatibilityofexistingapplicationsbasedonPOSIX-compatibility.

Manyapplicationshavebeenported

OSv(Tomcat,Jetty,Cassandra,OpenJDK,...)Rumprun(MySQL,PHP,Nginx)

Unikernelimplementations

Page 14: 2017 jan-19 meetup-unikernels

UnikernelImplementationsTechnology Description

ClickOScnp.neclab.eu

Forembeddednetworkh/w.~5MBimages,boots<20ms,45μsdelay,100VMs=>10Gbps

Clivelsub.org

WritteninGo.Fordistributedandcloud.

DrawbridgeMS

Researchprototype.Picoprocess/containerwithminimalkernelAPIsurface,andWindowslibraryOS.

Graphenegraphene

Securing"multi-process"legacyapps-addsIPC.

HaLVMgalois.com

PortofGHC(GlasgowHaskellCompiler)suite.WriteappsinHaskelltorunonXen.

IncludeOSincludeos.org

ResearchprojectforC++codeonvirtualhardware.

LINGerlangonxen.org

Erlang/OTPrunsonXen.

MirageOSmirage.io

Clean-slatelibraryOSforsecure,high-perfnetworkapps.Morethan100MirageOSlibrariesplusOCamlecosystem.

OSvosv.ioCloudius

RunLinuxbinaries(w.limitations),supportsC/C++,JVM,Ruby,Node.js

Rumprunrumpkernel.org

FreeBSD-RunsPOSIXs/wonBMorVM(Xen).

Page 15: 2017 jan-19 meetup-unikernels

Clean-Slate

https://mirage.io/

OCaml-Based

MirageOS"LibraryOS"componentsarewritteninOcaml.

ML-derivedlanguagesarebestknownfortheirstatictypesystemsandtype-inferringcompilers.

OCamlunifiesfunctional,imperative,andobject-orientedprogrammingunderanML-liketypesystem.

OCamlhasextensivelibrariesavailable

(Unisonutility)

Unikernelimplementations-MirageOS/Ocaml

Page 16: 2017 jan-19 meetup-unikernels

Clean-Slate

https://mirage.io/

OCaml-Based

MirageOSUnikernelsarebasedontheMirage-OSUnikernelbase(OSlibrary).

ThemiragetoolisusedtobuildUnikernelsforvariousbackends:

XenHypervisor(PV)Unix(LinuxorOS/Xbinaries)Browser(viaOcaml->JScompiler!!)EvenanexperimentalBMbackendforRaspberryPi

Unikernelimplementations-MirageOS-2

Page 17: 2017 jan-19 meetup-unikernels

Clean-Slate

https://mirage.io/

OCaml-Based

MirageOSUnikernelsarebasedontheMirage-OSUnikernelbase(OSlibrary).

ThemiragetoolisusedtobuildUnikernelsforvariousbackends:

XenHypervisor(PV)Unix(LinuxorOS/Xbinaries)Browser(viaOcaml->JScompiler!!)EvenanexperimentalBMbackendforRaspberryPi

Buildingapplicationsforunixorxen

mirageconfigure-tunixmake./mir-console

mirageconfigure-txenmake****xencreate./mir-console.xen

Unikernelimplementations-MirageOS-2

@mjbright

Page 18: 2017 jan-19 meetup-unikernels

Clean-Slate

https://mirage.io/

BNCPinata:http://ownme.ipredator.se/

Networkingapplications

e.g.CyberChaff"falsenetworkhosts"

PayGarden,SeanGrove

"Babystepstounikernelsinproduction"

Toopainfultocreate/configureAMIimagesonAWSSolo5allowstocreateKVMimagesdeployableonGCE

Unikernelimplementations-MirageOS-UseCases

@mjbright

Page 19: 2017 jan-19 meetup-unikernels

Clean-Slate

HalVM-TheHaskellLightweightVirtualMachine:GHCrunningonXen

https://github.com/GaloisInc/HaLVM

HalVM3isreconsideringit'sUnikernelbasehttp://uhsure.com/halvm3.html

Userumpkernel(NetBSDbase)ShifttoSolo5?

Unikernelimplementations-HalVM

@mjbright

Page 20: 2017 jan-19 meetup-unikernels

POSIX-based

http://osv.iohttp://blog.osv.io

OSv-CapableofrunningPOSIXbinaries

canrunJVMCassandra:https://www.penninkhof.com/2015/05/minimalist-cassandra-vm-using-osv/

UsedinMikelangelo(EUProject)TheMIKELANGELOprojectaimstobringHighPerformanceComputing(HPC)tothecloud.HPCtraditionallyinvolvesbleedingedgetechnologies,includinglotsofCPUcores,Infinibandinterconnectsbetweennodes,MPIlibrariesformessagepassing,and,surprise—NFS,averyoldtimeroftheUNIXuniverse.

BuildingOSvImagesUsingDocker:http://blog.osv.io/blog/blog/2015/04/27/docker/

SDI:ODL+OSv:http://blog.osv.io/blog/blog/2015/03/31/sdi/

Unikernelimplementations-OSv

@mjbright

Page 21: 2017 jan-19 meetup-unikernels

ToolsUnik:toolforcompilingappstounikernels(varioustechnologies)

Solo5:Analternativeunikernel-baseforMirageOS

Providesqemu/KVMsupportforMirageOS

ukvm:AnalternativeVMMonitor

a"libraryhypervisor"

capstan:OSvbuildtool

UnikernelTools

@mjbright

Page 22: 2017 jan-19 meetup-unikernels

Clean-SlateMirageOSjitsu:"Just-In-TimeSummoningofUnikernels"

ADNSserverthatstartsunikernelsondemand.

TestedwithMirageOSandRumprununikernels.

https://github.com/mirage/jitsu

UnikernelTools

@mjbright

Page 23: 2017 jan-19 meetup-unikernels

UnikernelsorContainers? SowhathasthisgottodowithContainers?

WhydidDockerbuyUnikernelSystems(Jan2016)?

Info.Q/Amir,Aug2016

UnikernelsandContainers

Page 24: 2017 jan-19 meetup-unikernels

UnikernelsorContainers? SowhathasthisgottodowithContainers?

WhydidDockerbuyUnikernelSystems(Jan2016)?

Info.Q/Amir,Aug2016

UnikernelSystemsareinvolvedinMirageOS/XenUseofUnikernelsinDockerforMac

VPNKit,DataKitToprovidebuild/run/shiptoolsforUnikernels?TosecureContainerdeployments

RunningUnikernelsincontainers????Securefront-endsinhybridsolutionsmadeofunikernelsandcontainers

e.g.forOCamlMediaWiki(http2https,tls,...)

UnikernelsandContainers

@mjbright

Page 25: 2017 jan-19 meetup-unikernels

Demo

Page 26: 2017 jan-19 meetup-unikernels

ResourcesScoop.it

Unikernelswww.scoop.it/t/unikernels

Wikipedia en.wikipedia.org/wiki/Unikernel

unikernels.org unikernels.org

mirageos.iomirageos.io

mirage.io/docs/papers

OReilly"Unikernels"

Freedownload

@unikernel @unikernel

github.com/ocamllabs ocamllabs

github.com/mirage MirageOS

@mjbright

Page 27: 2017 jan-19 meetup-unikernels

ThankyouQ&A