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

Docker at scale with Mesos

Docker at scale with Mesos

Avatar for Phạm Tuấn Anh

Phạm Tuấn Anh

August 27, 2016
Tweet

More Decks by Phạm Tuấn Anh

Other Decks in Technology

Transcript

  1. $ whoami • Lead engineer at VCCloud Platform Services •

    Build & work with large-scale/production platform services for about 6 years • Services: Storage, DNS, CDN, DDoS Protection, Logging, Private PaaS
  2. Agenda 1. What is Mesos? 2. How to run docker

    containers on Mesos 3. Lessons learned 4. Q&A
  3. 1. What is Mesos? 2. How to run docker containers

    on Mesos 3. Lessons learned 4. Q&A
  4. Powered by Mesos: • Apple • Atlassian • CERN •

    Cisco • Cloudflare • Foursquare • Groupon • HubSpot • Netflix • Opera • Paypal • Shopee • Shopify • Saleforce • Twitter • Uber • Vimeo • Verizon • Weibo • Yelp • Xiaomi http://mesos.apache.org/documentation/latest/powered-by-mesos/
  5. Solomon Hykes, Founder & CTO of Docker, said at DockerCon

    EU 12/2014: Mesos is the “gold standard” for large-scale production clusters running containers
  6. Mesos is: • Open source, top-level Apache project • Proven

    at massive scale • Multi-resource (CPU, RAM, Disk, GPU) scheduling • Simplified operational model • Cross platform • Native Docker support
  7. • PaaS: Marathon, Aurora, Kubernetes, Swarm • Big Data: Hadoop,

    Spark, Storm • Database: Cassandra, ArangoDB, • ElasticSearch, Chronos, Jenkins, Kafka… Mesos Frameworks:
  8. 1. What is Mesos? 2. How to run docker containers

    on Mesos 3. Lessons learned 4. Q&A
  9. Features: • Start, stop, scale, update, rollback apps • Rolling

    deploy / restart • Constraints • Health checks • App dependencies • Highly available, no SPoF
  10. 1. What is Mesos? 2. How to run docker containers

    on mesos 3. Lessons learned 4. Q&A
  11. – Immutable Infrastructure / CodeShip “Some of the major challenges

    today when building infrastructure are predictability, scalability and automated recovery.”
  12. • Container style • Service discovery • Networking Lessons Learned

    • Managing secrets • App deployment • Docker annoyances
  13. • Container style • Service discovery • Networking Lessons Learned

    • Managing secrets • App deployment • Docker annoyances
  14. • Container style • Service discovery • Networking Lessons Learned

    • Managing secrets • App deployment • Docker annoyances
  15. • Container style • Service discovery • Networking Lessons Learned

    • Managing secrets • App deployment • Docker annoyances
  16. • Container style • Service discovery • Networking Lessons Learned

    • Managing secrets • App deployment • Docker annoyances
  17. App deployment • ansible-playbook • marathon.json • docker tag name

    = git commit hash • 1 mesos cluster (3 VMs) per dev • deploy to servers → deploy to marathon
  18. • Container style • Service discovery • Networking Lessons Learned

    • Managing secrets • App deployment • Docker annoyances
  19. Docker • restart / upgrade docker without stopping the running

    containers • old images / tags cleanup • container’s stdout / stderr log files • docker pull • docker hub
  20. "Normal" container vs cloud-native container: • No manual steps •

    Service discovery friendly • Config files should be optional • Using env vars for config
  21. 1. What is Mesos? 2. How to run docker containers

    on Mesos 3. Lessons learned 4. Q&A
  22. Links • Mesos: http://mesos.apache.org/ • Marathon: https://mesosphere.github.io/marathon/ • Project Calico:

    https://www.projectcalico.org/ • Mesos-DNS: https://github.com/mesosphere/mesos-dns • A Healthy Platform Checklist: https://gist.github.com/andy-pham/ 04dedff872b33c07a31277afb900950b