intro to coreos (in 5 minutes)

6
CoreOS in 5 minutes

Upload: leonid-mirsky

Post on 16-Jul-2015

109 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Intro to CoreOS (in 5 minutes)

CoreOS in 5 minutes

Page 2: Intro to CoreOS (in 5 minutes)

What is CoreOS?

○ A minimal Linux built to run docker/rocket containers○ Rethinking how a modern os for a datacenter should look like○ Doesn’t have a package manager, (almost) everything is a

container○ Facilitates atomic os updates○ Packages cluster coordination/bootstrap tools: etcd, fleet, coreos-

cloudinit

Page 3: Intro to CoreOS (in 5 minutes)

CoreOS Host Components

fleetd

systemd

docker

etcd

update-engine

- Init system

- Cluster level orchestration

- Key/Value store for service discovery and shared configuration

coreos-01

Page 4: Intro to CoreOS (in 5 minutes)

CoreOS Unit[Unit]

Description=ElasticSearch service

After=docker.service

Requires=docker.service

[Service]

ExecStart=/bin/bash -c '/usr/bin/docker run --rm --name %p-%i --publish 9200:9200 --volume /data/elasticsearch:/data \

$(/usr/bin/etcdctl get /services/elasticsearch/config/image)'

ExecStop=/usr/bin/docker stop %p-%i

[X-Fleet]

X-Conflicts=%p@*.service

MachineMetadata=profile=elasticsearch

Page 5: Intro to CoreOS (in 5 minutes)

CoreOS release channels

○ Separated release channels: stable, beta, alpha○ There are different update strategies:

○ Etcd-lock: No more than X instances at a time○ Off○ Reboot

○ Rollback won’t work on ec2 without an instance restart

Page 6: Intro to CoreOS (in 5 minutes)

Observations

○ Not all CoreOS parameters have sensible defaults○ Fleet is a very basic scheduler (PR #1055)○ DNS based service discovery can be added easily with skydns○ It is hard to “group” dependent services together