Unikernels and another way of secure cloud computing

127
1/31 Unikernels and another way of secure cloud computing Motiejus Jakˇ stys [email protected] @mo kelione 2015-11-19 c 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Transcript of Unikernels and another way of secure cloud computing

Page 1: Unikernels and another way of secure cloud computing

1/31

Unikernels and another way ofsecure cloud computing

Motiejus [email protected]

@mo kelione

2015-11-19

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 2: Unikernels and another way of secure cloud computing

2/31

Disclaimer

This presentation is intended to give a high leveloverview of the subject matter and is intended fordiscussion purposes. This presentation is notintended to provide an exhaustive analysis of thesubject matter and may differ depending onindividual use cases.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 3: Unikernels and another way of secure cloud computing

3/31

Table of ContentsIntroduction

Roles of an IT organizationHow to deploy?

Meat of UnikernelsLook ma, no OSWhat’s in a unikernel?Performance benefitsSecurity benefits

Unikernel examplesWhat’s next?

Unmodified applications firstLocal demoIn Amazon EC2

SummaryThanksc© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 4: Unikernels and another way of secure cloud computing

4/31

Typical IT organizationRole What system?

Developer

I Cares only about the app.

I Familiar environment (POSIX API).

I Here’s a JAR, make this thing work.

I Hopefully prod matches dev.

Operator FredFlintstone

I Simple systems.

I Predictable systems.

I Speedy deployments and rollbacks.

Security certi-fier Mr Burns

I Auditable components.

I Least possible dependencies.

I Trades convenience for security.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 5: Unikernels and another way of secure cloud computing

4/31

Typical IT organizationRole What system?

Developer

I Cares only about the app.

I Familiar environment (POSIX API).

I Here’s a JAR, make this thing work.

I Hopefully prod matches dev.

Operator FredFlintstone

I Simple systems.

I Predictable systems.

I Speedy deployments and rollbacks.

Security certi-fier Mr Burns

I Auditable components.

I Least possible dependencies.

I Trades convenience for security.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 6: Unikernels and another way of secure cloud computing

4/31

Typical IT organizationRole What system?

Developer

I Cares only about the app.

I Familiar environment (POSIX API).

I Here’s a JAR, make this thing work.

I Hopefully prod matches dev.

Operator FredFlintstone

I Simple systems.

I Predictable systems.

I Speedy deployments and rollbacks.

Security certi-fier Mr Burns

I Auditable components.

I Least possible dependencies.

I Trades convenience for security.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 7: Unikernels and another way of secure cloud computing

4/31

Typical IT organizationRole What system?

Developer

I Cares only about the app.

I Familiar environment (POSIX API).

I Here’s a JAR, make this thing work.

I Hopefully prod matches dev.

Operator FredFlintstone

I Simple systems.

I Predictable systems.

I Speedy deployments and rollbacks.

Security certi-fier Mr Burns

I Auditable components.

I Least possible dependencies.

I Trades convenience for security.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 8: Unikernels and another way of secure cloud computing

4/31

Typical IT organizationRole What system?

Developer

I Cares only about the app.

I Familiar environment (POSIX API).

I Here’s a JAR, make this thing work.

I Hopefully prod matches dev.

Operator FredFlintstone

I Simple systems.

I Predictable systems.

I Speedy deployments and rollbacks.

Security certi-fier Mr Burns

I Auditable components.

I Least possible dependencies.

I Trades convenience for security.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 9: Unikernels and another way of secure cloud computing

4/31

Typical IT organizationRole What system?

Developer

I Cares only about the app.

I Familiar environment (POSIX API).

I Here’s a JAR, make this thing work.

I Hopefully prod matches dev.

Operator FredFlintstone

I Simple systems.

I Predictable systems.

I Speedy deployments and rollbacks.

Security certi-fier Mr Burns

I Auditable components.

I Least possible dependencies.

I Trades convenience for security.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 10: Unikernels and another way of secure cloud computing

4/31

Typical IT organizationRole What system?

Developer

I Cares only about the app.

I Familiar environment (POSIX API).

I Here’s a JAR, make this thing work.

I Hopefully prod matches dev.

Operator FredFlintstone

I Simple systems.

I Predictable systems.

I Speedy deployments and rollbacks.

Security certi-fier Mr Burns

I Auditable components.

I Least possible dependencies.

I Trades convenience for security.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 11: Unikernels and another way of secure cloud computing

4/31

Typical IT organizationRole What system?

Developer

I Cares only about the app.

I Familiar environment (POSIX API).

I Here’s a JAR, make this thing work.

I Hopefully prod matches dev.

Operator FredFlintstone

I Simple systems.

I Predictable systems.

I Speedy deployments and rollbacks.

Security certi-fier Mr Burns

I Auditable components.

I Least possible dependencies.

I Trades convenience for security.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 12: Unikernels and another way of secure cloud computing

4/31

Typical IT organizationRole What system?

Developer

I Cares only about the app.

I Familiar environment (POSIX API).

I Here’s a JAR, make this thing work.

I Hopefully prod matches dev.

Operator FredFlintstone

I Simple systems.

I Predictable systems.

I Speedy deployments and rollbacks.

Security certi-fier Mr Burns

I Auditable components.

I Least possible dependencies.

I Trades convenience for security.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 13: Unikernels and another way of secure cloud computing

4/31

Typical IT organizationRole What system?

Developer

I Cares only about the app.

I Familiar environment (POSIX API).

I Here’s a JAR, make this thing work.

I Hopefully prod matches dev.

Operator FredFlintstone

I Simple systems.

I Predictable systems.

I Speedy deployments and rollbacks.

Security certi-fier Mr Burns

I Auditable components.

I Least possible dependencies.

I Trades convenience for security.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 14: Unikernels and another way of secure cloud computing

4/31

Typical IT organizationRole What system?

Developer

I Cares only about the app.

I Familiar environment (POSIX API).

I Here’s a JAR, make this thing work.

I Hopefully prod matches dev.

Operator FredFlintstone

I Simple systems.

I Predictable systems.

I Speedy deployments and rollbacks.

Security certi-fier Mr Burns

I Auditable components.

I Least possible dependencies.

I Trades convenience for security.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 15: Unikernels and another way of secure cloud computing

5/31

How to deploy?Deployment Developer Operations Security

Mutable, full OS.

I Ansible/Chef/Puppet

I Adhoc shell scripts

I AWS Opsworks

Unhappy Unhappy Doesn’tcare

Immutable, full OS.

I Docker

I AMI per release

Happy Unhappy Doesn’tcare

Immutable, no OS.

I Unikernels

Happy Happy Happier

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 16: Unikernels and another way of secure cloud computing

5/31

How to deploy?Deployment Developer Operations Security

Mutable, full OS.

I Ansible/Chef/Puppet

I Adhoc shell scripts

I AWS Opsworks

Unhappy Unhappy Doesn’tcare

Immutable, full OS.

I Docker

I AMI per release

Happy Unhappy Doesn’tcare

Immutable, no OS.

I Unikernels

Happy Happy Happier

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 17: Unikernels and another way of secure cloud computing

5/31

How to deploy?Deployment Developer Operations Security

Mutable, full OS.

I Ansible/Chef/Puppet

I Adhoc shell scripts

I AWS Opsworks

Unhappy

Unhappy Doesn’tcare

Immutable, full OS.

I Docker

I AMI per release

Happy Unhappy Doesn’tcare

Immutable, no OS.

I Unikernels

Happy Happy Happier

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 18: Unikernels and another way of secure cloud computing

5/31

How to deploy?Deployment Developer Operations Security

Mutable, full OS.

I Ansible/Chef/Puppet

I Adhoc shell scripts

I AWS Opsworks

Unhappy Unhappy

Doesn’tcare

Immutable, full OS.

I Docker

I AMI per release

Happy Unhappy Doesn’tcare

Immutable, no OS.

I Unikernels

Happy Happy Happier

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 19: Unikernels and another way of secure cloud computing

5/31

How to deploy?Deployment Developer Operations Security

Mutable, full OS.

I Ansible/Chef/Puppet

I Adhoc shell scripts

I AWS Opsworks

Unhappy Unhappy Doesn’tcare

Immutable, full OS.

I Docker

I AMI per release

Happy Unhappy Doesn’tcare

Immutable, no OS.

I Unikernels

Happy Happy Happier

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 20: Unikernels and another way of secure cloud computing

5/31

How to deploy?Deployment Developer Operations Security

Mutable, full OS.

I Ansible/Chef/Puppet

I Adhoc shell scripts

I AWS Opsworks

Unhappy Unhappy Doesn’tcare

Immutable, full OS.

I Docker

I AMI per release

Happy Unhappy Doesn’tcare

Immutable, no OS.

I Unikernels

Happy Happy Happier

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 21: Unikernels and another way of secure cloud computing

5/31

How to deploy?Deployment Developer Operations Security

Mutable, full OS.

I Ansible/Chef/Puppet

I Adhoc shell scripts

I AWS Opsworks

Unhappy Unhappy Doesn’tcare

Immutable, full OS.

I Docker

I AMI per release

Happy

Unhappy Doesn’tcare

Immutable, no OS.

I Unikernels

Happy Happy Happier

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 22: Unikernels and another way of secure cloud computing

5/31

How to deploy?Deployment Developer Operations Security

Mutable, full OS.

I Ansible/Chef/Puppet

I Adhoc shell scripts

I AWS Opsworks

Unhappy Unhappy Doesn’tcare

Immutable, full OS.

I Docker

I AMI per release

Happy Unhappy

Doesn’tcare

Immutable, no OS.

I Unikernels

Happy Happy Happier

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 23: Unikernels and another way of secure cloud computing

5/31

How to deploy?Deployment Developer Operations Security

Mutable, full OS.

I Ansible/Chef/Puppet

I Adhoc shell scripts

I AWS Opsworks

Unhappy Unhappy Doesn’tcare

Immutable, full OS.

I Docker

I AMI per release

Happy Unhappy Doesn’tcare

Immutable, no OS.

I Unikernels

Happy Happy Happier

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 24: Unikernels and another way of secure cloud computing

5/31

How to deploy?Deployment Developer Operations Security

Mutable, full OS.

I Ansible/Chef/Puppet

I Adhoc shell scripts

I AWS Opsworks

Unhappy Unhappy Doesn’tcare

Immutable, full OS.

I Docker

I AMI per release

Happy Unhappy Doesn’tcare

Immutable, no OS.

I Unikernels

Happy Happy Happier

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 25: Unikernels and another way of secure cloud computing

5/31

How to deploy?Deployment Developer Operations Security

Mutable, full OS.

I Ansible/Chef/Puppet

I Adhoc shell scripts

I AWS Opsworks

Unhappy Unhappy Doesn’tcare

Immutable, full OS.

I Docker

I AMI per release

Happy Unhappy Doesn’tcare

Immutable, no OS.

I Unikernels

Happy

Happy Happier

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 26: Unikernels and another way of secure cloud computing

5/31

How to deploy?Deployment Developer Operations Security

Mutable, full OS.

I Ansible/Chef/Puppet

I Adhoc shell scripts

I AWS Opsworks

Unhappy Unhappy Doesn’tcare

Immutable, full OS.

I Docker

I AMI per release

Happy Unhappy Doesn’tcare

Immutable, no OS.

I Unikernels

Happy Happy

Happier

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 27: Unikernels and another way of secure cloud computing

5/31

How to deploy?Deployment Developer Operations Security

Mutable, full OS.

I Ansible/Chef/Puppet

I Adhoc shell scripts

I AWS Opsworks

Unhappy Unhappy Doesn’tcare

Immutable, full OS.

I Docker

I AMI per release

Happy Unhappy Doesn’tcare

Immutable, no OS.

I Unikernels

Happy Happy Happier

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 28: Unikernels and another way of secure cloud computing

6/31

Table of ContentsIntroduction

Roles of an IT organizationHow to deploy?

Meat of UnikernelsLook ma, no OSWhat’s in a unikernel?Performance benefitsSecurity benefits

Unikernel examplesWhat’s next?

Unmodified applications firstLocal demoIn Amazon EC2

SummaryThanksc© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 29: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 30: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 31: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 32: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 33: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 34: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 35: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 36: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 37: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 38: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 39: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 40: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 41: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 42: Unikernels and another way of secure cloud computing

7/31

Unikernel - Library OS

Traditional VM Unikernel

Configuration files

Application code

Language runtime

User processes

Kernel threads

File System

Network stack

Hypervisor, x86

Application code

Language runtime

Unikernel runtime

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 43: Unikernels and another way of secure cloud computing

8/31

IntroductionRoles of an IT organizationHow to deploy?

Meat of UnikernelsLook ma, no OSWhat’s in a unikernel?Performance benefitsSecurity benefits

Unikernel examples

What’s next?Unmodified applications firstLocal demoIn Amazon EC2

Summary

Thanksc© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 44: Unikernels and another way of secure cloud computing

8/31

Unikernel has:

I One process, N threads.

I Haha! no context switches.

I API for doing network and IO.

I Possibly application runtime:

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 45: Unikernels and another way of secure cloud computing

8/31

Unikernel has:

I One process, N threads.I Haha! no context switches.

I API for doing network and IO.

I Possibly application runtime:

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 46: Unikernels and another way of secure cloud computing

8/31

Unikernel has:

I One process, N threads.I Haha! no context switches.

I API for doing network and IO.

I Possibly application runtime:

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 47: Unikernels and another way of secure cloud computing

8/31

Unikernel has:

I One process, N threads.I Haha! no context switches.

I API for doing network and IO.

I Possibly application runtime:

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 48: Unikernels and another way of secure cloud computing

8/31

Unikernel has:

I One process, N threads.I Haha! no context switches.

I API for doing network and IO.

I Possibly application runtime:

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 49: Unikernels and another way of secure cloud computing

9/31

Where does performance come from?

Traditional style

NIC memory

kernel memory

interrupt

application memory

read()

Unikernel style

NIC memory

unikernel memory

interrupt

is application memory

(Developer happy)

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 50: Unikernels and another way of secure cloud computing

9/31

Where does performance come from?

Traditional style

NIC memory

kernel memory

interrupt

application memory

read()

Unikernel style

NIC memory

unikernel memory

interrupt

is application memory

(Developer happy)

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 51: Unikernels and another way of secure cloud computing

9/31

Where does performance come from?

Traditional style

NIC memory

kernel memory

interrupt

application memory

read()

Unikernel style

NIC memory

unikernel memory

interrupt

is application memory

(Developer happy)

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 52: Unikernels and another way of secure cloud computing

9/31

Where does performance come from?

Traditional style

NIC memory

kernel memory

interrupt

application memory

read()

Unikernel style

NIC memory

unikernel memory

interrupt

is application memory

(Developer happy)

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 53: Unikernels and another way of secure cloud computing

9/31

Where does performance come from?

Traditional style

NIC memory

kernel memory

interrupt

application memory

read()

Unikernel style

NIC memory

unikernel memory

interrupt

is application memory

(Developer happy)

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 54: Unikernels and another way of secure cloud computing

9/31

Where does performance come from?

Traditional style

NIC memory

kernel memory

interrupt

application memory

read()

Unikernel style

NIC memory

unikernel memory

interrupt

is application memory

(Developer happy)

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 55: Unikernels and another way of secure cloud computing

9/31

Where does performance come from?

Traditional style

NIC memory

kernel memory

interrupt

application memory

read()

Unikernel style

NIC memory

unikernel memory

interrupt

is application memory

(Developer happy)

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 56: Unikernels and another way of secure cloud computing

9/31

Where does performance come from?

Traditional style

NIC memory

kernel memory

interrupt

application memory

read()

Unikernel style

NIC memory

unikernel memory

interrupt

is application memory

(Developer happy)

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 57: Unikernels and another way of secure cloud computing

9/31

Where does performance come from?

Traditional style

NIC memory

kernel memory

interrupt

application memory

read()

Unikernel style

NIC memory

unikernel memory

interrupt

is application memory

(Developer happy)

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 58: Unikernels and another way of secure cloud computing

10/31

IntroductionRoles of an IT organizationHow to deploy?

Meat of UnikernelsLook ma, no OSWhat’s in a unikernel?Performance benefitsSecurity benefits

Unikernel examples

What’s next?Unmodified applications firstLocal demoIn Amazon EC2

Summary

Thanksc© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 59: Unikernels and another way of secure cloud computing

10/31

Security

I Reduced attack surface area.

I No unneeded kernel modules.I No Perl, shell...I Exploited environment is barely usable to useless.

I Some: language is type-safe.

I Some: can do 1 VM per request.

Happy Mr Burns

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 60: Unikernels and another way of secure cloud computing

10/31

Security

I Reduced attack surface area.I No unneeded kernel modules.

I No Perl, shell...I Exploited environment is barely usable to useless.

I Some: language is type-safe.

I Some: can do 1 VM per request.

Happy Mr Burns

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 61: Unikernels and another way of secure cloud computing

10/31

Security

I Reduced attack surface area.I No unneeded kernel modules.I No Perl, shell...

I Exploited environment is barely usable to useless.

I Some: language is type-safe.

I Some: can do 1 VM per request.

Happy Mr Burns

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 62: Unikernels and another way of secure cloud computing

10/31

Security

I Reduced attack surface area.I No unneeded kernel modules.I No Perl, shell...I Exploited environment is barely usable to useless.

I Some: language is type-safe.

I Some: can do 1 VM per request.

Happy Mr Burns

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 63: Unikernels and another way of secure cloud computing

10/31

Security

I Reduced attack surface area.I No unneeded kernel modules.I No Perl, shell...I Exploited environment is barely usable to useless.

I Some: language is type-safe.

I Some: can do 1 VM per request.

Happy Mr Burns

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 64: Unikernels and another way of secure cloud computing

10/31

Security

I Reduced attack surface area.I No unneeded kernel modules.I No Perl, shell...I Exploited environment is barely usable to useless.

I Some: language is type-safe.

I Some: can do 1 VM per request.

Happy Mr Burns

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 65: Unikernels and another way of secure cloud computing

10/31

Security

I Reduced attack surface area.I No unneeded kernel modules.I No Perl, shell...I Exploited environment is barely usable to useless.

I Some: language is type-safe.

I Some: can do 1 VM per request.

Happy Mr Burns

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 66: Unikernels and another way of secure cloud computing

11/31

Why only in 2013?

Virtualization provides uniform APIs for networkand I/O.

E.g. virtio for KVM, netfront/netback for Xen.

I Small set of drivers to implement.

I Makes it economic to create unikernels.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 67: Unikernels and another way of secure cloud computing

11/31

Why only in 2013?

Virtualization provides uniform APIs for networkand I/O.E.g. virtio for KVM, netfront/netback for Xen.

I Small set of drivers to implement.

I Makes it economic to create unikernels.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 68: Unikernels and another way of secure cloud computing

12/31

Table of ContentsIntroduction

Roles of an IT organizationHow to deploy?

Meat of UnikernelsLook ma, no OSWhat’s in a unikernel?Performance benefitsSecurity benefits

Unikernel examplesWhat’s next?

Unmodified applications firstLocal demoIn Amazon EC2

SummaryThanksc© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 69: Unikernels and another way of secure cloud computing

13/31

Classification

Niche : highly optimizedapplications/frameworks.

Generic : general-purpose applications:

Fat : yes POSIX. Compatible.Lean : no POSIX. Needs rewrite.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 70: Unikernels and another way of secure cloud computing

13/31

Classification

Niche : highly optimizedapplications/frameworks.

Generic : general-purpose applications:

Fat : yes POSIX. Compatible.Lean : no POSIX. Needs rewrite.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 71: Unikernels and another way of secure cloud computing

13/31

Classification

Niche : highly optimizedapplications/frameworks.

Generic : general-purpose applications:

Fat : yes POSIX. Compatible.Lean : no POSIX. Needs rewrite.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 72: Unikernels and another way of secure cloud computing

13/31

Classification

Niche : highly optimizedapplications/frameworks.

Generic : general-purpose applications:

Fat : yes POSIX. Compatible.

Lean : no POSIX. Needs rewrite.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 73: Unikernels and another way of secure cloud computing

13/31

Classification

Niche : highly optimizedapplications/frameworks.

Generic : general-purpose applications:

Fat : yes POSIX. Compatible.Lean : no POSIX. Needs rewrite.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 74: Unikernels and another way of secure cloud computing

14/31

Mirage OS

Generic lean.

I OCaml-only.

I ⇒ type-safe throughout the stack.

I VM boot time < 10ms

I ⇒ VM per request (inetd-like).

I ⇒ security and economy.

I Typical image sizes: 100s of KB.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 75: Unikernels and another way of secure cloud computing

14/31

Mirage OS

Generic lean.

I OCaml-only.

I ⇒ type-safe throughout the stack.

I VM boot time < 10ms

I ⇒ VM per request (inetd-like).

I ⇒ security and economy.

I Typical image sizes: 100s of KB.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 76: Unikernels and another way of secure cloud computing

14/31

Mirage OS

Generic lean.

I OCaml-only.

I ⇒ type-safe throughout the stack.

I VM boot time < 10ms

I ⇒ VM per request (inetd-like).

I ⇒ security and economy.

I Typical image sizes: 100s of KB.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 77: Unikernels and another way of secure cloud computing

14/31

Mirage OS

Generic lean.

I OCaml-only.

I ⇒ type-safe throughout the stack.

I VM boot time < 10ms

I ⇒ VM per request (inetd-like).

I ⇒ security and economy.

I Typical image sizes: 100s of KB.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 78: Unikernels and another way of secure cloud computing

14/31

Mirage OS

Generic lean.

I OCaml-only.

I ⇒ type-safe throughout the stack.

I VM boot time < 10ms

I ⇒ VM per request (inetd-like).

I ⇒ security and economy.

I Typical image sizes: 100s of KB.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 79: Unikernels and another way of secure cloud computing

14/31

Mirage OS

Generic lean.

I OCaml-only.

I ⇒ type-safe throughout the stack.

I VM boot time < 10ms

I ⇒ VM per request (inetd-like).

I ⇒ security and economy.

I Typical image sizes: 100s of KB.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 80: Unikernels and another way of secure cloud computing

14/31

Mirage OS

Generic lean.

I OCaml-only.

I ⇒ type-safe throughout the stack.

I VM boot time < 10ms

I ⇒ VM per request (inetd-like).

I ⇒ security and economy.

I Typical image sizes: 100s of KB.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 81: Unikernels and another way of secure cloud computing

14/31

Mirage OS

Generic lean.

I OCaml-only.

I ⇒ type-safe throughout the stack.

I VM boot time < 10ms

I ⇒ VM per request (inetd-like).

I ⇒ security and economy.

I Typical image sizes: 100s of KB.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 82: Unikernels and another way of secure cloud computing

15/31

OSv

Generic Fat.

I Linux ABIs.I Bonus: fast APIs.

I reported significant throughput increases onmemcached.

I Memory allocation tuning:

I JVM.I Memcached.I OOM Killer Manager!

I Subsecond boot times.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 83: Unikernels and another way of secure cloud computing

15/31

OSv

Generic Fat.

I Linux ABIs.

I Bonus: fast APIs.

I reported significant throughput increases onmemcached.

I Memory allocation tuning:

I JVM.I Memcached.I OOM Killer Manager!

I Subsecond boot times.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 84: Unikernels and another way of secure cloud computing

15/31

OSv

Generic Fat.

I Linux ABIs.I Bonus: fast APIs.

I reported significant throughput increases onmemcached.

I Memory allocation tuning:

I JVM.I Memcached.I OOM Killer Manager!

I Subsecond boot times.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 85: Unikernels and another way of secure cloud computing

15/31

OSv

Generic Fat.

I Linux ABIs.I Bonus: fast APIs.

I reported significant throughput increases onmemcached.

I Memory allocation tuning:

I JVM.I Memcached.I OOM Killer Manager!

I Subsecond boot times.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 86: Unikernels and another way of secure cloud computing

15/31

OSv

Generic Fat.

I Linux ABIs.I Bonus: fast APIs.

I reported significant throughput increases onmemcached.

I Memory allocation tuning:

I JVM.I Memcached.I OOM Killer Manager!

I Subsecond boot times.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 87: Unikernels and another way of secure cloud computing

15/31

OSv

Generic Fat.

I Linux ABIs.I Bonus: fast APIs.

I reported significant throughput increases onmemcached.

I Memory allocation tuning:I JVM.

I Memcached.I OOM Killer Manager!

I Subsecond boot times.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 88: Unikernels and another way of secure cloud computing

15/31

OSv

Generic Fat.

I Linux ABIs.I Bonus: fast APIs.

I reported significant throughput increases onmemcached.

I Memory allocation tuning:I JVM.I Memcached.

I OOM Killer Manager!

I Subsecond boot times.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 89: Unikernels and another way of secure cloud computing

15/31

OSv

Generic Fat.

I Linux ABIs.I Bonus: fast APIs.

I reported significant throughput increases onmemcached.

I Memory allocation tuning:I JVM.I Memcached.I OOM Killer Manager!

I Subsecond boot times.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 90: Unikernels and another way of secure cloud computing

15/31

OSv

Generic Fat.

I Linux ABIs.I Bonus: fast APIs.

I reported significant throughput increases onmemcached.

I Memory allocation tuning:I JVM.I Memcached.I OOM Killer Manager!

I Subsecond boot times.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 91: Unikernels and another way of secure cloud computing

15/31

OSv

Generic Fat.

I Linux ABIs.I Bonus: fast APIs.

I reported significant throughput increases onmemcached.

I Memory allocation tuning:I JVM.I Memcached.I OOM Killer Manager!

I Subsecond boot times.

Typical application: web services, data processing.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 92: Unikernels and another way of secure cloud computing

16/31Image source: http://osv.io/benchmarks/c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 93: Unikernels and another way of secure cloud computing

17/31

ClickOS

Niche.Optimized for network middleboxes:

I Firewalls.

I Intrusion Detection Systems.

I Load Balancers.

Fun fact: Xen network optimization to the extreme.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 94: Unikernels and another way of secure cloud computing

17/31

ClickOS

Niche.

Optimized for network middleboxes:

I Firewalls.

I Intrusion Detection Systems.

I Load Balancers.

Fun fact: Xen network optimization to the extreme.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 95: Unikernels and another way of secure cloud computing

17/31

ClickOS

Niche.Optimized for network middleboxes:

I Firewalls.

I Intrusion Detection Systems.

I Load Balancers.

Fun fact: Xen network optimization to the extreme.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 96: Unikernels and another way of secure cloud computing

17/31

ClickOS

Niche.Optimized for network middleboxes:

I Firewalls.

I Intrusion Detection Systems.

I Load Balancers.

Fun fact: Xen network optimization to the extreme.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 97: Unikernels and another way of secure cloud computing

17/31

ClickOS

Niche.Optimized for network middleboxes:

I Firewalls.

I Intrusion Detection Systems.

I Load Balancers.

Fun fact: Xen network optimization to the extreme.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 98: Unikernels and another way of secure cloud computing

17/31

ClickOS

Niche.Optimized for network middleboxes:

I Firewalls.

I Intrusion Detection Systems.

I Load Balancers.

Fun fact: Xen network optimization to the extreme.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 99: Unikernels and another way of secure cloud computing

17/31

ClickOS

Niche.Optimized for network middleboxes:

I Firewalls.

I Intrusion Detection Systems.

I Load Balancers.

Fun fact: Xen network optimization to the extreme.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 100: Unikernels and another way of secure cloud computing

18/31

Table of ContentsIntroduction

Roles of an IT organizationHow to deploy?

Meat of UnikernelsLook ma, no OSWhat’s in a unikernel?Performance benefitsSecurity benefits

Unikernel examplesWhat’s next?

Unmodified applications firstLocal demoIn Amazon EC2

SummaryThanksc© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 101: Unikernels and another way of secure cloud computing

19/31

What do we do next?

Nobody likes rewrites.

Take platforms (JVM, Erlang) and run unmodifiedapps.

I Fully immutable.

I Faster deployment and rollbacks.

I Smaller attack surface.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 102: Unikernels and another way of secure cloud computing

19/31

What do we do next?

Nobody likes rewrites.Take platforms (JVM, Erlang) and run unmodifiedapps.

I Fully immutable.

I Faster deployment and rollbacks.

I Smaller attack surface.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 103: Unikernels and another way of secure cloud computing

19/31

What do we do next?

Nobody likes rewrites.Take platforms (JVM, Erlang) and run unmodifiedapps.

I Fully immutable.

I Faster deployment and rollbacks.

I Smaller attack surface.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 104: Unikernels and another way of secure cloud computing

19/31

What do we do next?

Nobody likes rewrites.Take platforms (JVM, Erlang) and run unmodifiedapps.

I Fully immutable.

I Faster deployment and rollbacks.

I Smaller attack surface.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 105: Unikernels and another way of secure cloud computing

20/31

Local demo

Contents:

I Take a JVM/Spring application.

I Demo on standard Linux.

I Generate the unikernel.

I Run that unikernel locally.

Takeaways:

I Small image size.

I Trivial to implement.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 106: Unikernels and another way of secure cloud computing

20/31

Local demo

Contents:

I Take a JVM/Spring application.

I Demo on standard Linux.

I Generate the unikernel.

I Run that unikernel locally.

Takeaways:

I Small image size.

I Trivial to implement.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 107: Unikernels and another way of secure cloud computing

20/31

Local demo

Contents:

I Take a JVM/Spring application.

I Demo on standard Linux.

I Generate the unikernel.

I Run that unikernel locally.

Takeaways:

I Small image size.

I Trivial to implement.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 108: Unikernels and another way of secure cloud computing

20/31

Local demo

Contents:

I Take a JVM/Spring application.

I Demo on standard Linux.

I Generate the unikernel.

I Run that unikernel locally.

Takeaways:

I Small image size.

I Trivial to implement.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 109: Unikernels and another way of secure cloud computing

20/31

Local demo

Contents:

I Take a JVM/Spring application.

I Demo on standard Linux.

I Generate the unikernel.

I Run that unikernel locally.

Takeaways:

I Small image size.

I Trivial to implement.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 110: Unikernels and another way of secure cloud computing

20/31

Local demo

Contents:

I Take a JVM/Spring application.

I Demo on standard Linux.

I Generate the unikernel.

I Run that unikernel locally.

Takeaways:

I Small image size.

I Trivial to implement.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 111: Unikernels and another way of secure cloud computing

20/31

Local demo

Contents:

I Take a JVM/Spring application.

I Demo on standard Linux.

I Generate the unikernel.

I Run that unikernel locally.

Takeaways:

I Small image size.

I Trivial to implement.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 112: Unikernels and another way of secure cloud computing

21/31

Running in Amazon EC2

To create a VM image in AWS, do:

% qemu-img convert -f qcow2 -O raw 3.qemu 3.raw

% ./release-ec2.sh \

--override-image 3.raw \

--override-version 3 \

--region us-east-1

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 113: Unikernels and another way of secure cloud computing

22/31

AMI in EC2

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 114: Unikernels and another way of secure cloud computing

23/31

AMI in EC2

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 115: Unikernels and another way of secure cloud computing

24/31

Running OSv in EC2

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 116: Unikernels and another way of secure cloud computing

25/31

Try it out

I Run your unikernel in Free Tier right now.

I t2.micro - $0/month for 1 year.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 117: Unikernels and another way of secure cloud computing

25/31

Try it out

I Run your unikernel in Free Tier right now.

I t2.micro - $0/month for 1 year.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 118: Unikernels and another way of secure cloud computing

26/31

Table of ContentsIntroduction

Roles of an IT organizationHow to deploy?

Meat of UnikernelsLook ma, no OSWhat’s in a unikernel?Performance benefitsSecurity benefits

Unikernel examplesWhat’s next?

Unmodified applications firstLocal demoIn Amazon EC2

SummaryThanksc© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 119: Unikernels and another way of secure cloud computing

27/31

Summary

Library OS: OS embedded to your application.

I Small ⇒ scale quickly.

I Very efficient ⇒ economic.

I Reduced attack surface.

I Runs on public clouds: ⇒ try on EC2, for free.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 120: Unikernels and another way of secure cloud computing

27/31

Summary

Library OS: OS embedded to your application.

I Small ⇒ scale quickly.

I Very efficient ⇒ economic.

I Reduced attack surface.

I Runs on public clouds: ⇒ try on EC2, for free.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 121: Unikernels and another way of secure cloud computing

27/31

Summary

Library OS: OS embedded to your application.

I Small ⇒ scale quickly.

I Very efficient ⇒ economic.

I Reduced attack surface.

I Runs on public clouds: ⇒ try on EC2, for free.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 122: Unikernels and another way of secure cloud computing

27/31

Summary

Library OS: OS embedded to your application.

I Small ⇒ scale quickly.

I Very efficient ⇒ economic.

I Reduced attack surface.

I Runs on public clouds: ⇒ try on EC2, for free.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 123: Unikernels and another way of secure cloud computing

27/31

Summary

Library OS: OS embedded to your application.

I Small ⇒ scale quickly.

I Very efficient ⇒ economic.

I Reduced attack surface.

I Runs on public clouds: ⇒ try on EC2, for free.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 124: Unikernels and another way of secure cloud computing

28/31

Table of ContentsIntroduction

Roles of an IT organizationHow to deploy?

Meat of UnikernelsLook ma, no OSWhat’s in a unikernel?Performance benefitsSecurity benefits

Unikernel examplesWhat’s next?

Unmodified applications firstLocal demoIn Amazon EC2

SummaryThanksc© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 125: Unikernels and another way of secure cloud computing

29/31

Thanks

I Niels Brouwers (Amazon) for the right tools.

I Russel Pavlicek (Citrix) for spreading the word.

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 126: Unikernels and another way of secure cloud computing

30/31

We’re hiring!

I Check out amazon.jobs

I Also, contact me at [email protected]

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 127: Unikernels and another way of secure cloud computing

31/31

QA

c© 2015. Amazon Web Services, Inc. or its affiliates. All rights reserved.