SlideShare a Scribd company logo
⁄
Ground Control to
Nomad Job Dispatch
Michael Lange
@DingoEatingFuzz
https://github.com/ashleymcnamara/gophers/blob/master/Kubernetes_Gophers.png
“What is Nomad?”
–like, a lot of people
Yes No I don’t know
What is a parameterized job?
Welcome to the talk.
What is a job?
Welcome to the preface.
Standard Job Flow
Periodic Job Flow
Parameterized Job Flow
Meta Params: Small configuration strings/ids
Payload: Larger configuration blob.
Parameterized Job Flow
Meta Params: Query Params/GET
Payload: Request Body/POST
The Simplest Imaginable
Parameterized Job
DEMO
Our job file
Batch Job
Parameterized options
Simple bash command
CODE EDITOR
job "hi" {
datacenters = ["dc1"]
type = "batch"
parameterized {
payload = "required"
}
task "hi" {
driver = "exec"
dispatch_payload {
file = "message.txt"
}
config {
command = "bash"
args = [
"-c",
"echo "Hello, $(cat ${NOMAD_TASK_DIR}/message.txt)"; sleep 120"
]
}
resources {
cpu = 100
memory = 64
}
}
}
Our job file
Batch Job
Parameterized options
Simple bash command
CODE EDITOR
job "hi" {
datacenters = ["dc1"]
type = "batch"
parameterized {
payload = "required"
}
task "hi" {
driver = "exec"
dispatch_payload {
file = "message.txt"
}
config {
command = "bash"
args = [
"-c",
"echo "Hello, $(cat ${NOMAD_TASK_DIR}/message.txt)"; sleep 120"
]
}
resources {
cpu = 100
memory = 64
}
}
}
Our job file
Batch Job
Parameterized options
Simple bash command
CODE EDITOR
job "hi" {
datacenters = ["dc1"]
type = "batch"
parameterized {
payload = "required"
}
task "hi" {
driver = "exec"
dispatch_payload {
file = "message.txt"
}
config {
command = "bash"
args = [
"-c",
"echo "Hello, $(cat ${NOMAD_TASK_DIR}/message.txt)"; sleep 120"
]
}
resources {
cpu = 100
memory = 64
}
}
}
Our job file
Batch Job
Parameterized options
Simple bash command
CODE EDITOR
job "hi" {
datacenters = ["dc1"]
type = "batch"
parameterized {
payload = "required"
}
task "hi" {
driver = "exec"
dispatch_payload {
file = "message.txt"
}
config {
command = "bash"
args = [
"-c",
"echo "Hello, $(cat ${NOMAD_TASK_DIR}/message.txt)"; sleep 120"
]
}
resources {
cpu = 100
memory = 64
}
}
}
“Cool story, bro”
–you, probably
What if…
1. I have various datasets about the world
2. I want to make a choropleth*
3. I don’t know what map projection I want
4. I’d like to quickly generate a variety of options
*A map where regions are colored proportionally according to some value
The tools we have available
▪ Meta params
▪ Payload
The tools we have available
▪ Meta params Good for specifying a projection
▪ Payload Good for attaching the dataset
16KiB
The maximum payload size for
a dispatched job.
Artifact
Stanza
A way of telling Nomad to
download files before
starting a task.
CODE EDITOR
task "map" {
# ...
artifact {
source = “https://the.inter.net“
destination = "data.json"
mode = "file"
}
# ...
}
Combine
Concepts
Parameterized meta
params can be
interpolated and will also
exist in the task env.
CODE EDITOR
parameterized {
payload = "forbidden"
meta_required = [ "DATA_FILE", "PROJECTION" ],
}
task "map" {
# ...
artifact {
source = "${NOMAD_META_DATA_FILE}"
destination = "data.json"
mode = "file"
}
# ...
}
Let’s Make Some Maps!
DEMO
A final note about
that demo…
¯_(ツ)_/¯
“Workflows, not technologies”
–Tao of HashiCorp
Exec Task
Driver
Get an isolated context for
your task. Run whatever
you want.
CODE EDITOR
task "map" {
driver = "exec"
artifact {
source = “https://.../make-svg-linux”
}
config {
command = "make-svg-linux"
args = [
"${NOMAD_META_PROJECTION}",
"data.json",
]
}
}
Recap!
1. Nomad! It’s HashiCorp’s workload orchestrator
2. Parameterized jobs! A way of modeling batch jobs as a template
3. Nomad Job Dispatch! A way of launching a job based on a parameterized template
4. Payload and Meta Params! Two different ways of providing context to a dispatched job
5. Artifacts! Another Nomad concept for downloading files. Compose utilities for great affect
6. Exec Driver! Maybe you don’t need to containerize everything.
7. Map Projections! They’re so neat
LEARN FORUMS
learn.hashicorp.com/nomad discuss.hashicorp.com/c/nomad
Thank you!
Source Code: https://github.com/DingoEatingFuzz/hashitalks-2020-map-dispatch

More Related Content

What's hot

How to set up Windows Mail accounts
How to set up Windows Mail accountsHow to set up Windows Mail accounts
How to set up Windows Mail accounts
guest970364
 
Tabela de obrigacoes.docx
Tabela de obrigacoes.docxTabela de obrigacoes.docx
Tabela de obrigacoes.docx
sindiconet
 
NHK番組表API ‐ 放送通信連携とAPIのこれから
NHK番組表API ‐ 放送通信連携とAPIのこれからNHK番組表API ‐ 放送通信連携とAPIのこれから
NHK番組表API ‐ 放送通信連携とAPIのこれから
API Meetup
 
[오픈소스컨설팅]J boss6 7_교육자료
[오픈소스컨설팅]J boss6 7_교육자료[오픈소스컨설팅]J boss6 7_교육자료
[오픈소스컨설팅]J boss6 7_교육자료
Ji-Woong Choi
 
How I built a WebRTC enabled website in 20 minutes!
How I built a WebRTC enabled website in 20 minutes!How I built a WebRTC enabled website in 20 minutes!
How I built a WebRTC enabled website in 20 minutes!
Paul Richards
 
Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014
JWORKS powered by Ordina
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
Swati Bansal
 
Websites to submit a new blog
Websites to submit a new blogWebsites to submit a new blog
Websites to submit a new blog
Harsh Agrawal
 

What's hot (8)

How to set up Windows Mail accounts
How to set up Windows Mail accountsHow to set up Windows Mail accounts
How to set up Windows Mail accounts
 
Tabela de obrigacoes.docx
Tabela de obrigacoes.docxTabela de obrigacoes.docx
Tabela de obrigacoes.docx
 
NHK番組表API ‐ 放送通信連携とAPIのこれから
NHK番組表API ‐ 放送通信連携とAPIのこれからNHK番組表API ‐ 放送通信連携とAPIのこれから
NHK番組表API ‐ 放送通信連携とAPIのこれから
 
[오픈소스컨설팅]J boss6 7_교육자료
[오픈소스컨설팅]J boss6 7_교육자료[오픈소스컨설팅]J boss6 7_교육자료
[오픈소스컨설팅]J boss6 7_교육자료
 
How I built a WebRTC enabled website in 20 minutes!
How I built a WebRTC enabled website in 20 minutes!How I built a WebRTC enabled website in 20 minutes!
How I built a WebRTC enabled website in 20 minutes!
 
Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Websites to submit a new blog
Websites to submit a new blogWebsites to submit a new blog
Websites to submit a new blog
 

Similar to Ground Control to Nomad Job Dispatch

Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
Ortus Solutions, Corp
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
Ortus Solutions, Corp
 
CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourCouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 Hour
Peter Friese
 
Rails with mongodb
Rails with mongodbRails with mongodb
Rails with mongodb
Kosuke Matsuda
 
MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know
Norberto Leite
 
Mongo+java (1)
Mongo+java (1)Mongo+java (1)
Mongo+java (1)
MongoDB
 
DataMapper
DataMapperDataMapper
DataMapper
Yehuda Katz
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
James Rakich
 
solving little problems
solving little problemssolving little problems
solving little problems
Austin Ziegler
 
Build your first MongoDB App in Ruby @ StrangeLoop 2013
Build your first MongoDB App in Ruby @ StrangeLoop 2013Build your first MongoDB App in Ruby @ StrangeLoop 2013
Build your first MongoDB App in Ruby @ StrangeLoop 2013
Steven Francia
 
Why and How Powershell will rule the Command Line - Barcamp LA 4
Why and How Powershell will rule the Command Line - Barcamp LA 4Why and How Powershell will rule the Command Line - Barcamp LA 4
Why and How Powershell will rule the Command Line - Barcamp LA 4
Ilya Haykinson
 
Webinar: Data Processing and Aggregation Options
Webinar: Data Processing and Aggregation OptionsWebinar: Data Processing and Aggregation Options
Webinar: Data Processing and Aggregation Options
MongoDB
 
Блохин Леонид - "Mist, как часть Hydrosphere"
Блохин Леонид - "Mist, как часть Hydrosphere"Блохин Леонид - "Mist, как часть Hydrosphere"
Блохин Леонид - "Mist, как часть Hydrosphere"
Provectus
 
Tearing the Sofa Apart: CouchDB and CouchApps from a Beginner's Perspective
Tearing the Sofa Apart: CouchDB and CouchApps from a Beginner's PerspectiveTearing the Sofa Apart: CouchDB and CouchApps from a Beginner's Perspective
Tearing the Sofa Apart: CouchDB and CouchApps from a Beginner's Perspective
Seh Hui Leong
 
MongoDB World 2019: Terraform New Worlds on MongoDB Atlas
MongoDB World 2019: Terraform New Worlds on MongoDB Atlas MongoDB World 2019: Terraform New Worlds on MongoDB Atlas
MongoDB World 2019: Terraform New Worlds on MongoDB Atlas
MongoDB
 
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaSolutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Guido Schmutz
 
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
confluent
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responses
darrelmiller71
 
Allura - an Open Source MongoDB Based Document Oriented SourceForge
Allura - an Open Source MongoDB Based Document Oriented SourceForgeAllura - an Open Source MongoDB Based Document Oriented SourceForge
Allura - an Open Source MongoDB Based Document Oriented SourceForge
Rick Copeland
 
London HUG 12/4
London HUG 12/4London HUG 12/4

Similar to Ground Control to Nomad Job Dispatch (20)

Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
 
CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourCouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 Hour
 
Rails with mongodb
Rails with mongodbRails with mongodb
Rails with mongodb
 
MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know
 
Mongo+java (1)
Mongo+java (1)Mongo+java (1)
Mongo+java (1)
 
DataMapper
DataMapperDataMapper
DataMapper
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
 
solving little problems
solving little problemssolving little problems
solving little problems
 
Build your first MongoDB App in Ruby @ StrangeLoop 2013
Build your first MongoDB App in Ruby @ StrangeLoop 2013Build your first MongoDB App in Ruby @ StrangeLoop 2013
Build your first MongoDB App in Ruby @ StrangeLoop 2013
 
Why and How Powershell will rule the Command Line - Barcamp LA 4
Why and How Powershell will rule the Command Line - Barcamp LA 4Why and How Powershell will rule the Command Line - Barcamp LA 4
Why and How Powershell will rule the Command Line - Barcamp LA 4
 
Webinar: Data Processing and Aggregation Options
Webinar: Data Processing and Aggregation OptionsWebinar: Data Processing and Aggregation Options
Webinar: Data Processing and Aggregation Options
 
Блохин Леонид - "Mist, как часть Hydrosphere"
Блохин Леонид - "Mist, как часть Hydrosphere"Блохин Леонид - "Mist, как часть Hydrosphere"
Блохин Леонид - "Mist, как часть Hydrosphere"
 
Tearing the Sofa Apart: CouchDB and CouchApps from a Beginner's Perspective
Tearing the Sofa Apart: CouchDB and CouchApps from a Beginner's PerspectiveTearing the Sofa Apart: CouchDB and CouchApps from a Beginner's Perspective
Tearing the Sofa Apart: CouchDB and CouchApps from a Beginner's Perspective
 
MongoDB World 2019: Terraform New Worlds on MongoDB Atlas
MongoDB World 2019: Terraform New Worlds on MongoDB Atlas MongoDB World 2019: Terraform New Worlds on MongoDB Atlas
MongoDB World 2019: Terraform New Worlds on MongoDB Atlas
 
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaSolutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
 
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responses
 
Allura - an Open Source MongoDB Based Document Oriented SourceForge
Allura - an Open Source MongoDB Based Document Oriented SourceForgeAllura - an Open Source MongoDB Based Document Oriented SourceForge
Allura - an Open Source MongoDB Based Document Oriented SourceForge
 
London HUG 12/4
London HUG 12/4London HUG 12/4
London HUG 12/4
 

Recently uploaded

Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 

Recently uploaded (20)

Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 

Ground Control to Nomad Job Dispatch

  • 1. ⁄ Ground Control to Nomad Job Dispatch Michael Lange @DingoEatingFuzz
  • 2.
  • 3.
  • 5.
  • 7.
  • 8. Yes No I don’t know
  • 9. What is a parameterized job? Welcome to the talk.
  • 10. What is a job? Welcome to the preface.
  • 13. Parameterized Job Flow Meta Params: Small configuration strings/ids Payload: Larger configuration blob.
  • 14. Parameterized Job Flow Meta Params: Query Params/GET Payload: Request Body/POST
  • 16. Our job file Batch Job Parameterized options Simple bash command CODE EDITOR job "hi" { datacenters = ["dc1"] type = "batch" parameterized { payload = "required" } task "hi" { driver = "exec" dispatch_payload { file = "message.txt" } config { command = "bash" args = [ "-c", "echo "Hello, $(cat ${NOMAD_TASK_DIR}/message.txt)"; sleep 120" ] } resources { cpu = 100 memory = 64 } } }
  • 17. Our job file Batch Job Parameterized options Simple bash command CODE EDITOR job "hi" { datacenters = ["dc1"] type = "batch" parameterized { payload = "required" } task "hi" { driver = "exec" dispatch_payload { file = "message.txt" } config { command = "bash" args = [ "-c", "echo "Hello, $(cat ${NOMAD_TASK_DIR}/message.txt)"; sleep 120" ] } resources { cpu = 100 memory = 64 } } }
  • 18. Our job file Batch Job Parameterized options Simple bash command CODE EDITOR job "hi" { datacenters = ["dc1"] type = "batch" parameterized { payload = "required" } task "hi" { driver = "exec" dispatch_payload { file = "message.txt" } config { command = "bash" args = [ "-c", "echo "Hello, $(cat ${NOMAD_TASK_DIR}/message.txt)"; sleep 120" ] } resources { cpu = 100 memory = 64 } } }
  • 19. Our job file Batch Job Parameterized options Simple bash command CODE EDITOR job "hi" { datacenters = ["dc1"] type = "batch" parameterized { payload = "required" } task "hi" { driver = "exec" dispatch_payload { file = "message.txt" } config { command = "bash" args = [ "-c", "echo "Hello, $(cat ${NOMAD_TASK_DIR}/message.txt)"; sleep 120" ] } resources { cpu = 100 memory = 64 } } }
  • 21. What if… 1. I have various datasets about the world 2. I want to make a choropleth* 3. I don’t know what map projection I want 4. I’d like to quickly generate a variety of options *A map where regions are colored proportionally according to some value
  • 22. The tools we have available ▪ Meta params ▪ Payload
  • 23. The tools we have available ▪ Meta params Good for specifying a projection ▪ Payload Good for attaching the dataset
  • 24. 16KiB The maximum payload size for a dispatched job.
  • 25. Artifact Stanza A way of telling Nomad to download files before starting a task. CODE EDITOR task "map" { # ... artifact { source = “https://the.inter.net“ destination = "data.json" mode = "file" } # ... }
  • 26. Combine Concepts Parameterized meta params can be interpolated and will also exist in the task env. CODE EDITOR parameterized { payload = "forbidden" meta_required = [ "DATA_FILE", "PROJECTION" ], } task "map" { # ... artifact { source = "${NOMAD_META_DATA_FILE}" destination = "data.json" mode = "file" } # ... }
  • 27.
  • 28.
  • 29. Let’s Make Some Maps! DEMO
  • 30. A final note about that demo…
  • 33. Exec Task Driver Get an isolated context for your task. Run whatever you want. CODE EDITOR task "map" { driver = "exec" artifact { source = “https://.../make-svg-linux” } config { command = "make-svg-linux" args = [ "${NOMAD_META_PROJECTION}", "data.json", ] } }
  • 34. Recap! 1. Nomad! It’s HashiCorp’s workload orchestrator 2. Parameterized jobs! A way of modeling batch jobs as a template 3. Nomad Job Dispatch! A way of launching a job based on a parameterized template 4. Payload and Meta Params! Two different ways of providing context to a dispatched job 5. Artifacts! Another Nomad concept for downloading files. Compose utilities for great affect 6. Exec Driver! Maybe you don’t need to containerize everything. 7. Map Projections! They’re so neat
  • 35.
  • 37. Thank you! Source Code: https://github.com/DingoEatingFuzz/hashitalks-2020-map-dispatch