Top Banner
74
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CoreOS @ gluecon 2015
Page 2: CoreOS @ gluecon 2015

About MeCTO/CO-FOUNDERsystems engineer

@brandonphilipsgithub.com/philips

Page 3: CoreOS @ gluecon 2015

What is CoreOS?

Page 4: CoreOS @ gluecon 2015

What is CoreOS?

Page 5: CoreOS @ gluecon 2015
Page 6: CoreOS @ gluecon 2015
Page 7: CoreOS @ gluecon 2015

What is CoreOS?

Page 8: CoreOS @ gluecon 2015

Why build CoreOS?

Page 9: CoreOS @ gluecon 2015

reduce API contracts

minimal

Page 10: CoreOS @ gluecon 2015

kernelsystemdetcdsshdocker

pythonjavanginxmysqlopenssl

app

dis

tro

dist

ro d

istr

o di

stro

dis

tro

dist

ro d

istr

o di

stro

Page 11: CoreOS @ gluecon 2015

pythonjavanginxmysqlopenssl

app

dis

tro

dist

ro d

istr

o di

stro

dis

tro

dist

ro d

istr

o di

stro

kernelsystemdetcdsshdocker

Page 12: CoreOS @ gluecon 2015

pythonopenssl-A app1

dis

tro

dist

ro d

istr

o di

stro

dis

tro

dist

ro d

istr

o di

stro

javaopenssl-B app2

javaopenssl-B app3

kernelsystemdetcdsshdocker

Page 13: CoreOS @ gluecon 2015

CoreOS

pythonopenssl-A app1

dis

tro

dist

ro d

istr

o di

stro

dis

tro

dist

ro d

istr

o di

stro

javaopenssl-B app2

javaopenssl-B app3

Page 14: CoreOS @ gluecon 2015

CoreOS

container

dis

tro

dist

ro d

istr

o di

stro

dis

tro

dist

ro d

istr

o di

stro

container

container

Page 15: CoreOS @ gluecon 2015

https://github.com/philips/hacksfolder: system-api-tutorial

APIs

Page 16: CoreOS @ gluecon 2015

Linux syscalls

API

Page 17: CoreOS @ gluecon 2015

manual updates

Page 18: CoreOS @ gluecon 2015

automatic updates

Page 19: CoreOS @ gluecon 2015

automatic updates

Page 20: CoreOS @ gluecon 2015

atomic with rollback

auto updates

Page 21: CoreOS @ gluecon 2015
Page 22: CoreOS @ gluecon 2015
Page 23: CoreOS @ gluecon 2015

omaha

API

Page 24: CoreOS @ gluecon 2015
Page 25: CoreOS @ gluecon 2015

run and isolate apps

containers

Page 26: CoreOS @ gluecon 2015

http registry

image fetch

Page 27: CoreOS @ gluecon 2015

pid nsisolated pid 1

Page 28: CoreOS @ gluecon 2015

user nsisolated uid 0

Page 29: CoreOS @ gluecon 2015

network nsisolated netdev

Page 30: CoreOS @ gluecon 2015

mount nsisolated /

Page 31: CoreOS @ gluecon 2015

cgroupsmanage resources

Page 32: CoreOS @ gluecon 2015

cgroupscount resources

Page 33: CoreOS @ gluecon 2015

cgroupslimit resources

Page 34: CoreOS @ gluecon 2015

namespaces

API

Page 35: CoreOS @ gluecon 2015

cgroups

API

Page 36: CoreOS @ gluecon 2015

docker engine

Page 37: CoreOS @ gluecon 2015

REST

API

Page 38: CoreOS @ gluecon 2015
Page 39: CoreOS @ gluecon 2015

dbus

API

Page 40: CoreOS @ gluecon 2015

machines and clusters

configuration

Page 41: CoreOS @ gluecon 2015

get into the cluster

machine conf

Page 42: CoreOS @ gluecon 2015

#cloud-config

ssh_authorized_keys: - ssh-rsa AAAAB3NzaC1yc2E…

coreos: etcd: discovery: https://discovery.etcd.io/ba09c units: - name: etcd2.service command: start - name: fleet.service command: start

Page 43: CoreOS @ gluecon 2015

#cloud-config

ssh_authorized_keys: - ssh-rsa AAAAB3NzaC1yc2E…

coreos: etcd: discovery: https://discovery.etcd.io/ba09c units: - name: etcd2.service command: start - name: fleet.service command: start

Page 44: CoreOS @ gluecon 2015

#cloud-config

ssh_authorized_keys: - ssh-rsa AAAAB3NzaC1yc2E…

coreos: etcd: discovery: https://discovery.etcd.io/ba09c units: - name: etcd2.service command: start - name: fleet.service command: start

Page 45: CoreOS @ gluecon 2015

RESThypercalls

filesystems

API

Page 46: CoreOS @ gluecon 2015

what is running

cluster conf

Page 47: CoreOS @ gluecon 2015

k8s, discoverd, confd

services

Page 48: CoreOS @ gluecon 2015

what should run

cluster conf

Page 49: CoreOS @ gluecon 2015

locksmith

coordination

Page 50: CoreOS @ gluecon 2015

fleet, k8s

scheduling

Page 51: CoreOS @ gluecon 2015

etcd

API

Page 52: CoreOS @ gluecon 2015

etcd

Page 53: CoreOS @ gluecon 2015

/etcdistributed

Page 54: CoreOS @ gluecon 2015

Available

Page 55: CoreOS @ gluecon 2015

Available

Page 56: CoreOS @ gluecon 2015

Available

Page 57: CoreOS @ gluecon 2015

Unavailable

Page 58: CoreOS @ gluecon 2015

Available

Leader

Follower

Page 59: CoreOS @ gluecon 2015

Leader

Follower

Available

Page 60: CoreOS @ gluecon 2015

Leader

Follower

Temporarily Unavailable

Page 61: CoreOS @ gluecon 2015

Leader

Follower

Available

Page 62: CoreOS @ gluecon 2015

http+json

API

Page 63: CoreOS @ gluecon 2015

getting work to servers

scheduling

Page 64: CoreOS @ gluecon 2015

You

Scheduler API

Scheduler

Machine(s)

Page 65: CoreOS @ gluecon 2015

$ kubectl run-container my-nginx --image=nginx --replicas=1 --port=80

$ kubectl get podsPOD IPmy-nginx-97wt8 10.2.29.4

Page 66: CoreOS @ gluecon 2015

http+json

API

Page 67: CoreOS @ gluecon 2015

$ cat nginx.service[Service]ExecStart=/usr/bin/rkt \ docker://nginx

$ fleetctl start nginx.serviceJob nginx.service launched on e1cd2bcd.../172.17.8.101

Page 68: CoreOS @ gluecon 2015

http+json

API

Page 69: CoreOS @ gluecon 2015

while true { todo = diff(desState, curState) schedule(todo)}

Page 70: CoreOS @ gluecon 2015

while true { todo = diff(desState, curState) schedule(todo)}

Page 71: CoreOS @ gluecon 2015

while true { todo = diff(desState, curState) schedule(todo)}

Page 72: CoreOS @ gluecon 2015

while true { todo = diff(desState, curState) schedule(todo)}

Page 73: CoreOS @ gluecon 2015

the future

Page 74: CoreOS @ gluecon 2015