SlideShare a Scribd company logo
Copyright © 2018 HashiCorp
Easy and Flexible
Application Deployment
with HashiCorp Nomad
Rob Genova - Nomad Product Manager
Nic Jackson - Developer Advocate
Copyright © 2018 HashiCorp
Company overview
2
Mission
Key
Products
Founded 2012 by Mitchell Hashimoto and Armon Dadgar
We enable organizations to Provision, Secure, Connect,
and Run any infrastructure for any application
https://www.hashicorp.com/blog/the-tao-of-hashicorp
Copyright © 2018 HashiCorp 3
DEVELOPMENT
SECURITY
OPERATIONS
Run applications
Secure infrastructure & applications
Provision infrastructure
The HashiCorp open source suite
THE PRACTITIONER
Copyright © 2018 HashiCorp 4
DEVELOPMENT
SECURITY
OPERATIONS
Run applications
Secure infrastructure & applications
Challenges for organizations as they scale
ENTERPRISE
ENTERPRISE
ENTERPRISE
THE PRACTITIONER TEAMS
• Collaboration
• Operations
• Governance & policy
ENTERPRISE
DEVELOPMENT
SECURITY
OPERATIONS
Run applications
Secure infrastructure & applications
Provision infrastructure
Copyright © 2018 HashiCorp
Schedulers and orchestration tools generally leverage containerization to:
- Improve deployment workflows
- Reduce the tight coupling between developers and operators
- Increase the resilience of running applications
- Enable more efficient use of compute resources
However, there are a number of drawbacks:
- Overly complex for developers to define and run workloads
- Difficult to deploy and operate
- Inflexible with respect to both workload and packaging
- Difficult to scale and deploy across regions
- Difficult to grasp mental model; steep learning curve
Nomad Origin
5
Copyright © 2018 HashiCorp
Nomad’s goal is to enable an organization to easily run any application on any
infrastructure at any scale.
With the following characteristics:
-Easy to learn, simple mental model
-Easy and efficient for developers to define and run workloads
-Easy to deploy and operate
-Integrates easily into existing workflows
-First-class support for all major workload types
-Easy to deploy across regions and cloud providers
-Easy to scale
-Integrates seamlessly with other HashiCorp tooling
Nomad Objectives
6
Copyright © 2018 HashiCorp
Nomad Workflow
7
User Nomad
Servers
Submits
Job
Nomad
Clients
Deploy App
Skip (Busy)
Copyright © 2018 HashiCorp 8
Declarative Job
Specification
job "my_job" {
datacenters = ["us-west-1", “us-east-1"]
type = "service"
group "web" {
count = 5
task "frontend" {
driver = "docker"
config { image = "hashicorp/web-frontend" }
resources {
cpu = 500 # MHz
memory = 128 # MB
network {
mbits = 100
}
}
Copyright © 2018 HashiCorp
Single Binary - Client/Server Deployment Topology
9
Copyright © 2018 HashiCorp
Multi-region Deployment Topology
10
Copyright © 2018 HashiCorp
Internal State, Parallelized Scheduling
11
Copyright © 2018 HashiCorp
Job Specification - Regions, Datacenters
▪ Region, Datacenters
▪ Job Type
▪ Group
▪ Task
▪ Driver
▪ Resources
▪ Constraints
▪ Priorities
▪ Environment Variables
▪ Periodic Jobs
▪ Updating Jobs
▪ Consul Integration
▪ Vault Integration
12
job “my_job" {
region = "us"
datacenters = ["us-west-1", "us-east-1"]
type = "service"
group "web" {
count = 5
task "frontend" {
driver = "docker"
config {
image = "hashicorp/web-frontend"
}
resources {
cpu = 500 # MHz
memory = 128 # MB
network {
mbits = 100
port "http" {}
port "https" {
static = 443
}
}
Copyright © 2018 HashiCorp
Job Specification - Job Type
13
job “my_job" {
region = "us"
datacenters = ["us-west-1", "us-east-1"]
type = "service"
group "web" {
count = 5
task "frontend" {
driver = "docker"
config {
image = "hashicorp/web-frontend"
}
resources {
cpu = 500 # MHz
memory = 128 # MB
network {
mbits = 100
port "http" {}
port "https" {
static = 443
}
}
}
}
▪ Region, Datacenters
▪ Job Type
▪ Group
▪ Task
▪ Driver
▪ Resources
▪ Constraints
▪ Priorities
▪ Environment Variables
▪ Periodic Jobs
▪ Updating Jobs
▪ Consul Integration
▪ Vault Integration
Copyright © 2018 HashiCorp
Job Specification - Group
14
job “my_job" {
region = "us"
datacenters = ["us-west-1", "us-east-1"]
type = "service"
group "web" {
count = 5
task "frontend" {
driver = "docker"
config {
image = "hashicorp/web-frontend"
}
resources {
cpu = 500 # MHz
memory = 128 # MB
network {
mbits = 100
port "http" {}
port "https" {
static = 443
}
} }
}
}
}
▪ Region, Datacenters
▪ Job Type
▪ Group
▪ Task
▪ Driver
▪ Resources
▪ Constraints
▪ Priorities
▪ Environment Variables
▪ Periodic Jobs
▪ Updating Jobs
▪ Consul Integration
▪ Vault Integration
Copyright © 2018 HashiCorp
Job Specification - Task
15
job “my_job" {
region = "us"
datacenters = ["us-west-1", "us-east-1"]
type = "service"
group "web" {
count = 5
task "frontend" {
driver = "docker"
config {
image = "hashicorp/web-frontend"
}
resources {
cpu = 500 # MHz
memory = 128 # MB
network {
mbits = 100
port "http" {}
port "https" {
static = 443
}
}
} }
}
}
}
▪ Region, Datacenters
▪ Job Type
▪ Group
▪ Task
▪ Driver
▪ Resources
▪ Constraints
▪ Priorities
▪ Environment Variables
▪ Periodic Jobs
▪ Updating Jobs
▪ Consul Integration
▪ Vault Integration
Copyright © 2018 HashiCorp
Job Specification - Driver
16
job “my_job" {
region = "us"
datacenters = ["us-west-1", "us-east-1"]
type = "service"
group "web" {
count = 5
task "frontend" {
driver = "docker"
config {
image = "hashicorp/web-frontend"
}
resources {
cpu = 500 # MHz
memory = 128 # MB
network {
mbits = 100
port "http" {}
port "https" {
static = 443
}
}
}
} }
}
}
}
▪ Region, Datacenters
▪ Job Type
▪ Group
▪ Task
▪ Driver
▪ Resources
▪ Constraints
▪ Priorities
▪ Environment Variables
▪ Periodic Jobs
▪ Updating Jobs
▪ Consul Integration
▪ Vault Integration
Copyright © 2018 HashiCorp
Job Specification - Resources
17
job “my_job" {
region = "us"
datacenters = ["us-west-1", "us-east-1"]
type = "service"
group "web" {
count = 5
task "frontend" {
driver = "docker"
config {
image = "hashicorp/web-frontend"
}
resources {
cpu = 500 # MHz
memory = 128 # MB
network {
mbits = 100
port "http" {}
port "https" {
static = 443
}
}
}
}
}
} }
}
▪ Region, Datacenters
▪ Job Type
▪ Group
▪ Task
▪ Driver
▪ Resources
▪ Constraints
▪ Priorities
▪ Environment Variables
▪ Periodic Jobs
▪ Updating Jobs
▪ Consul Integration
▪ Vault Integration
Copyright © 2018 HashiCorp
Job Specification - Constraints
18
job “my_job" {
# All tasks in this job must run on linux.
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
group "example" {
# All groups in this job should be scheduled on different hosts.
constraint {
operator = "distinct_hosts"
value = "true"
}
task "server" {
# All tasks must run where "my_custom_value" is greater than 3.
constraint {
attribute = "${meta.my_custom_value}"
operator = ">"
value = "3"
}
}
}
}
▪ Region, Datacenters
▪ Job Type
▪ Group
▪ Task
▪ Driver
▪ Resources
▪ Constraints
▪ Priorities
▪ Environment Variables
▪ Periodic Jobs
▪ Updating Jobs
▪ Consul Integration
▪ Vault Integration
Copyright © 2018 HashiCorp
Job Specification - Priorities
19
job “my_job" {
region = “north-america"
datacenters = [“us-east-1"]
priority = 100
constraint {
# ...
}
group "example" {
# ...
}
▪ Region, Datacenters
▪ Job Type
▪ Group
▪ Task
▪ Driver
▪ Resources
▪ Constraints
▪ Priorities
▪ Environment Variables
▪ Periodic Jobs
▪ Updating Jobs
▪ Consul Integration
▪ Vault Integration
Copyright © 2018 HashiCorp
Job Specification - Environment Variables
20
job “my_job" {
group "example" {
task "server" {
env {
my_key = "my-value"
}
}
}
}
▪ Region, Datacenters
▪ Job Type
▪ Group
▪ Task
▪ Driver
▪ Resources
▪ Constraints
▪ Priorities
▪ Environment Variables
▪ Periodic Jobs
▪ Updating Jobs
▪ Consul Integration
▪ Vault Integration
Copyright © 2018 HashiCorp
Job Specification - Periodic Jobs
21
job “my_job" {
periodic {
cron = "*/15 * * * * *"
prohibit_overlap = true
}
}
▪ Region, Datacenters
▪ Job Type
▪ Group
▪ Task
▪ Driver
▪ Resources
▪ Constraints
▪ Priorities
▪ Environment Variables
▪ Periodic Jobs
▪ Updating Jobs
▪ Consul Integration
▪ Vault Integration
Copyright © 2018 HashiCorp
Job Specification - Updating Jobs
22
job “my_job” {
update {
max_parallel = 3
health_check = "checks"
min_healthy_time = "10s"
healthy_deadline = "10m"
auto_revert = true
canary = 1
stagger = "30s"
}
}
▪ Region, Datacenters
▪ Job Type
▪ Group
▪ Task
▪ Driver
▪ Resources
▪ Constraints
▪ Priorities
▪ Environment Variables
▪ Periodic Jobs
▪ Updating Jobs
▪ Consul Integration
▪ Vault Integration
Copyright © 2018 HashiCorp
Job Specification - Consul Integration
23
job “my_job" {
group "example" {
task "server" {
service {
tags = ["leader", "mysql"]
port = “db"
check {
type = "script"
name = "check_table"
command = "/usr/local/bin/check_mysql_table_status"
args = ["--verbose"]
interval = "60s"
timeout = “5s"
}
template {
source = "local/redis.conf.tpl"
destination = "local/redis.conf"
change_mode = "signal"
change_signal = "SIGINT"
}
▪ Region, Datacenters
▪ Job Type
▪ Group
▪ Task
▪ Driver
▪ Resources
▪ Constraints
▪ Priorities
▪ Environment Variables
▪ Periodic Jobs
▪ Updating Jobs
▪ Consul Integration
▪ Vault Integration
Copyright © 2018 HashiCorp
Job Specification - Vault Integration
24
job “my_job" {
group "example" {
task "server" {
vault {
policies = ["cdn", "frontend"]
change_mode = "signal"
change_signal = "SIGUSR1"
}
}
}
}
▪ Region, Datacenters
▪ Job Type
▪ Group
▪ Task
▪ Driver
▪ Resources
▪ Constraints
▪ Priorities
▪ Environment Variables
▪ Periodic Jobs
▪ Updating Jobs
▪ Consul Integration
▪ Vault Integration
Thank you.
hello@hashicorp.comwww.hashicorp.com

More Related Content

PDF
Hashicorp Nomad
PPTX
Adopting OpenTelemetry
PPTX
Apache Flink and what it is used for
PDF
Apache Flink internals
PDF
Introduction to Apache Flink - Fast and reliable big data processing
PDF
Google Cloud Platform
PPSX
Zero-Trust SASE DevSecOps
PPTX
Serving BERT Models in Production with TorchServe
Hashicorp Nomad
Adopting OpenTelemetry
Apache Flink and what it is used for
Apache Flink internals
Introduction to Apache Flink - Fast and reliable big data processing
Google Cloud Platform
Zero-Trust SASE DevSecOps
Serving BERT Models in Production with TorchServe

What's hot (20)

PDF
Database Cloud Services Office Hours - 0421 - Migrate AWS to OCI
PDF
Confluent Partner Tech Talk with BearingPoint
PDF
Spark (Structured) Streaming vs. Kafka Streams
PDF
Oracle Database Migration to Oracle Cloud Infrastructure
PDF
Multi-Cloud with Nomad and Consul Connect
PPTX
OpenShift Introduction
ODP
Kong API Gateway
PDF
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
PDF
Data in Motion Tour 2024 Riyadh, Saudi Arabia
PDF
Streaming Data Lakes using Kafka Connect + Apache Hudi | Vinoth Chandar, Apac...
PPTX
Introduction to Microsoft Azure
PDF
FIWARE Wednesday Webinars - NGSI-LD and Smart Data Models: Standard Access to...
PDF
Accelerating Envoy and Istio with Cilium and the Linux Kernel
PPTX
Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...
PDF
Velero & Beyond: Backup & Restore for Kubernetes Applications (Cloud Native S...
PDF
Terraform -- Infrastructure as Code
PDF
Terraform: An Overview & Introduction
PDF
Etl is Dead; Long Live Streams
PPTX
OCI Overview
PPTX
Oracle APEX, Low Code for Data Driving Apps
Database Cloud Services Office Hours - 0421 - Migrate AWS to OCI
Confluent Partner Tech Talk with BearingPoint
Spark (Structured) Streaming vs. Kafka Streams
Oracle Database Migration to Oracle Cloud Infrastructure
Multi-Cloud with Nomad and Consul Connect
OpenShift Introduction
Kong API Gateway
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
Data in Motion Tour 2024 Riyadh, Saudi Arabia
Streaming Data Lakes using Kafka Connect + Apache Hudi | Vinoth Chandar, Apac...
Introduction to Microsoft Azure
FIWARE Wednesday Webinars - NGSI-LD and Smart Data Models: Standard Access to...
Accelerating Envoy and Istio with Cilium and the Linux Kernel
Flink Forward San Francisco 2019: Moving from Lambda and Kappa Architectures ...
Velero & Beyond: Backup & Restore for Kubernetes Applications (Cloud Native S...
Terraform -- Infrastructure as Code
Terraform: An Overview & Introduction
Etl is Dead; Long Live Streams
OCI Overview
Oracle APEX, Low Code for Data Driving Apps
Ad

Similar to Easy and Flexible Application Deployment with HashiCorp Nomad (20)

PPTX
Modern Scheduling for Modern Applications with Nomad
PPTX
Carrier Paas - CloudStack Collaboration Event 2012
PDF
Lessons learned when managing MySQL in the Cloud
PDF
Data Analytics Service Company and Its Ruby Usage
PDF
Incrementalism: An Industrial Strategy For Adopting Modern Automation
PPTX
Oracle GoldenGate 18c - REST API Examples
PDF
The Best Practices and Hard Lessons Learned of Serverless Applications
PPTX
Coherence RoadMap 2018
PDF
Using Databases and Containers From Development to Deployment
PDF
SD Times - Docker v2
ODP
Building a Dev/Test Cloud with Apache CloudStack
PDF
Working with Terraform on Azure
PPTX
In-Memory Stream Processing with Hazelcast Jet @JEEConf
PDF
Nomad Multi-Cloud
PPTX
A Groovy Kind of Java (San Francisco Java User Group)
PDF
Living the Nomadic life - Nic Jackson
PPTX
Cloud Adoption: From Start to PaaS
PPTX
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
PDF
Aerospike meetup july 2019 | Big Data Demystified
PDF
What does Serverless mean for tomorrow’s abstracted infrastructure? - Gadi Na...
Modern Scheduling for Modern Applications with Nomad
Carrier Paas - CloudStack Collaboration Event 2012
Lessons learned when managing MySQL in the Cloud
Data Analytics Service Company and Its Ruby Usage
Incrementalism: An Industrial Strategy For Adopting Modern Automation
Oracle GoldenGate 18c - REST API Examples
The Best Practices and Hard Lessons Learned of Serverless Applications
Coherence RoadMap 2018
Using Databases and Containers From Development to Deployment
SD Times - Docker v2
Building a Dev/Test Cloud with Apache CloudStack
Working with Terraform on Azure
In-Memory Stream Processing with Hazelcast Jet @JEEConf
Nomad Multi-Cloud
A Groovy Kind of Java (San Francisco Java User Group)
Living the Nomadic life - Nic Jackson
Cloud Adoption: From Start to PaaS
Configs, Configs, Everywhere! (Actually, Let's Simplify All Those Configs)
Aerospike meetup july 2019 | Big Data Demystified
What does Serverless mean for tomorrow’s abstracted infrastructure? - Gadi Na...
Ad

More from Amanda MacLeod (7)

PDF
How to Use HashiCorp Vault with Hiera 5 for Secret Management With Puppet
PDF
Managing and Integrating Vault at The New York Times
PPTX
Secure and Convenient Workflows: Integrating HashiCorp Vault with Pivotal Clo...
PPTX
Secure and Convenient Workflows: Integrating HashiCorp Vault with Pivotal Clo...
PPTX
Provision to Production with Terraform Enterprise
PPTX
Rein in Your Cloud Costs with Terraform and AWS Lambda
PPTX
Delivering Secret Zero: Vault AppRole with Terraform and Chef
How to Use HashiCorp Vault with Hiera 5 for Secret Management With Puppet
Managing and Integrating Vault at The New York Times
Secure and Convenient Workflows: Integrating HashiCorp Vault with Pivotal Clo...
Secure and Convenient Workflows: Integrating HashiCorp Vault with Pivotal Clo...
Provision to Production with Terraform Enterprise
Rein in Your Cloud Costs with Terraform and AWS Lambda
Delivering Secret Zero: Vault AppRole with Terraform and Chef

Recently uploaded (20)

PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Encapsulation theory and applications.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Big Data Technologies - Introduction.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Chapter 3 Spatial Domain Image Processing.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Programs and apps: productivity, graphics, security and other tools
Encapsulation theory and applications.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
sap open course for s4hana steps from ECC to s4
Big Data Technologies - Introduction.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
MIND Revenue Release Quarter 2 2025 Press Release
Per capita expenditure prediction using model stacking based on satellite ima...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Machine learning based COVID-19 study performance prediction
The Rise and Fall of 3GPP – Time for a Sabbatical?
Reach Out and Touch Someone: Haptics and Empathic Computing
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
Mobile App Security Testing_ A Comprehensive Guide.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Chapter 3 Spatial Domain Image Processing.pdf

Easy and Flexible Application Deployment with HashiCorp Nomad

  • 1. Copyright © 2018 HashiCorp Easy and Flexible Application Deployment with HashiCorp Nomad Rob Genova - Nomad Product Manager Nic Jackson - Developer Advocate
  • 2. Copyright © 2018 HashiCorp Company overview 2 Mission Key Products Founded 2012 by Mitchell Hashimoto and Armon Dadgar We enable organizations to Provision, Secure, Connect, and Run any infrastructure for any application https://www.hashicorp.com/blog/the-tao-of-hashicorp
  • 3. Copyright © 2018 HashiCorp 3 DEVELOPMENT SECURITY OPERATIONS Run applications Secure infrastructure & applications Provision infrastructure The HashiCorp open source suite THE PRACTITIONER
  • 4. Copyright © 2018 HashiCorp 4 DEVELOPMENT SECURITY OPERATIONS Run applications Secure infrastructure & applications Challenges for organizations as they scale ENTERPRISE ENTERPRISE ENTERPRISE THE PRACTITIONER TEAMS • Collaboration • Operations • Governance & policy ENTERPRISE DEVELOPMENT SECURITY OPERATIONS Run applications Secure infrastructure & applications Provision infrastructure
  • 5. Copyright © 2018 HashiCorp Schedulers and orchestration tools generally leverage containerization to: - Improve deployment workflows - Reduce the tight coupling between developers and operators - Increase the resilience of running applications - Enable more efficient use of compute resources However, there are a number of drawbacks: - Overly complex for developers to define and run workloads - Difficult to deploy and operate - Inflexible with respect to both workload and packaging - Difficult to scale and deploy across regions - Difficult to grasp mental model; steep learning curve Nomad Origin 5
  • 6. Copyright © 2018 HashiCorp Nomad’s goal is to enable an organization to easily run any application on any infrastructure at any scale. With the following characteristics: -Easy to learn, simple mental model -Easy and efficient for developers to define and run workloads -Easy to deploy and operate -Integrates easily into existing workflows -First-class support for all major workload types -Easy to deploy across regions and cloud providers -Easy to scale -Integrates seamlessly with other HashiCorp tooling Nomad Objectives 6
  • 7. Copyright © 2018 HashiCorp Nomad Workflow 7 User Nomad Servers Submits Job Nomad Clients Deploy App Skip (Busy)
  • 8. Copyright © 2018 HashiCorp 8 Declarative Job Specification job "my_job" { datacenters = ["us-west-1", “us-east-1"] type = "service" group "web" { count = 5 task "frontend" { driver = "docker" config { image = "hashicorp/web-frontend" } resources { cpu = 500 # MHz memory = 128 # MB network { mbits = 100 } }
  • 9. Copyright © 2018 HashiCorp Single Binary - Client/Server Deployment Topology 9
  • 10. Copyright © 2018 HashiCorp Multi-region Deployment Topology 10
  • 11. Copyright © 2018 HashiCorp Internal State, Parallelized Scheduling 11
  • 12. Copyright © 2018 HashiCorp Job Specification - Regions, Datacenters ▪ Region, Datacenters ▪ Job Type ▪ Group ▪ Task ▪ Driver ▪ Resources ▪ Constraints ▪ Priorities ▪ Environment Variables ▪ Periodic Jobs ▪ Updating Jobs ▪ Consul Integration ▪ Vault Integration 12 job “my_job" { region = "us" datacenters = ["us-west-1", "us-east-1"] type = "service" group "web" { count = 5 task "frontend" { driver = "docker" config { image = "hashicorp/web-frontend" } resources { cpu = 500 # MHz memory = 128 # MB network { mbits = 100 port "http" {} port "https" { static = 443 } }
  • 13. Copyright © 2018 HashiCorp Job Specification - Job Type 13 job “my_job" { region = "us" datacenters = ["us-west-1", "us-east-1"] type = "service" group "web" { count = 5 task "frontend" { driver = "docker" config { image = "hashicorp/web-frontend" } resources { cpu = 500 # MHz memory = 128 # MB network { mbits = 100 port "http" {} port "https" { static = 443 } } } } ▪ Region, Datacenters ▪ Job Type ▪ Group ▪ Task ▪ Driver ▪ Resources ▪ Constraints ▪ Priorities ▪ Environment Variables ▪ Periodic Jobs ▪ Updating Jobs ▪ Consul Integration ▪ Vault Integration
  • 14. Copyright © 2018 HashiCorp Job Specification - Group 14 job “my_job" { region = "us" datacenters = ["us-west-1", "us-east-1"] type = "service" group "web" { count = 5 task "frontend" { driver = "docker" config { image = "hashicorp/web-frontend" } resources { cpu = 500 # MHz memory = 128 # MB network { mbits = 100 port "http" {} port "https" { static = 443 } } } } } } ▪ Region, Datacenters ▪ Job Type ▪ Group ▪ Task ▪ Driver ▪ Resources ▪ Constraints ▪ Priorities ▪ Environment Variables ▪ Periodic Jobs ▪ Updating Jobs ▪ Consul Integration ▪ Vault Integration
  • 15. Copyright © 2018 HashiCorp Job Specification - Task 15 job “my_job" { region = "us" datacenters = ["us-west-1", "us-east-1"] type = "service" group "web" { count = 5 task "frontend" { driver = "docker" config { image = "hashicorp/web-frontend" } resources { cpu = 500 # MHz memory = 128 # MB network { mbits = 100 port "http" {} port "https" { static = 443 } } } } } } } ▪ Region, Datacenters ▪ Job Type ▪ Group ▪ Task ▪ Driver ▪ Resources ▪ Constraints ▪ Priorities ▪ Environment Variables ▪ Periodic Jobs ▪ Updating Jobs ▪ Consul Integration ▪ Vault Integration
  • 16. Copyright © 2018 HashiCorp Job Specification - Driver 16 job “my_job" { region = "us" datacenters = ["us-west-1", "us-east-1"] type = "service" group "web" { count = 5 task "frontend" { driver = "docker" config { image = "hashicorp/web-frontend" } resources { cpu = 500 # MHz memory = 128 # MB network { mbits = 100 port "http" {} port "https" { static = 443 } } } } } } } } ▪ Region, Datacenters ▪ Job Type ▪ Group ▪ Task ▪ Driver ▪ Resources ▪ Constraints ▪ Priorities ▪ Environment Variables ▪ Periodic Jobs ▪ Updating Jobs ▪ Consul Integration ▪ Vault Integration
  • 17. Copyright © 2018 HashiCorp Job Specification - Resources 17 job “my_job" { region = "us" datacenters = ["us-west-1", "us-east-1"] type = "service" group "web" { count = 5 task "frontend" { driver = "docker" config { image = "hashicorp/web-frontend" } resources { cpu = 500 # MHz memory = 128 # MB network { mbits = 100 port "http" {} port "https" { static = 443 } } } } } } } } ▪ Region, Datacenters ▪ Job Type ▪ Group ▪ Task ▪ Driver ▪ Resources ▪ Constraints ▪ Priorities ▪ Environment Variables ▪ Periodic Jobs ▪ Updating Jobs ▪ Consul Integration ▪ Vault Integration
  • 18. Copyright © 2018 HashiCorp Job Specification - Constraints 18 job “my_job" { # All tasks in this job must run on linux. constraint { attribute = "${attr.kernel.name}" value = "linux" } group "example" { # All groups in this job should be scheduled on different hosts. constraint { operator = "distinct_hosts" value = "true" } task "server" { # All tasks must run where "my_custom_value" is greater than 3. constraint { attribute = "${meta.my_custom_value}" operator = ">" value = "3" } } } } ▪ Region, Datacenters ▪ Job Type ▪ Group ▪ Task ▪ Driver ▪ Resources ▪ Constraints ▪ Priorities ▪ Environment Variables ▪ Periodic Jobs ▪ Updating Jobs ▪ Consul Integration ▪ Vault Integration
  • 19. Copyright © 2018 HashiCorp Job Specification - Priorities 19 job “my_job" { region = “north-america" datacenters = [“us-east-1"] priority = 100 constraint { # ... } group "example" { # ... } ▪ Region, Datacenters ▪ Job Type ▪ Group ▪ Task ▪ Driver ▪ Resources ▪ Constraints ▪ Priorities ▪ Environment Variables ▪ Periodic Jobs ▪ Updating Jobs ▪ Consul Integration ▪ Vault Integration
  • 20. Copyright © 2018 HashiCorp Job Specification - Environment Variables 20 job “my_job" { group "example" { task "server" { env { my_key = "my-value" } } } } ▪ Region, Datacenters ▪ Job Type ▪ Group ▪ Task ▪ Driver ▪ Resources ▪ Constraints ▪ Priorities ▪ Environment Variables ▪ Periodic Jobs ▪ Updating Jobs ▪ Consul Integration ▪ Vault Integration
  • 21. Copyright © 2018 HashiCorp Job Specification - Periodic Jobs 21 job “my_job" { periodic { cron = "*/15 * * * * *" prohibit_overlap = true } } ▪ Region, Datacenters ▪ Job Type ▪ Group ▪ Task ▪ Driver ▪ Resources ▪ Constraints ▪ Priorities ▪ Environment Variables ▪ Periodic Jobs ▪ Updating Jobs ▪ Consul Integration ▪ Vault Integration
  • 22. Copyright © 2018 HashiCorp Job Specification - Updating Jobs 22 job “my_job” { update { max_parallel = 3 health_check = "checks" min_healthy_time = "10s" healthy_deadline = "10m" auto_revert = true canary = 1 stagger = "30s" } } ▪ Region, Datacenters ▪ Job Type ▪ Group ▪ Task ▪ Driver ▪ Resources ▪ Constraints ▪ Priorities ▪ Environment Variables ▪ Periodic Jobs ▪ Updating Jobs ▪ Consul Integration ▪ Vault Integration
  • 23. Copyright © 2018 HashiCorp Job Specification - Consul Integration 23 job “my_job" { group "example" { task "server" { service { tags = ["leader", "mysql"] port = “db" check { type = "script" name = "check_table" command = "/usr/local/bin/check_mysql_table_status" args = ["--verbose"] interval = "60s" timeout = “5s" } template { source = "local/redis.conf.tpl" destination = "local/redis.conf" change_mode = "signal" change_signal = "SIGINT" } ▪ Region, Datacenters ▪ Job Type ▪ Group ▪ Task ▪ Driver ▪ Resources ▪ Constraints ▪ Priorities ▪ Environment Variables ▪ Periodic Jobs ▪ Updating Jobs ▪ Consul Integration ▪ Vault Integration
  • 24. Copyright © 2018 HashiCorp Job Specification - Vault Integration 24 job “my_job" { group "example" { task "server" { vault { policies = ["cdn", "frontend"] change_mode = "signal" change_signal = "SIGUSR1" } } } } ▪ Region, Datacenters ▪ Job Type ▪ Group ▪ Task ▪ Driver ▪ Resources ▪ Constraints ▪ Priorities ▪ Environment Variables ▪ Periodic Jobs ▪ Updating Jobs ▪ Consul Integration ▪ Vault Integration

Editor's Notes

  • #2: Thanks Amanda! Hello to everybody on the line. As Amanda mentioned, I’d like to spend a few minutes going over how the HashiCorp product portfolio fits together and also give a brief technical overview of Nomad before we jump into Nic's demo.
  • #3: HashiCorp has been around for almost six years. We have found that as organizations move from monolithic applications running on dedicated infrastructure to service-oriented applications running across multiple cloud providers, there are a common set of challenges that are encountered. HashiCorp's mission is to enable a consistent set of workflows as organizations make this transition and to do so with a suite of products that have well-defined scope and are loosely coupled but elegantly integrate with each other to form a solid/complete solution rather than taking an all-in-one platform type approach. Our four primary products - Terraform, Vault, Consul and Nomad together enable an organization to provision, secure, connect and run any infrastructure for any application (respectively).
  • #4: So, I am going to quickly introduce each of the products at a high level in case anyone on the call isn't familiar. Starting from the bottom of the slide. Terraform provides a common infrastructure provisioning workflow across private cloud, public cloud and external services with built-in dependency management and an "as code" approach. Moving up the stack, Vault enables a unified secrets management workflow across cloud providers and identity sources. Consul provides a backbone that more-or-less enables an organization to connect, configure and monitor their services across data centers and regions. Consul is widely used today for service discovery and dynamic configuration, for example. And finally, Nomad enables a common workflow for both container-based and legacy application deployment. And again - like the other products - it does so in a way that elegantly spans both private infrastructure and public cloud providers.
  • #5: The enterprise versions of the products add collaboration, operations and governance features that help organizations address the challenges that arise as the scale and complexity of their internal operational platform increases.
  • #6: So, Nomad is HashiCorp’s scheduler and application deployment tool. The product niche that it fits into is often referred to as container management or container orchestration. It is the newest of the four primary HashiCorp products and was designed first and foremost in accordance with HashiCorp principles. It is workflow oriented. It is simple and modular, and can be easily combined with our other tools to solve the wider challenges. But in many ways Nomad’s design was also a response to the operational challenges and the lack of flexibility that we observed with some of the other container management tools.
  • #7: At a high level, Nomad’s goal is to enable an organization to easily run any application on any infrastructure at any scale with the characteristics listed here. Nomad is easy to learn; it has a very simple mental model. It’s easy to use for both developers and operators. Nomad is flexible and can be easily integrated into your existing workflows. It supports all workload types. Nomad is dead simple to federate across regions and cloud providers. It is also easy to scale and elegantly integrates with other HashiCorp tooling.
  • #8: Lets cover how Nomad works at a high level before we turn it over to Nic. Nomad uses a simple client/server architecture. The servers handle application placement across a set of client nodes, optimizing for resource efficiency and accounting for the defined priority and constraints. From a workflow perspective, Nomad enables a user to define the deployment requirements for an application which can then be submitted to any server.
  • #9: Nomad’s job specification is declarative and uses the HashiCorp Configuration Language (HCL) which will be familiar to any Terraform users. The job spec defines the deployment schema for the application and includes the task definition, the driver (which may or may not be Docker), the image, resource reservations, job priority, constraints, service registrations and any other information required to deploy the application. I’ll go over the job spec in more detail in a few minutes.
  • #10: From an operational perspective, Nomad consists of a single binary that can run in either client or server mode. Three or more servers form a highly available control plane to handle scheduling. The servers store state internally and use a Raft-based consensus protocol for state replication and automatic leader election. This makes Nomad highly available out of the box. There is no etcd or Zookeeper external dependency. The clients register with the servers, wait for work to be assigned and execute tasks. A single, logical cluster defines a region which can contain multiple data centers.
  • #11: Multiple regions can be easily federated together with a single CLI command. Nomad natively uses a gossip protocol for cross region cluster membership and failure detection. Work can be scheduled across the region boundary.
  • #12: As mentioned earlier, Nomad stores and replicates state internally across all servers. This architecture enables an optimistically concurrent and parallelized scheduling strategy that can yield thousands of job placements per second (a key advantage for batch processing workloads).
  • #13: I am going to finish up by quickly running through the job spec in a bit more detail. A job can be submitted to exactly one region but can request placement across multiple data centers within that region.
  • #14: Type indicates whether the job is a service, a batch job or a system job. System jobs run on every node automatically.
  • #15: The group stanza defines a series of tasks that should be co-located on the same Nomad client. This is similar to a pod in Kubernetes.
  • #16: The task stanza defines an individual unit of work, such as a web application or a batch processing task.
  • #17: The task stanza includes the driver and the image (next slide)
  • #18: .. as well as the resource requirements for the task.
  • #19: Constraints limit placement based on client properties or metadata and can be specified at the job, group or task levels.
  • #20: Priority can be specified at the job level. Higher priority jobs will be sorted the top of the evaluation and planning queues for scheduling.
  • #21: The env stanza can be used to populate the task's environment before starting.
  • #22: The periodic stanza allows a job to run at fixed times, dates, or intervals (similar to cron).
  • #23: The update stanza can be used to perform rolling, canary-based or blue/green job updates. Updates can be gated on Consul health check status and automatically reverted. Nic will be demonstrating updates as part of the demo.
  • #24: There are a couple of different ways that Nomad integrates with Consul. The service stanza in the job spec can be used to register services and health checks in Consul. The template stanza can be used to update configuration files and environment variables in a running task based on Consul KV data. This feature uses consul-template under the hood. A Nomad cluster can also be automatically bootstrapped if a Consul deployment already exists.
  • #25: And finally, Nomad supports a first-class Vault-based workflow for secrets retrieval. The vault stanza in the job spec allows a task to specify that it requires a token from an existing instance of Vault. Nomad will automatically retrieve a Vault token for the task upon job placement. The template stanza can be used for automatic secret renewal and re-rendering of configuration files (or updating environment variables).