Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Migrating to containers
Search
Matthieu Moquet
June 22, 2016
Programming
0
370
Migrating to containers
Talk at OpenR&Day — OODrive
Matthieu Moquet
June 22, 2016
Tweet
Share
More Decks by Matthieu Moquet
See All by Matthieu Moquet
CQRS & Event Sourcing — LavaJUG
mattketmo
1
510
Running container at BlaBlaCar — While 42 (San-Francisco)
mattketmo
0
370
ForumPHP 2015
mattketmo
0
960
CQRS & Event Sourcing
mattketmo
7
1.5k
Take care of your logs with ELK
mattketmo
8
760
From 1 to 20 million users the technical story of BlaBlaCar
mattketmo
1
1.8k
Event Sourcing
mattketmo
9
4.1k
Localization should not be a pain (anymore)
mattketmo
1
790
Understanding git
mattketmo
5
660
Other Decks in Programming
See All in Programming
CSC509 Lecture 07
javiergs
PRO
0
240
O Que É e Como Funciona o PHP-FPM?
marcelgsantos
0
190
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
2
370
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
240
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
280
AI駆動で0→1をやって見えた光と伸びしろ
passion0102
1
810
Writing Better Go: Lessons from 10 Code Reviews
konradreiche
3
6.4k
Catch Up: Go Style Guide Update
andpad
0
250
Flutterで分数(Fraction)を表示する方法
koukimiura
0
140
チームの境界をブチ抜いていけ
tokai235
0
220
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
450
コード生成なしでモック処理を実現!ovechkin-dm/mockioで学ぶメタプログラミング
qualiarts
0
260
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
56
14k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
How GitHub (no longer) Works
holman
315
140k
Thoughts on Productivity
jonyablonski
70
4.9k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
The Pragmatic Product Professional
lauravandoore
36
7k
A Tale of Four Properties
chriscoyier
161
23k
Fireside Chat
paigeccino
41
3.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
369
20k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Embracing the Ebb and Flow
colly
88
4.9k
Transcript
MIGRATING TO CONTAINERS How BlaBlaCar moved to a full container
architecture
@MattKetmo
None
Servers convergence via Chef
DATA CENTER INDUSTRIALIZATION
CONTAINERS
What’s a container?
Process
Process { } namespace Filesystem (chroot) Network
metal servers services run. containers 120 200+ 3000+
None
github.com/coreos/rkt
$ (sudo) rkt run ./image.aci Archive of filesystem & instructions
of what to run Foreground process Require root
How to build an ACI?
App Container Open specification defining how to run containers
Pronounced « digg-er » github.com/blablacar/dgr
!" aci-manifest.yml !" attributes # $" redis.yml !" runlevels #
$" build # $" install.sh # $" prestart-early # $" init.sh $" templates $" etc $" redis $" redis.conf.tmpl
!" aci-manifest.yml !" attributes # $" redis.yml !" runlevels #
$" build # $" install.sh # $" prestart-early # $" init.sh $" templates $" etc $" redis $" redis.conf.tmpl name: aci-redis aci: app: exec: - /usr/bin/redis-server - /etc/redis/redis.conf
!" aci-manifest.yml !" attributes # $" redis.yml !" runlevels #
$" build # $" install.sh # $" prestart-early # $" init.sh $" templates $" etc $" redis $" redis.conf.tmpl name: aci-redis aci: app: exec: - /usr/bin/redis-server - /etc/redis/redis.conf dependencies: - aci-debian Not included in redis image
!" aci-manifest.yml !" attributes # $" redis.yml !" runlevels #
$" build # $" install.sh # $" prestart-early # $" init.sh $" templates $" etc $" redis $" redis.conf.tmpl #!/bin/bash apt install -y \ redis-server
!" aci-manifest.yml !" attributes # $" redis.yml !" runlevels #
$" build # $" install.sh # $" prestart-early # $" init.sh $" templates $" etc $" redis $" redis.conf.tmpl Initialize database/user Enable/Disable modules Change mod/owner Dump configuration files …
!" aci-manifest.yml !" attributes # $" redis.yml !" runlevels #
$" build # $" install.sh # $" prestart-early # $" init.sh $" templates $" etc $" redis $" redis.conf.tmpl daemonize no port {{ .redis.port }} timeout {{ .redis.timeout }} loglevel {{ .redis.loglevel }} databases {{ .redis.databases }} {{ if .redis.maxmemory }} maxmemory {{ .redis.maxmemory }} {{ endif }} ...
!" aci-manifest.yml !" attributes # $" redis.yml !" runlevels #
$" build # $" install.sh # $" prestart-early # $" init.sh $" templates $" etc $" redis $" redis.conf.tmpl default: redis: port: 6379 timeout: 0 loglevel: notice databases: 1 Attributes are resolved at runtime
POD Running several ACIs in the same context
nginx php-fpm Linux kernel other process ... 1.2.3.4 172.16.8.8 :80
:9000 mysql 172.16.8.9 :3306
Services discovery with smartstack synapse + nerve by Airbnb
Zookeeper haproxy php healtcheck rabbitmq client server get /services/rabbitmq add
/services/rabbitmq ip:port
systemd [Unit] Description={{.hostname}} [Service] KillMode=mixed Restart=always ExecStart=/opt/bin/rkt run \ --hostname={{.hostname}}
\ --set-env=TEMPLATER_OVERRIDE='{{.attributes}}' \ --volume=data,kind=host,source=/data/{{.hostname}} \ {{.acis}} ▾ fleet ▾ ggn
PRIVATE CLOUD BUILD, DEPLOY & RUN RESILIENT TO FAILURES
THANK YOU