Slide 1

Slide 1 text

Running containers at #While42 (San-Francisco)

Slide 2

Slide 2 text

$100 $25 $25 $25 $25

Slide 3

Slide 3 text

25 million members in January 2016

Slide 4

Slide 4 text

22 countries

Slide 5

Slide 5 text

20M 40M 80M 160M 129M 2014 2015 2016 2017 Travelers transported 2014

Slide 6

Slide 6 text

metal servers services run. containers 120 150+ 2000+

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

github.com/coreos/rkt

Slide 9

Slide 9 text

$ (sudo) rkt run ./image.aci Archive of filesystem & instructions of what to run Foreground process Require root

Slide 10

Slide 10 text

$ rkt run example.org/image.aci Fetch the image first and then run it

Slide 11

Slide 11 text

How to build an ACI?

Slide 12

Slide 12 text

App Container (appc) Open specification that defines several aspects of how to run applications in containers

Slide 13

Slide 13 text

Pronounced « digg-er » github.com/blablacar/dgr

Slide 14

Slide 14 text

├── aci-manifest.yml ├── attributes │ └── redis.yml ├── runlevels │ └── build │ └── install.sh └── templates └── etc └── redis └── redis.conf.tmpl

Slide 15

Slide 15 text

name: aci-redis aci: app: exec: - /usr/bin/redis-server - /etc/redis/redis.conf

Slide 16

Slide 16 text

name: aci-redis aci: app: exec: - /usr/bin/redis-server - /etc/redis/redis.conf dependencies: - aci-debian Not included in redis image

Slide 17

Slide 17 text

Runlevel: Build

Slide 18

Slide 18 text

├── aci-manifest.yml ├── attributes │ └── redis.yml ├── runlevels │ └── build │ └── install.sh └── templates └── etc └── redis └── redis.conf.tmpl

Slide 19

Slide 19 text

#!/bin/bash apt install -y redis-server

Slide 20

Slide 20 text

Runlevel: Prestart

Slide 21

Slide 21 text

Dump configuration files Initialize database/user Enable/Disable modules Change mod/owner

Slide 22

Slide 22 text

├── aci-manifest.yml ├── attributes │ └── redis.yml ├── runlevels │ └── build │ └── install.sh └── templates └── etc └── redis └── redis.conf.tmpl

Slide 23

Slide 23 text

# templates/etc/redis/redis.conf.tmpl daemonize no port {{ .redis.port }} ... # attributes/redis.yml default: redis: port: 6379 Resolved at runtime

Slide 24

Slide 24 text

POD Running several ACIs in the same context

Slide 25

Slide 25 text

name: example.org/pod-myapp:1 pod: apps: - dependencies: - example.org/aci-nginx:1.8.1 app: exec: [/usr/sbin/nginx, -g, daemon off] - dependencies: - example.org/aci-php:5.6 - example.org/aci-myapp:42 app: exec: [/usr/sbin/php5-fpm, -F]

Slide 26

Slide 26 text

$ rkt run \ example.org/pod-myapp_aci-nginx:1 \ example.org/pod-myapp_aci-php:1

Slide 27

Slide 27 text

pod-myapp_aci-nginx pod-myapp_aci-php Linux kernel other process ... 1.2.3.4 172.16.8.8 :80 :9000

Slide 28

Slide 28 text

Services discovery with smartstack synapse + nerve by Airbnb

Slide 29

Slide 29 text

Zookeeper haproxy php healtcheck mysql client server

Slide 30

Slide 30 text

Thank you! @BlaBlaCarTech @MattKetmo blablatech.com