7/25/2019 CoreOS Overview @ LinuxCon US 2014
1/75
7/25/2019 CoreOS Overview @ LinuxCon US 2014
2/75
About MeCTO/CO-FOUNDER
systems engineer
@brandonphilipsgithub.com/philips
7/25/2019 CoreOS Overview @ LinuxCon US 2014
3/75
What is CoreOS?
7/25/2019 CoreOS Overview @ LinuxCon US 2014
4/75
What is CoreOS?
7/25/2019 CoreOS Overview @ LinuxCon US 2014
5/75
7/25/2019 CoreOS Overview @ LinuxCon US 2014
6/75
7/25/2019 CoreOS Overview @ LinuxCon US 2014
7/75
Why build CoreOS?
7/25/2019 CoreOS Overview @ LinuxCon US 2014
8/75
reduce API contracts
minimal
7/25/2019 CoreOS Overview @ LinuxCon US 2014
9/75
kernel
systemdetcd
sshdocker
python
javanginx
mysqlopenssl
app
distrod
istro
distrod
istrod
istrod
istrod
istr
7/25/2019 CoreOS Overview @ LinuxCon US 2014
10/75
python
javanginx
mysqlopenssl
app
distrod
istro
distrod
istrod
istrod
istrod
istr
kernel
systemdetcd
sshdocker
7/25/2019 CoreOS Overview @ LinuxCon US 2014
11/75
python
openssl-A app1
distrod
istro
distrod
istrod
istrod
istrod
istr
javaopenssl-B
app2
javaopenssl-B
app3
kernel
systemdetcd
sshdocker
7/25/2019 CoreOS Overview @ LinuxCon US 2014
12/75
CoreOS
python
openssl-A app1
distrod
istro
distrod
istrod
istrod
istrod
istr
javaopenssl-B
app2
javaopenssl-B
app3
7/25/2019 CoreOS Overview @ LinuxCon US 2014
13/75
CoreOS
container
distrod
istro
distrod
istrod
istrod
istrod
istr
container
container
7/25/2019 CoreOS Overview @ LinuxCon US 2014
14/75
manualupdates
7/25/2019 CoreOS Overview @ LinuxCon US 2014
15/75
automaticupdates
7/25/2019 CoreOS Overview @ LinuxCon US 2014
16/75
automaticupdates
7/25/2019 CoreOS Overview @ LinuxCon US 2014
17/75
atomic with rollback
auto updates
7/25/2019 CoreOS Overview @ LinuxCon US 2014
18/75
7/25/2019 CoreOS Overview @ LinuxCon US 2014
19/75
7/25/2019 CoreOS Overview @ LinuxCon US 2014
20/75
7/25/2019 CoreOS Overview @ LinuxCon US 2014
21/75
run and isolate apps
containers
7/25/2019 CoreOS Overview @ LinuxCon US 2014
22/75
pid ns
isolated pid 1
7/25/2019 CoreOS Overview @ LinuxCon US 2014
23/75
user ns
isolated uid 0
7/25/2019 CoreOS Overview @ LinuxCon US 2014
24/75
network ns
isolated netdev
7/25/2019 CoreOS Overview @ LinuxCon US 2014
25/75
mount ns
isolated /
7/25/2019 CoreOS Overview @ LinuxCon US 2014
26/75
cgroups
manage resources
7/25/2019 CoreOS Overview @ LinuxCon US 2014
27/75
cgroups
count resources
7/25/2019 CoreOS Overview @ LinuxCon US 2014
28/75
7/25/2019 CoreOS Overview @ LinuxCon US 2014
29/75
cgroups
limit resources
7/25/2019 CoreOS Overview @ LinuxCon US 2014
30/75
docker engine
7/25/2019 CoreOS Overview @ LinuxCon US 2014
31/75
7/25/2019 CoreOS Overview @ LinuxCon US 2014
32/75
machines and clusters
configuration
7/25/2019 CoreOS Overview @ LinuxCon US 2014
33/75
get into the cluster
machine conf
7/25/2019 CoreOS Overview @ LinuxCon US 2014
34/75
#cloud-config
users:
- name: core coreos-ssh-import-github: philips
coreos:
etcd:
discovery: https://discovery.etcd.io/ba09c
units:
- name: etcd.service command: start
- name: fleet.service
command: start
7/25/2019 CoreOS Overview @ LinuxCon US 2014
35/75
#cloud-config
users:
- name: core coreos-ssh-import-github: philips
coreos:
etcd:
discovery: https://discovery.etcd.io/ba09c
units:
- name: etcd.service command: start
- name: fleet.service
command: start
7/25/2019 CoreOS Overview @ LinuxCon US 2014
36/75
#cloud-config
users:
- name: core coreos-ssh-import-github: philips
coreos:
etcd:
discovery: https://discovery.etcd.io/ba09c
units:
- name: etcd.service command: start
- name: fleet.service
command: start
fi
7/25/2019 CoreOS Overview @ LinuxCon US 2014
37/75
#cloud-config
users:
- name: core coreos-ssh-import-github: philips
coreos:
etcd:
discovery: https://discovery.etcd.io/ba09c
units:
- name: etcd.service command: start
- name: fleet.service
command: start
7/25/2019 CoreOS Overview @ LinuxCon US 2014
38/75
what is running
cluster conf
7/25/2019 CoreOS Overview @ LinuxCon US 2014
39/75
skydns, discoverd, confd
services
7/25/2019 CoreOS Overview @ LinuxCon US 2014
40/75
what should run
cluster conf
7/25/2019 CoreOS Overview @ LinuxCon US 2014
41/75
locksmith
coordination
7/25/2019 CoreOS Overview @ LinuxCon US 2014
42/75
fleet, kubernetes
scheduling
7/25/2019 CoreOS Overview @ LinuxCon US 2014
43/75
etcd
7/25/2019 CoreOS Overview @ LinuxCon US 2014
44/75
/etcdistributed
7/25/2019 CoreOS Overview @ LinuxCon US 2014
45/75
open source softwarehighly available and reliable
sequentially consistentwatchable
exposed via HTTPruntime reconfigurable
7/25/2019 CoreOS Overview @ LinuxCon US 2014
46/75
-X GETGet Wait
-X PUTPut Create CAS
-X DELETEDelete CAD
7/25/2019 CoreOS Overview @ LinuxCon US 2014
47/75
Available
7/25/2019 CoreOS Overview @ LinuxCon US 2014
48/75
Available
7/25/2019 CoreOS Overview @ LinuxCon US 2014
49/75
Available
7/25/2019 CoreOS Overview @ LinuxCon US 2014
50/75
Unavailable
7/25/2019 CoreOS Overview @ LinuxCon US 2014
51/75
Available
Leader
Follower
7/25/2019 CoreOS Overview @ LinuxCon US 2014
52/75
Leader
Follower
Available
7/25/2019 CoreOS Overview @ LinuxCon US 2014
53/75
Leader
Follower
Temporarily Unavailable
7/25/2019 CoreOS Overview @ LinuxCon US 2014
54/75
Leader
Follower
Available
7/25/2019 CoreOS Overview @ LinuxCon US 2014
55/75
Sequential ConsistencyIndex Time
7/25/2019 CoreOS Overview @ LinuxCon US 2014
56/75
1
1
1
2
GET A @ index 2 -> blocking
GET A @ index 2 -> 2
2
7/25/2019 CoreOS Overview @ LinuxCon US 2014
57/75
1
1
1
2
GET A @ index 2 -> 2
2
2
7/25/2019 CoreOS Overview @ LinuxCon US 2014
58/75
etcd guarantees that a get at
index X will always return thesame result.
Avoid thinking in terms of real time because with network
latency the result is always out-of-date.
7/25/2019 CoreOS Overview @ LinuxCon US 2014
59/75
Watchable ChangesHTTP Long-poll
7/25/2019 CoreOS Overview @ LinuxCon US 2014
60/75
1 2 3
> GET asdf?waitIndex=4&wait=true HTTP/1.1
> Accept: */*
>
< HTTP/1.1 200 OK< Content-Type: application/json
< X-Etcd-Index: 3
< X-Raft-Index: 97
< X-Raft-Term: 0
GET asdf?waitIndex=4&wait=true HTTP/1.1
> Accept: */*
>
< HTTP/1.1 200 OK< Content-Type: application/json
< X-Etcd-Index: 3
< X-Raft-Index: 97
< X-Raft-Term: 0
GET asdf?waitIndex=4&wait=true HTTP/1.1
> Accept: */*
>
< HTTP/1.1 200 OK< Content-Type: application/json
< X-Etcd-Index: 4
< X-Raft-Index: 516
< X-Raft-Term: 0