Top Banner
Nomad An introduction to cluster schedulers Patrick O'Connor @dontrebootme
20

Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Feb 07, 2018

Download

Documents

duongthien
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

NomadAn introduction to cluster schedulers

Patrick O'Connor@dontrebootme

Page 2: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Lessons learned2006-2008 Law Offices - service availability2009-2012 CSU San Bernardino - automation2013-2014 DreamWorks Animation - schedulers2015+ The Walt Disney Company - simplicity

Page 3: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

PetsvsCattle

Page 4: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Service discovery• Easy to query• Service information• Consistent

Page 5: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Distributed key value• configuration data• triggers• externalize environment from services/code• sourced from a repo

Page 6: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Cluster schedulers• Pool resources• Service supervision• Scaling functionality• State information

Page 7: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Cluster schedulers

Page 8: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Docker Swarm• Simple setup• Native Docker API• Can run on other schedulers (e.g. Mesos)• Tooling compatibility

Page 9: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Amazon ECS• Runs on AWS• Docker only• Open source agent, not server• Simple to get started

Page 10: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Google Kubernetes• kubelet, kube-proxy, etcd, api server, scheduler, repl-controller• Borg successor• Has the notion of "pods"• Very active community

Page 11: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Apache Mesos +Mesosphere Marathon• Zookeeper, Leader and Client, Marathon leader• Multiple frameworks can be deployed on Mesos• Two-level scheduling

Page 12: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Hashicorp Nomad• Single binary for client and server• More than just Docker• Nomad is distributed, highly available and operationally simple• Integrates well with Consul

Page 13: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Nomad Architecture [Region]

Page 14: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Nomad Architecture [Global]

Page 15: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Nomad Components• Server• Agent• Job• Task

Page 16: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Nomad + Consul• Native support• Nomad services -> Consul services (+ health checks)• Simple

Page 17: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Using Nomad• Deploying services• Scaling services• Rolling updates• Integrating with Consul• Load balancing deployed services

Page 18: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Job definitionjob "microbot" { region = "global" datacenters = ["prod-east1", "prod-west1"] group "demo-stack" { task "microbot" { driver = "docker" }, task "microbot-db" { driver = "docker" } ... }}

Page 19: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

Nomad is• Operationally simple• Distributed and highly available• Open source• Multi datacenter/region

Page 20: Nomad - SCALE · PDF fileLessons learned 2006-2008 Law Offices - service availability 2009-2012 CSU San Bernardino - automation 2013-2014 DreamWorks Animation - schedulers

NomadAn Introduction to Cluster Schedulers

Patrick O'Connor@dontrebootme