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

Nomad for Hashicorp Meetup

March 10, 2016

Nomad for Hashicorp Meetup


March 10, 2016

More Decks by MansM

Other Decks in Technology


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

    − Bin packing − Over-subscription − Job queueing
  2. 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)
  3. Workloads Nomad can schedule § Docker containers § Rkt containers

    § Java § Isolated exec (chroot) § Raw exec § Qemu VM’s
  4. Jobs § nomad run jobfile.nomad job “name” { group “name”

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

    create a taskgroup, as the group is created implicitly.
  6. 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
  7. 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
  8. 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
  9. Jobs - Restarts § Sorry Bryan § Note: batch jobs

    have slightly different defaults!
  10. Local development § Make sure docker env vars are set

    if you want docker driver active § Fingerprinter of Mac instead of Docker host
  11. 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)
  12. 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!
  13. 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