ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
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

More Related Content

CoreOS @ summer meetup in Utrecht

  • 2. Giant Swarm ¡ñ Simple Service Orchestration ¡ñ Based in Cologne, Germany ¡ñ Built on top of CoreOS http://giantswarm.io
  • 3. ¡ñ Minimal OS to 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 ¡ñ Highly available 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 ¡ñ Reboot strategies for CoreOS updates ¡ñ Uses etcd for distributed locks
  • 11. Fleet ¡ñ Fleet is 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 ¡ñ Reverse proxy for your service ¡ñ Keep service discovery out of your app
  • 18. CoreOS ¡ñ Great foundation to create flexible distributed infrastructures ¡ñ Unix philosophy
  • 19. Thanks for listening! Timo Derstappen @teemow http://giantswarm.io