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
410
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Migrating to containers
Talk at OpenR&Day — OODrive
Matthieu Moquet
June 22, 2016
More Decks by Matthieu Moquet
See All by Matthieu Moquet
CQRS & Event Sourcing — LavaJUG
mattketmo
1
570
Running container at BlaBlaCar — While 42 (San-Francisco)
mattketmo
0
390
ForumPHP 2015
mattketmo
0
1k
CQRS & Event Sourcing
mattketmo
7
1.5k
Take care of your logs with ELK
mattketmo
8
820
From 1 to 20 million users the technical story of BlaBlaCar
mattketmo
1
1.9k
Event Sourcing
mattketmo
9
4.2k
Localization should not be a pain (anymore)
mattketmo
1
820
Understanding git
mattketmo
5
730
Other Decks in Programming
See All in Programming
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
14
5.8k
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
300
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.5k
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
160
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.8k
Claspは野良GASの夢をみるか
takter00
0
210
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
610
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
130
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
300
スマートグラスで並列バイブコーディング
hyshu
0
260
エージェンティックRAGにAWSで入門しよう!
har1101
9
1.7k
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
210
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
HDC tutorial
michielstock
2
720
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
200
New Earth Scene 8
popppiees
3
2.4k
Balancing Empowerment & Direction
lara
6
1.2k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
Making Projects Easy
brettharned
120
6.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
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