Timo Derstappen
@teemow
CoreOS Introduction
CoreOS
● Minimal OS to host your containers
● Automatic Updates
● Cluster Management
● Service Discovery
CoreOS
● distributed
containers
● configuration in
etcd
CoreOS 101
● minimal Gentoo
● PXE, KVM, AWS, OpenStack, Vagrant
● read-only rootfs (writable overlay)
● cloud config
● etcd
● systemd / fleet
● locksmith
Cloud Config
● handles early initialization of a cloud
instance
● configure fleet, etcd
● create users
● write files
● etc...
Etcd
● Highly available K/V store
● Basis for
○ Configuration management
○ Service Discovery
● Raft consensus algorithm
● Discovery API
● REST Interface
Locksmith
● reboot strategies for CoreOS updates
● uses etcd for distributed locks
Fleet
● Define and launch containers
● Fleet is systemd for the cluster
● Utilizes etcd + systemd
Unit file
[Unit]
Description=A Redis Server
[Service]
TimeoutStartSec=0
EnvironmentFile=/etc/environment
Environment="IMAGE=teemow/redis"
ExecStartPre=/usr/bin/docker pull $IMAGE
ExecStart=/bin/bash -c "exec /usr/bin/docker run --rm -p
$COREOS_PRIVATE_IPV4::6379 --name %n $IMAGE"
ExecStop=-/usr/bin/docker kill %n
Launch a service
# start
fleetctl --tunnel my.coreos-cluster.com start redis.service
# status
fleetctl --tunnel my.coreos-cluster.com list-units
fleetctl --tunnel my.coreos-cluster.com status redis.service
fleetctl --tunnel my.coreos-cluster.com journal redis.service
# stop
fleetctl --tunnel my.coreos-cluster.com stop redis.service
fleetctl --tunnel my.coreos-cluster.com destroy redis.service
CoreOS
● distributed
containers
● configuration in
etcd
Sidekick
● Keep
configuration out
of your app
Ambassador
● Reverse proxy for
your service
● Keep service
discovery out of
your app
CoreOS
● Great foundation to create flexible distributed
infrastructures
● Unix philosophy
Lessons Learned
● 150+ Instances on AWS
● Micro Services
● Polyglot Persistence
● DevOps

CoreOS intro