CoreOS introduction - Johann Romefort

17
CoreOS Introduction Johann Romefort http://containera.io

Transcript of CoreOS introduction - Johann Romefort

Page 1: CoreOS introduction - Johann Romefort

CoreOS Introduction

Johann Romefort

http://containera.io

Page 2: CoreOS introduction - Johann Romefort

What is CoreOS?

Page 3: CoreOS introduction - Johann Romefort

What is CoreOS?

• A minimal Linux distro (~100MB)

• Huge focus on security: CoreOS mission is “Secure the Internet”

• The best way to run containers

• A read-only rootfs

• Automatic updates

Page 4: CoreOS introduction - Johann Romefort

Automatic Updates

• Active / Passive partitions

• Update Partition B while partition A is running. Reboot to partition B, reverse to A if any problem found.

• Reboot causes app downtime… unless…

Page 5: CoreOS introduction - Johann Romefort

etcd

• Distributed Key-Value store

• Service discovery

• No local configuration

Page 6: CoreOS introduction - Johann Romefort

Running Containers on CoreOS

Page 7: CoreOS introduction - Johann Romefort

Fleet

• Distributed init system for cluster

• Uses etcd

• Actually relies on systemd: Submit a systemd Unit file and handles scheduling on the cluster

• Enable high-availability services

Page 8: CoreOS introduction - Johann Romefort

Running Containers on fleet

Page 9: CoreOS introduction - Johann Romefort

Boot Sequence

• Look for cloud-config

• Lookup how to join an existing cluster

• Start etcd service

• Start fleet service

Page 10: CoreOS introduction - Johann Romefort

Creating a CoreOS cluster on

Digital Ocean

Page 11: CoreOS introduction - Johann Romefort

Pre-requesites

• Make sure you use a SSH key

• Create a DigitalOcean Personal Access Token (to use the DO API)

Page 12: CoreOS introduction - Johann Romefort

Generate a New Discovery URL

• Unique address that stores peer CoreOS addresses and metadata

Page 13: CoreOS introduction - Johann Romefort

Write a Cloud-Config

metadata: region=europe,public_ip=$public_ipv4

Page 14: CoreOS introduction - Johann Romefort

Create a Service Unit file

• hello.service

Page 15: CoreOS introduction - Johann Romefort

Using fleet to schedule a service

• fleetctl submit hello.service

• fleetctl list-unit-files

• fleetctl cat hello.service

• fleetctl start hello.service

• fleetctl list-units

• fleetctl status hello.service

• fleetctl journal hello.service

Page 16: CoreOS introduction - Johann Romefort

What’s next…

Page 17: CoreOS introduction - Johann Romefort

Thank [email protected] http://linkedin.com/in/romefort http://twitter.com/romefort

Ping me here: