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
340
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
470
Running container at BlaBlaCar — While 42 (San-Francisco)
mattketmo
0
350
ForumPHP 2015
mattketmo
0
750
CQRS & Event Sourcing
mattketmo
7
1.2k
Take care of your logs with ELK
mattketmo
8
650
From 1 to 20 million users the technical story of BlaBlaCar
mattketmo
1
1.7k
Event Sourcing
mattketmo
9
3.8k
Localization should not be a pain (anymore)
mattketmo
1
660
Understanding git
mattketmo
5
580
Other Decks in Programming
See All in Programming
puregoの活用例
aethiopicuschan
0
220
Ruby Pattern Matching
bkuhlmann
0
920
Ruby GitHub Packages
bkuhlmann
0
620
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
210
AWS Application Composerで始める、 サーバーレスなデータ基盤構築 / 20240406-jawsug-hokuriku-shinkansen
kasacchiful
1
250
今、知っておきたい! 生成AIエージェントの世界
elith
3
340
try! Swift Tokyo 2024 参加報告 / try! Swift Tokyo 2024 Report
hironytic
0
170
スクラムチームと認知負荷 - ニフティのスクラムトーク Vol2. / NIFTY Tech Talk #18
niftycorp
PRO
1
120
9年開発を牽引して見えてきた、共通化すべきものと個別でつくるもの ~プログラム言語~
shinout
1
640
VSCodeでのDatabricks開発もお勧めしたい/I would also recommend Databricks development with VSCode.
kazumain
0
230
デザインシステムで Tailwind CSSとCSS in JSに分散投資をしたら良かった話
fsubal
18
4.8k
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
180
Featured
See All Featured
It's Worth the Effort
3n
180
27k
Principles of Awesome APIs and How to Build Them.
keavy
119
16k
Product Roadmaps are Hard
iamctodd
43
9.7k
A better future with KSS
kneath
230
16k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
29
6k
Adopting Sorbet at Scale
ufuk
67
8.6k
Agile that works and the tools we love
rasmusluckow
323
20k
What's new in Ruby 2.0
geeforr
336
31k
Robots, Beer and Maslow
schacon
PRO
154
7.9k
Why Our Code Smells
bkeepers
PRO
331
56k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
A Tale of Four Properties
chriscoyier
150
22k
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