coreos intro

Post on 27-Aug-2014

841 Views

Category:

Software

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

An introduction to CoreOS for the Docker Cologne Meetup.

TRANSCRIPT

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=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 kill %n

Launch a service# startfleetctl --tunnel my.coreos-cluster.com start redis.service# statusfleetctl --tunnel my.coreos-cluster.com list-unitsfleetctl --tunnel my.coreos-cluster.com status redis.servicefleetctl --tunnel my.coreos-cluster.com journal redis.service# stopfleetctl --tunnel my.coreos-cluster.com stop redis.servicefleetctl --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

top related