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
490
Running container at BlaBlaCar — While 42 (San-Francisco)
mattketmo
0
360
ForumPHP 2015
mattketmo
0
900
CQRS & Event Sourcing
mattketmo
7
1.4k
Take care of your logs with ELK
mattketmo
8
710
From 1 to 20 million users the technical story of BlaBlaCar
mattketmo
1
1.7k
Event Sourcing
mattketmo
9
4k
Localization should not be a pain (anymore)
mattketmo
1
750
Understanding git
mattketmo
5
620
Other Decks in Programming
See All in Programming
Generating OpenAPI schema from serializers throughout the Rails stack - Kyobashi.rb #5
envek
1
380
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
1k
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
320
Bedrock Agentsレスポンス解析によるAgentのOps
licux
3
920
もう僕は OpenAPI を書きたくない
sgash708
5
1.9k
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
810
負債になりにくいCSSをデザイナとつくるには?
fsubal
10
2.6k
kintone開発を効率化するためにチームで試した施策とその結果を大放出!
oguemon
0
150
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
300
CDK開発におけるコーディング規約の運用
yamanashi_ren01
2
250
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
860
Unity Android XR入門
sakutama_11
0
180
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Raft: Consensus for Rubyists
vanstee
137
6.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
430
Navigating Team Friction
lara
183
15k
Designing for Performance
lara
604
68k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
Agile that works and the tools we love
rasmusluckow
328
21k
Statistics for Hackers
jakevdp
797
220k
Thoughts on Productivity
jonyablonski
69
4.5k
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