coreos introduction - johann romefort
TRANSCRIPT
![Page 2: CoreOS introduction - Johann Romefort](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/2.jpg)
What is CoreOS?
![Page 3: CoreOS introduction - Johann Romefort](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/3.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/4.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/5.jpg)
etcd
• Distributed Key-Value store
• Service discovery
• No local configuration
![Page 6: CoreOS introduction - Johann Romefort](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/6.jpg)
Running Containers on CoreOS
![Page 7: CoreOS introduction - Johann Romefort](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/7.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/8.jpg)
Running Containers on fleet
![Page 9: CoreOS introduction - Johann Romefort](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/9.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/10.jpg)
Creating a CoreOS cluster on
Digital Ocean
![Page 11: CoreOS introduction - Johann Romefort](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/11.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/12.jpg)
Generate a New Discovery URL
• Unique address that stores peer CoreOS addresses and metadata
![Page 13: CoreOS introduction - Johann Romefort](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/13.jpg)
Write a Cloud-Config
metadata: region=europe,public_ip=$public_ipv4
![Page 14: CoreOS introduction - Johann Romefort](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/14.jpg)
Create a Service Unit file
• hello.service
![Page 15: CoreOS introduction - Johann Romefort](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/15.jpg)
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](https://reader030.vdocuments.net/reader030/viewer/2022020208/55b95494bb61eb94788b4570/html5/thumbnails/16.jpg)
What’s next…