Talk at OpenR&Day — OODrive
MIGRATING TOCONTAINERSHow BlaBlaCar moved to a full container architecture
View Slide
@MattKetmo
Servers convergence via Chef
DATA CENTERINDUSTRIALIZATION
CONTAINERS
What’s a container?
Process
Process{ }namespaceFilesystem(chroot)Network
metal serversservicesrun. containers120200+3000+
github.com/coreos/rkt
$ (sudo) rkt run ./image.aciArchive of filesystem& instructions ofwhat to runForeground processRequire root
How to build an ACI?
App ContainerOpen 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.tmplname: aci-redisaci: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.tmplname: aci-redisaci:app:exec:- /usr/bin/redis-server- /etc/redis/redis.confdependencies:- aci-debianNot included inredis image
!" aci-manifest.yml!" attributes# $" redis.yml!" runlevels# $" build# $" install.sh# $" prestart-early# $" init.sh$" templates$" etc$" redis$" redis.conf.tmpl#!/bin/bashapt install -y \redis-server
!" aci-manifest.yml!" attributes# $" redis.yml!" runlevels# $" build# $" install.sh# $" prestart-early# $" init.sh$" templates$" etc$" redis$" redis.conf.tmplInitialize database/userEnable/Disable modulesChange mod/ownerDump configuration files…
!" aci-manifest.yml!" attributes# $" redis.yml!" runlevels# $" build# $" install.sh# $" prestart-early# $" init.sh$" templates$" etc$" redis$" redis.conf.tmpldaemonize noport {{ .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.tmpldefault:redis:port: 6379timeout: 0loglevel: noticedatabases: 1Attributes areresolved at runtime
PODRunning several ACIs in thesame context
nginxphp-fpmLinux kernelother process...1.2.3.4172.16.8.8:80:9000mysql172.16.8.9:3306
Services discovery withsmartstacksynapse + nerveby Airbnb
Zookeeperhaproxyphphealtcheckrabbitmqclientserverget /services/rabbitmqadd /services/rabbitmq ip:port
systemd[Unit]Description={{.hostname}}[Service]KillMode=mixedRestart=alwaysExecStart=/opt/bin/rkt run \--hostname={{.hostname}} \--set-env=TEMPLATER_OVERRIDE='{{.attributes}}' \--volume=data,kind=host,source=/data/{{.hostname}} \{{.acis}}▾fleet▾ggn
PRIVATE CLOUDBUILD, DEPLOY & RUNRESILIENT TO FAILURES
THANK YOU