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

Nomad for Hashicorp Meetup

2880cbe3137303a61371ec35985f188a?s=47 MansM
March 10, 2016

Nomad for Hashicorp Meetup

2880cbe3137303a61371ec35985f188a?s=128

MansM

March 10, 2016
Tweet

Transcript

  1. NOMAD Mans Matulewicz

  2. Infrastructure Developer @ Ordina Twitter: @Mans_M Github: @MansM mans@mansm.io

  3. What is Nomad? § Distributed § Optimistically concurrent § Scheduler

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

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

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

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

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

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

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

    create a taskgroup, as the group is created implicitly.
  12. 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
  13. 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
  14. 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
  15. Jobs - Restart container

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

    have slightly different defaults!
  17. Jobs - Scaling

  18. Jobs - Updates

  19. Jobs - Periodic

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

    if you want docker driver active § Fingerprinter of Mac instead of Docker host
  21. 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)
  22. 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!
  23. 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
  24. What I don’t like about Nomad § No UI

  25. Demo setup

  26. Demo

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

    otherwise the guys after me)