Integrating Docker with Mesos and Marathon

download Integrating Docker with Mesos and Marathon

of 17

  • date post

    23-Jan-2018
  • Category

    Technology

  • view

    655
  • download

    6

Embed Size (px)

Transcript of Integrating Docker with Mesos and Marathon

  1. 1. Rishabh Chaudhary Integrating Docker with Mesos and Marathon
  2. 2. 2 Introduction to Mesos Distributed System's Kernel Cluster Manager Master-slave architecture
  3. 3. 3 Features of Mesos: Scalability Fault tolerance Multi resource scheduling GUI Fine grained resource sharing Supports docker containers
  4. 4. 4 Architecture MASTER 3 SLAVE 1 SLAVE 2 SLAVE 3 SLAVE 4 MASTER 1 MASTER 2 ZOOKEEPER
  5. 5. 5 Introduction to Marathon Application Scheduler Cluster wide process supervisor Scaling Long running applications Tolerant towards application failover
  6. 6. 6 How do they work together?
  7. 7. 7 Multi system environment:
  8. 8. 8 Marathon: Features HA: how? Run multiple instances Automatic selection of leader Requests to non-leader gets redirected to the leader Run other frameworks through Marathon REST API and GUI
  9. 9. 9 Architecture : Revised 1 MASTER 3 SLAVE 1 SLAVE 2 SLAVE 3 SLAVE 4 MASTER 1 MASTER 2 ZOOKEEPER MARATHON SCHEDULER 2
  10. 10. 10 Architecture : Revised 2 MASTER 3 SLAVE 1 SLAVE 2 SLAVE 3 SLAVE 4 MASTER 1 MASTER 2 ZOOKEEPER MARATHON SCHEDULER 1 MARATHON SCHEDULER 2
  11. 11. 11 The list goes on..
  12. 12. 12 Docker with Mesos and Marathon Mesos supports containers: Mesos Containers Docker Containers Long Running Tasks on Marathon JSON Scripts Marathons REST API
  13. 13. 13 Points to note: Not all tasks must be containerized Non containerized tasks are also supported in Marathon Tasks that should be run within a docker container must be configured to do so: Use JSON scripts for task configuration Use Marathons REST API to post the containerized application
  14. 14. 14 Sample JSON: { "container": { "type": "DOCKER", "docker": { "image": "autoscale", "network": "BRIDGE" } }, "id": "relay", "instances": 1, "cpus": 0.5, "mem": 512, "uris": [] }
  15. 15. 15 Sample JSON 2: { "container": { "type": "DOCKER", "docker": { "image": "loadcheck", "network": "BRIDGE", "portMappings": [ { "containerPort":8080, "hostPort":0} ] } }, "env": { "HOST_IP":"172.16.12.247:3306" }, "id": "webapp", "instances": 1, "cpus": 0.5, "mem": 512, "cmd": "./bin/startup.sh && tail -f ./logs/catalina.out" }
  16. 16. 16 Tomcat Server 1 Tomcat Server 2 Tomcat Server N Load Balancer DatabaseClient Deployment example:
  17. 17. 17 Questions?