oscon 2017: build your own container-based system with the moby project

70
Patrick Chanezon, @chanezon David Chung, @dchungsf Mindy Preston, @mindypreston Build your own container-based system with the Moby project May 2017

Upload: patrick-chanezon

Post on 21-Jan-2018

2.806 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Oscon 2017: Build your own container-based system with the Moby project

Patrick Chanezon, @chanezon

David Chung, @dchungsf

Mindy Preston, @mindypreston

Build your own container-based system

with the Moby project

May 2017

Page 2: Oscon 2017: Build your own container-based system with the Moby project

French

Polyglot

Platforms

Software Plumber

San Francisco

Developer Relations

@chanezon

Page 3: Oscon 2017: Build your own container-based system with the Moby project

Docker

Page 4: Oscon 2017: Build your own container-based system with the Moby project

The world needs

tools of mass innovation

Page 5: Oscon 2017: Build your own container-based system with the Moby project

A programmable Internet would be the ultimate

tool of mass innovation

Page 6: Oscon 2017: Build your own container-based system with the Moby project

A commercial product,

built on

a development platform,

built on

infrastructure,

built on

standards.

Docker is building a stack to program the Internet

Page 7: Oscon 2017: Build your own container-based system with the Moby project

Docker is building a stack to program the Internet

CE

EE

Page 8: Oscon 2017: Build your own container-based system with the Moby project

enterprise edition

Ubuntu

Fedora

Mac

Azure

CentOS

Windows 10

AWS

Debian

community edition

Ubuntu

Windows Server

Azure

CentOS

Suse

Red Hat

AWS

Oracle Linux

Page 9: Oscon 2017: Build your own container-based system with the Moby project

Orchestration

Container Runtime

OS

Infrastructure Management

Container Platform Layers

Application Services

Page 10: Oscon 2017: Build your own container-based system with the Moby project

Docker is a platform made of components

Raft StoreNode

IdentitySecrets

Routing

Mesh

Overlay

Networking

Swarm Orchestration

Engine

Application Services

Page 11: Oscon 2017: Build your own container-based system with the Moby project

12,000,000,000

11,000,000,000

10,000,000,000

9,000,000,000

8,000,000,000

7,000,000,000

6,000,000,000

5,000,000,000

4,000,000,000

3,000,000,000

2,000,000,000

1,000,000,000

Notary

runC

containerd

HyperKit , VPNKit, DataKit

SwarmKit

libcontainer

libnetwork

InfraKit

2013 2014 2015 2016 2017

1M2014

PULLS

1B2015

PULLS

6B2016

PULLS

12B2017

PULLS

linuxKit

Page 12: Oscon 2017: Build your own container-based system with the Moby project

LinuxKitA toolkit for building secure, portable and lean operating systems for containers

Page 13: Oscon 2017: Build your own container-based system with the Moby project

Taking Dockermulti-platform

“I want Docker for X”

Page 14: Oscon 2017: Build your own container-based system with the Moby project

Desktop Server Cloud

I want Docker for…

Page 15: Oscon 2017: Build your own container-based system with the Moby project

Not every platform provides a Linux subsystem

Page 16: Oscon 2017: Build your own container-based system with the Moby project

Not every platform provides a Linux subsystem

Orchestration

Container Runtime

Linux Subsystem

Infrastructure Management

Application Services

Page 17: Oscon 2017: Build your own container-based system with the Moby project

The container movement needs asecure, lean, portable subsystem

Page 18: Oscon 2017: Build your own container-based system with the Moby project

The container movement needs

a secure, lean, portable Linux subsystem.

introducing

Page 19: Oscon 2017: Build your own container-based system with the Moby project

Only works with

containers

- Smaller attack

surface

- Immutable

infrastructure

- Sandboxed system

services

- Specialized patches

and configuration

Incubator for

security innovations

- Wireguard,

Landlock, KSPP

- MirageOS type

safe system

daemons

Community-first

security process

- Linux is too big

for any one

company to

secure it

- Participate in

existing Linux

security efforts

1. LinuxKit: a SECURE Linux subsystem

Page 20: Oscon 2017: Build your own container-based system with the Moby project

- Minimal size, minimal boot time

- All system services are containers

- Everything can be removed or

replaced

2. LinuxKit: a LEAN Linux subsystem

Page 21: Oscon 2017: Build your own container-based system with the Moby project

- Desktop, server, IoT, mainframe

- Intel & ARM

- Bare metal & virtualized

3. LinuxKit: a PORTABLE Linux subsystem

Page 22: Oscon 2017: Build your own container-based system with the Moby project

Docker and Microsoft collaborate to bringLinux containers to Windows

+ +

Page 23: Oscon 2017: Build your own container-based system with the Moby project

https://github.com/linuxkit/linuxkit

Get Started with LinuxKit

Page 24: Oscon 2017: Build your own container-based system with the Moby project

MobyAn open framework to assemble specialized container systems without reinventing the wheel.

Page 25: Oscon 2017: Build your own container-based system with the Moby project

Pioneers 2013 - 2014

Page 26: Oscon 2017: Build your own container-based system with the Moby project

Production Model: open-source!

Page 27: Oscon 2017: Build your own container-based system with the Moby project

Use case: cloud native apps on Linux server

Early Adopters 2015 - 2016

Page 28: Oscon 2017: Build your own container-based system with the Moby project

Production Model: OPEN COMPONENTS

Page 29: Oscon 2017: Build your own container-based system with the Moby project

Mainstream 2017 - 2018Containers are spreading to every category of computing:

server, datacenter, cloud, IoT, desktop, mobile…

Page 30: Oscon 2017: Build your own container-based system with the Moby project

Case study:

Specializing Docker for the mainstream

Desktop Server Cloud

Page 31: Oscon 2017: Build your own container-based system with the Moby project

The open component model shows its limits…

Page 32: Oscon 2017: Build your own container-based system with the Moby project

The auto industry has solved this problem: COMMON ASSEMBLIES.

Page 33: Oscon 2017: Build your own container-based system with the Moby project

Scaling the Docker production model: share components AND

ASSEMBLIES.

Page 34: Oscon 2017: Build your own container-based system with the Moby project

It’s time to take our ecosystem to the next level…

By collaborating on components AND COMMON ASSEMBLIES.

Page 35: Oscon 2017: Build your own container-based system with the Moby project
Page 36: Oscon 2017: Build your own container-based system with the Moby project

– Library of 80+ components

– Package your own

components as containers

– Reference assemblies

deployed on millions of nodes

– Create your own assemblies

or start from an existing one

A framework to assemble

specialized container

systems without

reinventing the wheel.

Page 37: Oscon 2017: Build your own container-based system with the Moby project

Docker uses Moby for its

open-source

– Thousands of contributors,

hundreds of patches/week

– Component development

– Specialized assembly

development

– Integration tests

– Architecture design

– Integration with other projects

– Experimentation and bleeding

edge features

Page 38: Oscon 2017: Build your own container-based system with the Moby project

Docker uses Moby for its

open-source...

and so can you!

– Community-run

– Open governance inspired by

the Fedora project

– Plays well with existing

projects - no donation

necessary!

Page 39: Oscon 2017: Build your own container-based system with the Moby project

Moby and Docker

Page 40: Oscon 2017: Build your own container-based system with the Moby project

What it means for you

Moby helps you

innovate without tying

you to Docker

System BuildersDocker Users

Docker will better leverage

the ecosystem to innovate

faster for you

Page 41: Oscon 2017: Build your own container-based system with the Moby project

Moby transforms multi-month R&D projects into weekend projects.

Page 42: Oscon 2017: Build your own container-based system with the Moby project

locked-down Linux with remote attestation

Weekend project #1:

Notary

Page 43: Oscon 2017: Build your own container-based system with the Moby project

custom CI/CD stack

Weekend project #2:

Notary Registry Docker Builder

+

Page 44: Oscon 2017: Build your own container-based system with the Moby project

custom CI/CD stack + Debian+ Terraform

Weekend project #3:

Notary Docker Builder

+

Registry

Page 45: Oscon 2017: Build your own container-based system with the Moby project

“RedisOS”

Weekend project #4:

Page 46: Oscon 2017: Build your own container-based system with the Moby project

"RedisOS"for Windows

"RedisOS"for Mac

"RedisOS"for bare metal

HyperKit

bare metal

Page 47: Oscon 2017: Build your own container-based system with the Moby project

Etcd clustering on Google Cloud

Weekend project #5:

Page 48: Oscon 2017: Build your own container-based system with the Moby project

SSHD

Kubernetes on the Mac

Weekend project #6:

HyperKit

Page 49: Oscon 2017: Build your own container-based system with the Moby project

Getting Started

- Blog https://mobyproject.org/blog

- Twitter @moby

- Github moby/moby

Page 50: Oscon 2017: Build your own container-based system with the Moby project

Let’s take containers mainstream!

Page 51: Oscon 2017: Build your own container-based system with the Moby project
Page 52: Oscon 2017: Build your own container-based system with the Moby project

InfraKitA toolkit for building declarative, self-healing infrastructure.

Page 53: Oscon 2017: Build your own container-based system with the Moby project

What is it?

53

• Launched at LinuxCon, Berlin in October, 2016.

• Toolkit for building declarative, self-managing

distributed applications

• Active management with active controllers

• scaling groups, rolling updates

• monitoring / health checks

• connecting nodes to L4 / ingress

• Declarative infrastructure

Page 54: Oscon 2017: Build your own container-based system with the Moby project

Architecture

CLI

API

Page 55: Oscon 2017: Build your own container-based system with the Moby project

container orchestration

Where does it fit?

55

kubectl run nginx --image=nginx

gcloud container node-pools list --zone us-

central1-f --cluster MyWorkers

aws autoscaling update-auto-scaling-group

--auto-scaling-group-name MyWorkers

docker create service nginx …

infrakit group describe workers

az vmss create --resource-group vmss-

test-1 --name MyWorkers

container orchestration

infrastructure orchestrationinfrastructure orchestration

list, err :=

group.Controller.Describe(“workers”)

Page 56: Oscon 2017: Build your own container-based system with the Moby project

App Opscontainer orchestrationApp Ops

One console across environments

56

kubectl run nginx --image=nginx docker create service nginx …

infrakit group describe workers

container orchestration

infrastructure orchestration

list, err :=

group.Controller.Describe(“workers”)

AWS RackHDAZ GCP OneVIEWMAASKVM VMW

Cloud Ops Hardware OpsCluster Ops

Page 57: Oscon 2017: Build your own container-based system with the Moby project

Configuration

Example config file (zk.conf): Group configuration = Instance + Flavor

{"Properties": {

/* raw configuration */

}}

{"groups" : {

"my_zookeeper_nodes" : {"Properties" : {

"Instance" : {"Plugin": "instance-vagrant","Properties": {

"Box": "bento/ubuntu-16.04"}

},"Flavor" : {

"Plugin": "flavor-zookeeper","Properties": {

"type": "member","IPs": ["192.168.1.200", "192.168.1.201", "192.168.1.202"]

}}

}}

}}

Page 58: Oscon 2017: Build your own container-based system with the Moby project

Current Status

Page 59: Oscon 2017: Build your own container-based system with the Moby project

Support more platforms

59

• Compute:

• Bare-metal: HP OneView, MAAS, RackHD

• Public cloud: AWS, GCP

• MacOS X (HyperKit); Docker containers

• Coming soon: Azure, IBM, Digital Ocean,

Packet, libvirt

• Other resource types

• AWS - vpc, subnets, gateways, etc.

Page 60: Oscon 2017: Build your own container-based system with the Moby project

Improve usability

60

• Templates

• Complex scripts and configuration in any format;

no more escape quotes in JSON

• Fetch templates from remote repositories

• Playbooks

• CLI - flags, prompts — config driven and

dynamic

• Share “playbooks” from remote repositories

Page 61: Oscon 2017: Build your own container-based system with the Moby project

Improve core system

61

• High Availability — Swarm Mode or etcd

• New Plugin types — Metadata and Events

• Metadata: cluster-wide sysfs and reflection

• Events - publish / subscribe

• Remote client access: infrakit -H host:port to remote cluster

Page 62: Oscon 2017: Build your own container-based system with the Moby project

Road Map

Page 63: Oscon 2017: Build your own container-based system with the Moby project

Use Cases

63

• Support container orchestration

• bootstrapping + day N management

• API for cluster autoscaling

• k8s, Docker Swarm Mode

• Bare-metal + GPU provisioning

• IoT — LinuxKit integration / custom kernel

deployment

Page 64: Oscon 2017: Build your own container-based system with the Moby project

Improve usability

64

• Finalize API / Schema for 1.0

• Make it easy to consume

• Simplify setup - fewer daemons and binaries

• Embeddable / vendor API

• Sensible CLI for stable / experimental features

• Make it easy to extend / contribute

• metadata / instance plugins

• playbooks / reusable templates

• community CI / compatibility testing

• Documentation

Page 65: Oscon 2017: Build your own container-based system with the Moby project

Improve core system

65

• Provisioning of diverse resource types

• networks / proxies / load balancers

• GPU

• Stability / performance of core controllers

• Asynchronous messaging - mqtt, natsd, amqp

• Monitoring + Health check SPI

Page 66: Oscon 2017: Build your own container-based system with the Moby project

Support more platforms

66

• Direct libvirt / KVM / CUDA

• Better bare-metal / hardware ops integration

• Kernel image build pipeline — LinuxKit

Build, test, and deploy clusters from infrastructure

definitions to kernel images

Page 67: Oscon 2017: Build your own container-based system with the Moby project

Get involved

https://github.com/docker/infrakit

dockercommunity.slack.com: #infrakit

Page 68: Oscon 2017: Build your own container-based system with the Moby project
Page 69: Oscon 2017: Build your own container-based system with the Moby project

Learn More at OSCON

- Mindy Preston, Amir Chaudhry’s

“MirageOS 3: Smaller, lighter, and more transparent”

Wednesday 4:15 pm

- David Chung, Bill Farner

“InfraKit: A toolkit for infrastructure orchestration”

Thursday 11 am

Page 70: Oscon 2017: Build your own container-based system with the Moby project

THANK YOU