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
350
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
480
Running container at BlaBlaCar — While 42 (San-Francisco)
mattketmo
0
360
ForumPHP 2015
mattketmo
0
860
CQRS & Event Sourcing
mattketmo
7
1.3k
Take care of your logs with ELK
mattketmo
8
690
From 1 to 20 million users the technical story of BlaBlaCar
mattketmo
1
1.7k
Event Sourcing
mattketmo
9
3.9k
Localization should not be a pain (anymore)
mattketmo
1
730
Understanding git
mattketmo
5
600
Other Decks in Programming
See All in Programming
Quine, Polyglot, 良いコード
qnighy
4
640
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
距離関数を極める! / SESSIONS 2024
gam0022
0
280
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
290
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Contemporary Test Cases
maaretp
0
130
Outline View in SwiftUI
1024jp
1
330
Click-free releases & the making of a CLI app
oheyadam
2
110
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
580
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
Featured
See All Featured
Done Done
chrislema
181
16k
Speed Design
sergeychernyshev
24
610
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Navigating Team Friction
lara
183
14k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Visualization
eitanlees
145
15k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
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