Upload
jonas-rosland
View
947
Download
1
Embed Size (px)
Citation preview
Basics of a container
Service Discovery
CoreOS
Based on GentooKernel + Containers, nothing elseBuilt for running HA environmentsUpdates applied automatically
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
systemd
System management daemonServices, timers and one-off jobsLogging through journal
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 :)
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"
etcd automatic registration
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
fleet
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!
Demotime!