virtualization introducing container-native · introducing container-native virtualization cats and...

36
INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager Red Hat [email protected] / @xsgordon 10th May 2018 Fabian Deutsch Manager, Software Engineering Red Hat [email protected] / @dummdida

Upload: others

Post on 22-May-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

INTRODUCING CONTAINER-NATIVE VIRTUALIZATIONCats and Dogs Living Together

Stephen GordonPrincipal Product ManagerRed Hat

[email protected] / @xsgordon

10th May 2018

Fabian DeutschManager, Software EngineeringRed Hat

[email protected] / @dummdida

Page 2: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

FIRST A LITTLE HISTORY

Virtual Machines

Page 3: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

FIRST A LITTLE HISTORY

Virtual Machines Containers

Page 4: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

VIRTUAL MACHINES AND CONTAINERS

VIRTUAL MACHINES CONTAINERS

VM virtualizes the hardware Container virtualizes isolates the process

VM

OS Dependencies

Kernel

Hypervisor

Hardware

App App App App

Hardware

Container Host (Kernel)

Container

App

OS deps

Container

App

OS deps

Container

App

OS deps

Container

App

OS deps

Page 5: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

VIRTUAL MACHINES AND CONTAINERS

Each of these attributes can be a positive or a negative for a given workload.

Increasingly organizations have a mix of both.

Virtual Machine

Application

OS dependencies

Operating System Container Host

Container

Application

OS dependencies

Page 6: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

EXISTING SYSTEMS TREAT THESE SEPARATELY

RHEL

Physical Machine

Virtual Machine

RHEL

Physical Machine

Virtual Machine

Container

RHEL

Physical Machine

Container

Page 7: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

WHAT ABOUT EXISTING WORKLOADS?

CONTAINER INFRASTRUCTURE AND ORCHESTRATIONContainer Application and Kubernetes orchestration as provided by OpenShift are becoming the standard for new applications.

Page 8: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

WHAT ABOUT EXISTING WORKLOADS?

CONTAINER INFRASTRUCTURE AND ORCHESTRATIONContainer Application and Kubernetes orchestration as provided by OpenShift are becoming the standard for new applications.

VIRTUALIZED WORKLOADSVirtualized Workloads are not going anywhere fast! Business reasons (cost, time to market) and technical reasons (older/different operating system)

Page 9: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

WHAT ABOUT EXISTING WORKLOADS?

CONTAINER INFRASTRUCTURE AND ORCHESTRATIONContainer Application and Kubernetes orchestration as provided by OpenShift are becoming the standard for new applications.

VIRTUALIZED WORKLOADSVirtualized Workloads are not going anywhere fast! Business reasons (cost, time to market) and technical reasons (older/different operating system)

CONVERGING INFRASTRUCTUREHow can we bring these two worlds closer together?

Page 10: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

ANYCONTAINER

Amazon Web Services Microsoft Azure Google CloudOpenStackDatacenterLaptop

ANYINFRASTRUCTURE

APPLICATION LIFECYCLE MANAGEMENT

ENTERPRISE CONTAINER HOST

CONTAINER ORCHESTRATION AND MANAGEMENT(KUBERNETES)

OPENSHIFT CONTAINER PLATFORM

Benefit from:● Placement● Network security● Isolation● Quota● etc.

Page 11: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

WHAT IS CONTAINER-NATIVE VIRTUALIZATION?Technology enabling developer use of OpenShift Container Platform as a unified platform for building, modifying, and deploying applications residing in both containers and virtual

machines in a common, shared environment.

Add virtual machines to your OpenShift projects directly from the service catalog!

Page 12: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

CONTAINER-NATIVE VIRTUALIZATION

15

Leverages tried and trusted RHEL (KVM) virtualization capabilities.Technology Preview access in an upcoming release of Red Hat Cloud Suite.

Page 13: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

EXAMPLE USE CASE - START WITH A VM

Page 14: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

EXAMPLE USE CASE - BUILD NEW SERVICES

Page 15: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

EXAMPLE USE CASE - START DECOMPOSING

Page 16: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

Container

TOGETHER AT LAST

Virtual Machine

ENTERPRiSE CONTAINER HOST

Physical Machine

Container

Resultant virtual machines are able to run side by side directly on the same OpenShift nodes as application containers.

{Pods

Page 17: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

LEVERAGE EXISTING ECOSYSTEMS

Use native OpenShift Primed storage solutions or Red Hat OpenStack Platform storage solutions via OpenStack Cinder interface (cloning support recommended).

Container

Virtual Machine

ENTERPRiSE CONTAINER HOST

Physical Machine

Container

Page 18: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

DEEP DIVE

Page 19: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

Upstream Projects- KubeVirt

The virtual machine operator

- Containerized Data Importer (CDI)Importing disks

- Virt-v2v (APB)Importing a whole virtual machine

- OpenShift Web ConsoleWith UI extensions

Page 20: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

Import using virt-v2v● Not shown in the Keynote demo for CNV

● Virtual Machines are imported into CNV using virt-v2v

○ From VMware, libvirt, and ova

● Initial work with upstream to get it right

Page 21: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

OpenShift Web Console● Additions to OpenShift Web Console to display virtual machines alongside pods

○ Metrics from pods○ Direct reference to the underlying pod

● Creation of virtual machines from the UI via (if the specific service broker is enabled)○ Templates* (also work from the CLI)○ APBs (Ansible Playbook Bundles)

Page 22: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

Templates & Service Catalog● Virtual Machines can be created from OpenShift Templates like any other object

○ OpenShift Console was showing a new “Virtualization” category○ Parameters, metadata, …

● Template Service was used to make the Template discoverable in the Service Catalog

● Ansible Playbook Bundles (APBs) can be used for more complex setups

Page 23: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

Disks - Import and storage● Virtual Machine disks are mapped to and stored on PersistentVolumes

○ 1:1 mapping of disk to PV - Alignment with Kubernetes concepts○ Mutable and immutable○ Benefit from the Kubenretes/OpenShift ecosystem and thus indirectly from

OpenStack Cinder and it’s own ecosystem

● Virtual Machine disks are imported using CDI (Containerized Disk Importer)○ Ability to fetch disk images via http, …○ Upload is in the works

Page 24: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

Offline and running Virtual Machine● Offline Virtual Machine● Define a virtual machine without

running it

● Comparable to idling deployment

● Running Virtual Machine● Created from the template section of

an offline virtual machine

● Comparable to how pods are created from deployments

Page 25: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

Scheduling● Virtual Machine are scheduled as pods

○ Same set of features (affinity/anti-affinity, labels and selectors, taints and tolerations)

○ Custom scheduler as needed

● Applications within virtual machines are exported using Service and Routes○ Selection using labels and selectors

Page 26: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

Virtual Machine Operator and API● Virtual Machines have their own kind

○ Ability to express all common virtual machine parameters and actions

○ Targeted feature set is comparable to libvirt

● Implemented as a CRD○ Inheriting authn, authz, client

ool support, …

apiVersion: kubevirt.io/v1alpha1kind: VirtualMachinemetadata: name: vm-fedoraspec: domain: devices: disks: … resources: requests: memory: 1024M volumes: …status: interfaces: - ipAddress: 172.17.0.12 nodeName: localhost phase: Running

Page 27: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

Virtual Machines and Pods● Virtual Machines live in pods

○ Transparent to higher-level management systems (monitoring, metrics, …)

○ Technically: Not worse than today

● Virtual Machines leverage pods○ Metadata - Labels and

annotations, passed through and additional

○ CPU and memory resources○ Affinity and anti-affinity○ Storage and network

● Virtual Machines specifics○ Specific events

Page 28: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

Virtual machine client tool● Additional server sided virtualization functional needs to be exposed

○ Connecting to consoles○ Starting and stopping○ Live migration

● Leveraging the existing kubectl plugin mechanism○ Standalone or as a plugin

$ kubectl plugin virt start myvm

$ kubectl plugin virt vnc myvm

Page 29: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

Network - Connectivity and service integration● Virtual Machine are connected to the regular pod network

○ From the outside there is no difference between a VM and pod

● Applications within virtual machines are exported using Service and Routes○ Selection using labels and selectors

● Advanced networking (SR-IOC, L2, infiniband, …) is under discussion in upstream Kubernetes

Page 30: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

KataContainers? gVisor?● Another use of KVM in the Kubernetes context

● Different use-case: Improve security of container workloads

○ Adding an isolation layer to pods

● Not suited or aimed to run general purpose virtual machines

Page 32: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

FUTURE PLANS

Page 33: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

FUTURE PLANSTechnology Preview enabled with OpenShift Container Platform in an upcoming release of

Red Hat Cloud Suite.

We are looking for early adopters now!

Current “wish list”:

○ Additional VM life-cycle actions○ Turn-Key storage solutions○ Additional networking options (Multi-net? SR-IOV?)○ VM ReplicaSets, DaemonSets, etc.○ Istio

Page 34: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

We Want to Hear From You!

Or visit the survey booth in the Feedback Zone located in:

Moscone WestL2 Lobby

Provide your input on your infrastructure and use cases

Take this surveyhttps://bit.ly/2HJbUfx

Page 35: VIRTUALIZATION INTRODUCING CONTAINER-NATIVE · INTRODUCING CONTAINER-NATIVE VIRTUALIZATION Cats and Dogs Living Together Stephen Gordon Principal Product Manager ... Laptop Datacenter

THANK YOUplus.google.com/+RedHat

linkedin.com/company/red-hat

youtube.com/user/RedHatVideos

facebook.com/redhatinc

twitter.com/RedHat