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

Docker Workshop - 2nd Day

Docker Workshop - 2nd Day

Mesos, Marathon, Consul, HAProxy, Jenkins, Prometheus, Grafana, cAdvisor.

Hugo Henley

December 21, 2016
Tweet

More Decks by Hugo Henley

Other Decks in Programming

Transcript

  1. 24/11/2016 Docker Workshop - 2nd Day Orchestrating Docker Containers Hugo

    Arraes Henley - hugohenley at id dot uff dot br 1
  2. Agenda ✤ Ecosystem - An overview ✤ Rancher ✤ Mesos

    ✤ Marathon ✤ Service Discovery ✤ Monitoring Systems ✤ CI and Deploy
  3. Before we start… ✤ Questions: #workshop-docker at Slack ✤ Urgent

    questions: ask anytime ✤ We will have a break at 15:45~16:00 ✤ Today: 80 slides ✤ Check your cellphones 3
  4. 8

  5. Rancher ✤ Provides a web interface to manage your containers

    ✤ Helps you to create your own cluster ✤ Helps you to deploy your containerized apps ✤ Natively supports and manages all of your Kubernetes, Mesos, and Swarm clusters. ✤ Easy to install!
  6. 16

  7. 23

  8. “In step (1), slave 1 reports to the master that

    it has 4 CPUs and 4 GB of memory free. The master then invokes the allocation module, which tells it that framework 1 should be offered all available resources. In step (2), the master sends a resource offer describing these resources to framework 1. In step (3), the framework’s scheduler replies to the master with information about two tasks to run on the slave, using ⟨2 CPUs, 1 GB RAM⟩ for the first task, and ⟨1 CPUs, 2 GB RAM⟩ for the second task. Finally, in step (4), the master sends the tasks to the slave, which allocates appropriate resources to the framework’s executor, which in turn launches the two tasks (depicted with dotted borders). Because 1 CPU and 1 GB of RAM are still free, the allocation module may now offer them to framework 2.”
  9. Nice! But how people can access my app if I

    have no control about where it is running…?
  10. 44

  11. For every new container, a software called registrator sends the

    list of running containers to the consul server gliderlabs/registrator $ docker run -d \ --name=registrator \ --net=host \ --volume=/var/run/docker.sock:/tmp/docker.sock \ gliderlabs/registrator:latest \ consul://localhost:8500
  12. 57

  13. “Prometheus collects metrics from configured targets at given intervals, evaluates

    rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.” https://www.infoq.com/news/2015/12/dockercon-docker-monitoring
  14. Prometheus References ✤ https://developers.soundcloud.com/blog/prometheus-monitoring-at- soundcloud ✤ https://www.brianchristner.io/how-to-setup-prometheus-docker-monitoring/ ✤ https://prometheus.io/docs/instrumenting/exporters/ ✤

    https://www.infoq.com/news/2015/12/dockercon-docker-monitoring ✤ https://github.com/vegasbrianc/prometheus ✤ https://www.brianchristner.io/updated-docker-monitoring-prometheus-grafana/ ✤ https://www.ctl.io/developers/blog/post/monitoring-docker-services-with- prometheus/
  15. 65

  16. Docker + Mesos + Marathon + Rancher + Consul +

    Registrator + Consul Template + cAdvisor + Prometheus + Grafana = :)
  17. Docker + Mesos + Marathon + Rancher + Consul +

    Registrator + Consul Template + cAdvisor + Prometheus + Grafana + Jenkins = :)
  18. 81