KURMA - A Containerized Container Platform - KubeCon 2016

36

Transcript of KURMA - A Containerized Container Platform - KubeCon 2016

Page 1: KURMA - A Containerized Container Platform - KubeCon 2016
Page 2: KURMA - A Containerized Container Platform - KubeCon 2016

2016

Page 3: KURMA - A Containerized Container Platform - KubeCon 2016

In the beginning…(2012)

Page 4: KURMA - A Containerized Container Platform - KubeCon 2016

The Go Landscape2012

Page 5: KURMA - A Containerized Container Platform - KubeCon 2016

Apcera PlatformThe Instance Manager

Page 6: KURMA - A Containerized Container Platform - KubeCon 2016

Instance ManagerState Machine Apocalypse

● Started out simple, but naive about the future● Few small libraries…● … but all integration logic was central

● 8 states● 53 function handlers

Page 7: KURMA - A Containerized Container Platform - KubeCon 2016

Existing Weight

● Ubuntu base OS● CAPS deployment● .deb packaging● Operational tooling

Page 8: KURMA - A Containerized Container Platform - KubeCon 2016

System Skew is a Problem

● Deploys non-atomic● Different lifecycle per host● Operational access

Page 9: KURMA - A Containerized Container Platform - KubeCon 2016
Page 10: KURMA - A Containerized Container Platform - KubeCon 2016

A New ModelKurma

● Minimize host dependencies● Everything is a container● Simple notions that could be easily extended● Simple, well defined APIs

Page 11: KURMA - A Containerized Container Platform - KubeCon 2016

What is Kurma made of?

Existing● Go + C

● App Container (AppC)

● Apcera’s existing instrumentation

Coming soon● Go + C

● AppC

● libcontainer based

● CNI for networking

Page 12: KURMA - A Containerized Container Platform - KubeCon 2016

What is Kurma made of?

Existing● Go + C

● App Container (AppC)

● Apcera’s existing instrumentation

Coming soon● Go + C

● AppC

● libcontainer based

● CNI for networking

Page 13: KURMA - A Containerized Container Platform - KubeCon 2016

Delivery

kurmad● Existing host

● Download and run

● Immediately benefit

● Depends on host kernel and libc

kurmaOS● Minimalist distro

● Services as containers

● A/B partition model

● Console is just a container

Page 14: KURMA - A Containerized Container Platform - KubeCon 2016

Delivery

kurmad● Existing host

● Download and run

● Immediately benefit

● Depends on host kernel and libc

kurmaOS● Minimalist distro

● Services as containers

● A/B partition model

● Console is just a container

Page 15: KURMA - A Containerized Container Platform - KubeCon 2016

KurmaProcess Model

Page 16: KURMA - A Containerized Container Platform - KubeCon 2016

KurmaStager Process

Page 17: KURMA - A Containerized Container Platform - KubeCon 2016

KurmaUser Processes

Page 18: KURMA - A Containerized Container Platform - KubeCon 2016

StagerPluggable Process Orchestration

● Responsible for instrumenting the pod● Packaged as a signed, trusted ACI image● Gets own mount and network namespace

Page 19: KURMA - A Containerized Container Platform - KubeCon 2016

Stager API

● Simplest unit of work: an executable● Setup via image ‘Exec’ setting● Other calls through expected executables

– /opt/stager/run

– /opt/stager/status

– /opt/stager/logs

– ...

Page 20: KURMA - A Containerized Container Platform - KubeCon 2016

KurmaReusable Unit

Page 21: KURMA - A Containerized Container Platform - KubeCon 2016

KurmaReusable Unit for Extensibility

Page 22: KURMA - A Containerized Container Platform - KubeCon 2016

Networking API

● ACI image● Passes along JSON configuration● Executes commands to setup networking on

other containers– /opt/network/add <ns> <container-id>

– /opt/network/del <ns> <container-id>

Page 23: KURMA - A Containerized Container Platform - KubeCon 2016

KurmaReusable Unit for Extensibility

/opt/stager/run cni /opt/network/add ...

Page 24: KURMA - A Containerized Container Platform - KubeCon 2016

KurmaExtensibility Through Reuse

Page 25: KURMA - A Containerized Container Platform - KubeCon 2016

KurmaExtensibility Through Reuse

Page 26: KURMA - A Containerized Container Platform - KubeCon 2016

KurmaExtending Boundries with Semantics

Page 27: KURMA - A Containerized Container Platform - KubeCon 2016

KurmaRemote API

Page 28: KURMA - A Containerized Container Platform - KubeCon 2016

Kubernetes + Kurma

Page 29: KURMA - A Containerized Container Platform - KubeCon 2016

Why?

● Kurma usage outside Apcera● Increased platform flexibility● Integrating with broader community

Page 30: KURMA - A Containerized Container Platform - KubeCon 2016

Kubelet

● Has existing Runtime interface● Rich interface for engine communication● Kubelet is a bit of a leaky abstraction● Workarounds for Dockerisms

Page 31: KURMA - A Containerized Container Platform - KubeCon 2016

Testing

● Mystical● Documentation gaps● Excellent Github/PR integration

Page 32: KURMA - A Containerized Container Platform - KubeCon 2016

Codebase

● Godep pains● “hack” directory?● Documentation gaps● Interface movement

Runtime.ConvertPodStatusToAPIPodStatus()

Page 33: KURMA - A Containerized Container Platform - KubeCon 2016

Kurmanetes

● Maturing Kurma based on Kubernetes needs– Pods

– Networking

– Image management

● Runtime abstraction nearly complete

Page 34: KURMA - A Containerized Container Platform - KubeCon 2016

Kurmanetes

● Done– Pod management

– Image retrieval and management

● Remaining– Landing Kurma’s pod/stager branch

– cAdvisor integration

– Integration testing

– Work towards improving the abstraction leaks

Page 35: KURMA - A Containerized Container Platform - KubeCon 2016

Questions?

Page 36: KURMA - A Containerized Container Platform - KubeCon 2016

Resources

Kurmakurma.io

github.com/apcera/kurma

[email protected]

@krobertson

We’re hiring for the Kurma team.