16
CoreOS 101 Jonas Rosland Developer Advocate @jonasrosland [email protected] emccode.github.io EMC World 2015

CoreOS 101 - EMC World 2015

Embed Size (px)

Citation preview

Page 1: CoreOS 101 - EMC World 2015

CoreOS 101Jonas Rosland

Developer Advocate

@[email protected]

emccode.github.ioEMC World 2015

Page 2: CoreOS 101 - EMC World 2015

Basics of a container

Page 3: CoreOS 101 - EMC World 2015
Page 4: CoreOS 101 - EMC World 2015

Service Discovery

Page 5: CoreOS 101 - EMC World 2015
Page 6: CoreOS 101 - EMC World 2015

CoreOS

Based on GentooKernel + Containers, nothing elseBuilt for running HA environmentsUpdates applied automatically

Page 7: CoreOS 101 - EMC World 2015

Containers

Docker, of course, but also others like LXC and nspawnIsolation from other applicationsLink containers togetherLess overhead than VMs

Released container runtime engine Rocket recently

Page 8: CoreOS 101 - EMC World 2015

systemd

System management daemonServices, timers and one-off jobsLogging through journal

Page 9: CoreOS 101 - EMC World 2015

etcd

Highly available Key-Value database storeProvides service discovery and shared configurationsOthers like it are Consul and ZookeeperProvides a locking mechanism for safe(r) automatic updates

Public etcd service:

https://discovery.etcd.io/

This is frickin awesome, as you'll see :)

Page 10: CoreOS 101 - EMC World 2015

etcdctl command

$ set services/db1 10.0.0.101$ set services/db2 10.0.0.102$ set services/db-master db1

$ get services/db-master "db1"$ get services/db1 "10.0.0.101"

Page 11: CoreOS 101 - EMC World 2015

etcd automatic registration

Page 12: CoreOS 101 - EMC World 2015
Page 13: CoreOS 101 - EMC World 2015

fleet

Deploy docker containers on arbitrary hosts in a clusterDistribute services across a cluster using machine-level anti-affinityMaintain N instances of a serviceRe-scheduling on machine failureDiscover machines running in the cluster

Page 14: CoreOS 101 - EMC World 2015

fleet

Page 15: CoreOS 101 - EMC World 2015

Putting it all together

1. Create a systemd file for your service

2. Start the service using fleet

3. Register services in etcd

4. ...

5. Profit!

Page 16: CoreOS 101 - EMC World 2015

Demotime!