Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Docker In Production - A War Story

Seb
July 23, 2015

Docker In Production - A War Story

Docker Meetup Vancouver - 23 July 2015

Seb

July 23, 2015
Tweet

More Decks by Seb

Other Decks in Technology

Transcript

  1. 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
  2. New Setup • AWS Beanstalk • Docker • Quay.io: Docker

    Registry • External services: RDS, ElastiCache, hosted RabbitMQ
  3. Development Environment • How are we running the dev env

    ◦ docker-machine ◦ docker-compose ◦ much bash
  4. 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
  5. Beanstalk Tooling • Very basic tooling around Beanstalk • Needs

    a bit of a nudge some of the times • Modifying AMI using .ebextensions
  6. Auto-Mounting Volumes • Having VOLUME in Dockerfile • Creates auto-mounted

    AUFS volume • Doesn’t get cleaned up • Don’t use VOLUME
  7. Containers & Images • Failed deployments due to lack of

    disk space • Pulling images adds data • No automatic cleanup • Adding some cleanup commands to . ebextensions
  8. 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
  9. 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
  10. 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
  11. Possible Improvements • AWS ECS for more efficient containers •

    Possibly investigating "Project Orca" at some point (maybe)