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
Docker In Production - A War Story
Search
Seb
July 23, 2015
Technology
1
320
Docker In Production - A War Story
Docker Meetup Vancouver - 23 July 2015
Seb
July 23, 2015
Tweet
Share
More Decks by Seb
See All by Seb
Double Click - Continue Building Better CLIs
elbaschid
0
470
I Can Be A Speaker, So Can You
elbaschid
0
320
Click - PyCaribbean 2017 - Puerto Rico
elbaschid
0
450
Conferencing - Engineering Meeting
elbaschid
1
45
Show & Tell - PyCon US 2016 Summary
elbaschid
1
110
Click: A Pleasure To Write, A Pleasure To Use
elbaschid
0
660
Hunting for Treasure in Django
elbaschid
1
700
Moby & The Beanstalk
elbaschid
1
520
Hunting For Treasure In Django
elbaschid
0
180
Other Decks in Technology
See All in Technology
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
350
Vitest Highlights in Angular
rainerhahnekamp
0
130
Amazon ElastiCacheのコスト最適化を考える/Elasticache Cost Optimization
quiver
0
390
今日から始めるAmazon Bedrock AgentCore
har1101
4
320
Azure Durable Functions で作った NL2SQL Agent の精度向上に取り組んだ話/jat08
thara0402
0
120
Azure SRE Agent x PagerDutyによる近未来インシデント対応への期待 / The Future of Incident Response: Azure SRE Agent x PagerDuty
aeonpeople
0
280
Frontier Agents (Kiro autonomous agent / AWS Security Agent / AWS DevOps Agent) の紹介
msysh
3
120
無ければ作る! バイブコーディングで作ったものを一気に紹介
tatsuya1970
0
110
エンジニアとマネジメントの距離/Engineering and Management
ikuodanaka
3
700
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
(金融庁共催)第4回金融データ活用チャレンジ勉強会資料
takumimukaiyama
0
100
AIとともに歩む情報セキュリティ / Information Security with AI
kanny
4
3.1k
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
The World Runs on Bad Software
bkeepers
PRO
72
12k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
72
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
93
Game over? The fight for quality and originality in the time of robots
wayneb77
1
93
Bash Introduction
62gerente
615
210k
Transcript
Docker in Production A War Story
Kyle Young github.com/kyoung @ksgyoung Sebastian Vetter github.com/elbaschid @elbaschid Who We
Are
Rackspace Setup • Many many Rackspace servers • A lot
of tooling around legacy infrastructure • Running a lot of services ourselves: RabbitMQ, MySQL (in replication), and more
None
None
New Setup • AWS Beanstalk • Docker • Quay.io: Docker
Registry • External services: RDS, ElastiCache, hosted RabbitMQ
None
None
Development Environment • How are we running the dev env
◦ docker-machine ◦ docker-compose ◦ much bash
docker-compose • Container per service • Full async setup •
Controlled by our own CLI docker ├── cli │ ├── bootstrap.sh │ ├── circle-run-tests-in-parallel.sh │ ├── cleanup.sh │ ├── deploy.sh │ ├── dev.sh │ ├── hotfix.sh │ └── promote.sh
Deployment • Testing on Circle CI • Auto-deploy to Staging
• ./portal.sh promote
None
Problems
Beanstalk Tooling
Beanstalk Tooling • Very basic tooling around Beanstalk • Needs
a bit of a nudge some of the times • Modifying AMI using .ebextensions
Auto-Mounting Volumes
Auto-Mounting Volumes • Having VOLUME in Dockerfile • Creates auto-mounted
AUFS volume • Doesn’t get cleaned up • Don’t use VOLUME
Containers & Images
Containers & Images • Failed deployments due to lack of
disk space • Pulling images adds data • No automatic cleanup • Adding some cleanup commands to . ebextensions
Centralized Logging
Centralized Logging • Docker logs to stdout & stderr •
Beanstalk pulls them into log files • Forwarding to syslog is tricky ◦ dynamic naming of log files: /var/log/eb-docker/.../6fb0153a0b99-stdouterr.log ◦ old version of rsyslog that doesn't allow globbing
Solution • Using gliderlabs’ logspout: https://github. com/gliderlabs/logspout • Best of
both worlds: ◦ Beanstalk logging ◦ syslog forwarding
Monitoring
Monitoring with Datadog • Better insight: ◦ containers running ◦
CPU & memory usage ◦ triggering alerts • Using the dd-agent container from Datadog https://github.com/DataDog/dd-agent
Monitoring with Datadog
Migrations
Database and migrations • Currently has to be run manually
• Better strategy needed long-term But: • No sophisticated migration strategy • No high-traffic, high-performance service
The Future
Possible Improvements • AWS ECS for more efficient containers •
Possibly investigating "Project Orca" at some point (maybe)
Questions?