Timo Derstappen 
@teemow
Giant Swarm 
● Simple Service Orchestration 
● Based in Cologne, Germany 
● Built on top of CoreOS 
http://giantswarm.io
● Minimal OS to host your containers 
● Automatic Updates 
● Cluster Management 
● Service Discovery
CoreOS 101 
● Minimal Gentoo 
● PXE, OpenStack, AWS, GCE, Vagrant 
● Systemd, btrfs 
● Read-only rootfs (writable overlay)
CoreOS own tools 
● Etcd 
● Fleet 
● Locksmith 
● Cloud-config 
github.com/coreos
Etcd 
● Highly available K/V store 
● Basis for 
○ Configuration management 
○ Service Discovery 
● Raft consensus algorithm 
● REST Interface
Discovery API 
$ curl https://discovery.etcd.io/new 
https://discovery.etcd. 
io/463c1435f9f63c952e0899b1f459c0fe
Cloud Config 
● Initialization of your instances 
● Configure etcd, fleet, locksmith
Configure your cluster 
#cloud-config 
coreos: 
etcd: 
discovery: https://discovery.etcd.io/<token> 
addr: $private_ipv4:4001 
peer-addr: $private_ipv4:7001
Locksmith 
● Reboot strategies for CoreOS updates 
● Uses etcd for distributed locks
Fleet 
● Fleet is systemd for the cluster 
● Uses etcd 
● CLI and API to start your containers
Fleet Scheduler 
● Simple (eg. based on Metadata) 
● But resolves service dependencies! 
● More to come (eg. based on available 
resources)
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 stop %n
Launch a service 
# start 
fleetctl start redis.service 
# status 
fleetctl list-units 
fleetctl status redis.service 
fleetctl journal redis.service 
# stop 
fleetctl stop redis.service 
fleetctl destroy redis.service
Release it! 
● Load Balancer 
● App 
● Database
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
Thanks for listening! 
Timo Derstappen 
@teemow 
http://giantswarm.io

CoreOS @ summer meetup in Utrecht

  • 1.
  • 2.
    Giant Swarm ●Simple Service Orchestration ● Based in Cologne, Germany ● Built on top of CoreOS http://giantswarm.io
  • 3.
    ● Minimal OSto host your containers ● Automatic Updates ● Cluster Management ● Service Discovery
  • 4.
    CoreOS 101 ●Minimal Gentoo ● PXE, OpenStack, AWS, GCE, Vagrant ● Systemd, btrfs ● Read-only rootfs (writable overlay)
  • 5.
    CoreOS own tools ● Etcd ● Fleet ● Locksmith ● Cloud-config github.com/coreos
  • 6.
    Etcd ● Highlyavailable K/V store ● Basis for ○ Configuration management ○ Service Discovery ● Raft consensus algorithm ● REST Interface
  • 7.
    Discovery API $curl https://discovery.etcd.io/new https://discovery.etcd. io/463c1435f9f63c952e0899b1f459c0fe
  • 8.
    Cloud Config ●Initialization of your instances ● Configure etcd, fleet, locksmith
  • 9.
    Configure your cluster #cloud-config coreos: etcd: discovery: https://discovery.etcd.io/<token> addr: $private_ipv4:4001 peer-addr: $private_ipv4:7001
  • 10.
    Locksmith ● Rebootstrategies for CoreOS updates ● Uses etcd for distributed locks
  • 11.
    Fleet ● Fleetis systemd for the cluster ● Uses etcd ● CLI and API to start your containers
  • 12.
    Fleet Scheduler ●Simple (eg. based on Metadata) ● But resolves service dependencies! ● More to come (eg. based on available resources)
  • 13.
    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 stop %n
  • 14.
    Launch a service # start fleetctl start redis.service # status fleetctl list-units fleetctl status redis.service fleetctl journal redis.service # stop fleetctl stop redis.service fleetctl destroy redis.service
  • 15.
    Release it! ●Load Balancer ● App ● Database
  • 16.
    Sidekick ● Keep configuration out of your app
  • 17.
    Ambassador ● Reverseproxy for your service ● Keep service discovery out of your app
  • 18.
    CoreOS ● Greatfoundation to create flexible distributed infrastructures ● Unix philosophy
  • 19.
    Thanks for listening! Timo Derstappen @teemow http://giantswarm.io