Top Banner
CoreOS Introduction Johann Romefort http://containera.io
17
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CoreOS introduction - by johann romefort

CoreOS Introduction

Johann Romefort

http://containera.io

Page 2: CoreOS introduction - by johann romefort

What is CoreOS?

Page 3: CoreOS introduction - by 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 - by 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 - by johann romefort

etcd

• Distributed Key-Value store

• Service discovery

• No local configuration

Page 6: CoreOS introduction - by johann romefort

Running Containers on CoreOS

Page 7: CoreOS introduction - by 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 - by johann romefort

Running Containers on fleet

Page 9: CoreOS introduction - by 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 - by johann romefort

Creating a CoreOS cluster on

Digital Ocean

Page 11: CoreOS introduction - by 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 - by johann romefort

Generate a New Discovery URL

• Unique address that stores peer CoreOS addresses and metadata

Page 13: CoreOS introduction - by johann romefort

Write a Cloud-Config

metadata: region=europe,public_ip=$public_ipv4

Page 14: CoreOS introduction - by johann romefort

Create a Service Unit file

• hello.service

Page 15: CoreOS introduction - by 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 - by johann romefort

What’s next…

Page 17: CoreOS introduction - by johann romefort

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

Ping me here: