coreos @ summer meetup in utrecht

Post on 15-Jan-2015

1.000 Views

Category:

Documents

4 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

Timo Derstappen@teemow

● Simple Service Orchestration● Based in Cologne, Germany● Built on top of CoreOS

http://giantswarm.io

Giant Swarm

● 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/newhttps://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=0EnvironmentFile=/etc/environmentEnvironment="IMAGE=teemow/redis"ExecStartPre=/usr/bin/docker pull $IMAGEExecStart=/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# startfleetctl start redis.service# statusfleetctl list-unitsfleetctl status redis.servicefleetctl journal redis.service# stopfleetctl stop redis.servicefleetctl 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

Timo Derstappen@teemow

http://giantswarm.io

Thanks for listening!

top related