$30 off During Our Annual Pro Sale. View Details »

Ordina DockerOps

MansM
April 15, 2016

Ordina DockerOps

MansM

April 15, 2016
Tweet

More Decks by MansM

Other Decks in Technology

Transcript

  1. NOMAD Mans Matulewicz

  2. Infra Engineer @ Ordina @ ING Twitter: @Mans_M Github: @MansM

    mans@mansm.io
  3. What is Nomad? § Distributed § Optimistically concurrent § Scheduler

  4. Nomad setup

  5. What is a scheduler? In short: A scheduler maps sets

    of work to a set of resources
  6. Schedulers around us

  7. Why do you want a scheduler? § Higher resource utilization

    − Bin packing − Over-subscription − Job queueing
  8. Scheduling § You decide what to run § Nomad decides

    where and how to run − But you can force Nomad’s hands by using constraints (examples coming up)
  9. Workloads Nomad can schedule § Docker containers § Rkt containers

    § Java § Isolated exec (chroot) § Raw exec § Qemu VM’s
  10. Job types § Service § Batch § System

  11. Evaluation enqueue

  12. Evaluation dequeue

  13. Plan generation

  14. Plan execution

  15. Nomad scheduling

  16. Jobs § nomad run jobfile.nomad job “name” { group “name”

    { task “name” { driver resources } } }
  17. Jobs Note: for a single task, you don’t need to

    create a taskgroup, as the group is created implicitly.
  18. Jobs - Constraints § Force Nomad’s hand on a scheduling

    location § Can be on job, taskgroup and/or task level § Hostname, kernel.version, os.name, os.version, platform.aws.ami-id, platform.aws.instance-type, arch, driver.docker.version, etc
  19. Jobs - Service Discovery • Consul needs to be installed

    on client machines • No need for in-container Consul agents • Nomad will register and deregister nodes/services
  20. Service Discovery § Container provides a service § Container runs

    service on unknown port § Consul-template queries Consul server for values and reloads nginx with new config file
  21. Jobs - Restart container

  22. Jobs - Restarts § Sorry Bryan § Note: batch jobs

    have slightly different defaults!
  23. Jobs - Scaling

  24. Jobs - Updates

  25. Jobs - Periodic

  26. Local development § Make sure docker env vars are set

    if you want docker driver active § Fingerprinter of Mac instead of Docker host
  27. Resources (Docker) § CPU − Based on shares − Will

    only kick in when Nomad client machine is under load § Memory − Based on total virtual memory, no swapping − Hard limit, app can crash or terminate when using more than specified! § Diskspace − Amount of GB’s that is required (including logs) § IO (Network planned for later releases)
  28. How to install Nomad § Install Nomad servers § Connect

    the Nomad servers to each other § Install the Nomad clients and connect them to the servers § Run the workloads!
  29. Unofficial roadmap § 0.4 − Persistent volumes − Multiple network

    cards − Enhancements to logging (Source: 0.3.0 release notes (current)) − ACL’s (Source: GitHub issue #589) § 0.5 − Vault (Source: Jim Benson ( Hashicorp solution eng @ Hashicorp meetup AMS March) § Hashicorp has not released an official roadmap
  30. What I don’t like about Nomad § No UI

  31. Demo setup

  32. Demo

  33. Questions § I might even have some answers § (and

    otherwise the guys after me)