SlideShare a Scribd company logo
10 things i learned building
Nomad packs
Bram Vogelaar
@attachmentgenie
• Used to be a Molecular Biologist
• Then became a Dev, now an Ops
• Currently Cloud Engineer @ The Factory
• Amsterdam HUG organizer
• Almost author => Workload Orchestration Made Easy With Nomad
$ whoami
l Open-source tool for dynamic workload scheduling
l Batch, containerized, and non-containerized applications.
l Has native Consul and Vault integrations.
l Has token based access setup.
l Jobs written in (H)ashiCorp (C)onfiguration (L)anguage
https://www.nomadproject.io/
Nomad
Nomad Job Structure
job "lorem-ipsum" {
group ”frontend" {
network {
port "http" { to = ”3000” }
}
service {
name = ”lorem"
port. = ”http"
}
task "server" {
driver = "docker"
config {
image = ”cicero/lorem-ipsum:v1.0.0"
ports = ["http"]
}
}
}
Surprisingly Dynamic
job "lorem-ipsum" {
group ”frontend" {
network {
port "http" { to = ”3000” }
}
service {
name = ”lorem"
port. = ”http"
}
task "server" {
driver = "docker"
config {
image = ”cicero/lorem-ipsum:v1.0.0"
ports = ["http"]
}
}
}
Job configuration includes options for but is not limited to:
• Datacenters
• Region
• Namespace
• Constraints
• Count
• Restart Configuration
• Network
• Volumes
• Service Checks
• Consul Connect
• Resource Limits
• Artifacts
• Templates
• Autoscaler Configuration
Incredibly Dynamic
UX Pyramid
• Levant
• Templating and packaging tool
• Easily deploy popular applications to Nomad
• Re-use common patterns across internal applications
• Find and share job definitions with the Nomad community
• Jobs written in (H)ashiCorp (C)onfiguration (L)anguage
• Templates are written using Go Template Syntax.
• Nightlies only right now!
Nomad Pack
https://github.com/hashicorp/nomad-pack
$ nomad-pack registry list
$ nomad-pack registry add o11y https://github.com/attachmentgenie/nomad-pack-o11y-registry $
$ nomad-pack run grafana --var job_name=dashboard --registry=o11y
$ nomad-pack run packs/grafana -f vars/grafana.hcl –f vars/lab.hcl
Pack Registries
https://github.com/hashicorp/nomad-pack-o11y-registry
$ nomad-pack registry list
PACK NAME | REF | METADATA VERSION | REGISTRY | REGISTRY URL
-----------------------------+--------+------------------+-----------------+-----------------------------
alertmanager | latest | 0.0.1 | default | github.com/hashicorp
aws_efs_csi | latest | 0.0.1 | default | github.com/hashicorp
Default registry
mkdir –p $HOME/.nomad/packs/default on offline systems!
lorem-ipsum ❯ tree
|-- CHANGELOG.md
|-- README.md
|-- metadata.hcl
|-- outputs.tpl
|-- templates
| |-- _helpers.tpl
| `-- lorem-ipsum.nomad.tpl
`-- variables.hcl
1 directory, 7 files
Pack Structure
app {
url = "https://grafana.com/"
author = "Grafana Labs"
}
pack {
name = "grafana"
description = "Grafana is a multi-platform open source analytics and interactive visualization tool."
url = "https://github.com/attachmentgenie/nomad-pack-o11y-registry/grafana"
version = "0.1.0"
}
metadata.hcl
variable "datacenters" {
description = "A list of datacenters in the region which are eligible for task placement"
type = list(string)
default = [“dc1”]
}
Variable “resources” {
description = “The resource to assign to the Grafana service task”
type = object({
cpu = number
memory = number
})
default = {
cpu = 200,
memory = 256
}
}
variables.hcl
$ cat packs/grafana/templates/grafana.nomad.tpl
….
datacenters = [[ .my.datacenters | toStringList ]]
…
resources {
cpu = [[ .my.grafana_resources.cpu ]]
memory = [[ .my.grafana_resources.memory ]]
}
…
Pack Templates
https://github.com/hashicorp/nomad-pack-community-registry
$ nomad-pack plan packs/loki --var version=vX.Y.Z -f vars/loki.hcl
+/- Job: "loki"
+ VaultToken: "s.IJcEJqpsCkGU0mfY3GmnCLSd"
+/- Task Group: "loki" (1 create, 2 in-place update)
+/- Count: "2" => "3" (forces create)
Task: "connect-proxy-loki" Task: "server"
» Scheduler dry-run:
- All tasks successfully allocated.
Plan succeeded
$ nomad-pack nomad-pack run packs/loki --var version=vX.Y.Z -f vars/loki.hcl
CI-CD
$ nomad-pack render packs/loki --var version=vX.Y.Z -f vars/loki.hcl -o $WORKSPACE/render
$ nomad run $WORKSPACE/render/loki/loki.nomad
CI-CD Paranoid Version
https://github.com/marketplace/actions/setup-hashicorp-nomad-pack
Nomad UI
$ cat packs/grafana/templates/grafana.nomad.tpl
job [[ template "job_name" . ]] {
[[ template "region" . ]]
[[ template "namespace" . ]]
….
$ cat packs/grafana/templates/_helpers.tpl
…
[[- define "job_name" -]]
[[- if eq .grafana.job_name "" -]]
[[- .nomad_pack.pack.name | quote -]]
[[- else -]]
[[- .grafana.job_name | quote -]]
[[- end -]]
[[- end -]]
…
Helper template
$ cat packs/grafana/templates/_helpers.tpl
…
[[ define "resources" -]]
[[- $resources := . ]]
resources {
cpu = [[ $resources.cpu ]]
memory = [[ $resources.memory ]]
}
[[- end ]]
…
$ cat packs/grafana/templates/grafana.nomad.tpl
…
[[ template " resources " . ]]
…
Abstracting away boring repetitive bits
$ cat packs/grafana/templates/_resources.tpl
…
[[ define "resources" -]]
[[- $resources := . ]]
resources {
cpu = [[ $resources.cpu ]]
memory = [[ $resources.memory ]]
}
[[- end ]]
…
$ cat packs/grafana/templates/grafana.nomad.tpl
…
[[ template " resources " . ]]
…
Abstracting away boring repetitive bits
Abstracting away boring repetitive bits
$ cat packs/grafana/metadata.hcl
…
dependency ”hashitalks_helpers" {
name = "hashitalks_helpers"
source = "https://github.com/attachmentgenie/hashitalks-registry/helpers"
}
$ cat packs/grafana/templates/grafana.nomad.tpl
…
[[ template "hashitalks_helpers .resources" . ]]
…
Currently no clear alternatives/equivalents for:
• Terraform_docs
• Terraform_fmt
• Terraform_tflint
• Terraform_validate
• Terrascan
Wishlist: pre-commit-nomad?
$ cat deploy.sh
#!/bin/bash
set -e
nomad-pack run minio -f vars/minio.hcl -f vars/lab.hcl --registry=attachmentgenie
nomad-pack run packs/loki -f vars/loki.hcl -f vars/lab.hcl
nomad-pack run packs/mimir -f vars/mimir.hcl -f vars/lab.hcl
nomad-pack run packs/phlare -f vars/phlare.hcl -f vars/lab.hcl
nomad-pack run packs/tempo -f vars/tempo.hcl -f vars/lab.hcl
nomad-pack run packs/grafana -f vars/grafana.hcl -f vars/lab.hcl
nomad-pack run redis -f vars/redis.hcl -f vars/lab.hcl --registry=attachmentgenie
nomad-pack run packs/grafana_oncall -f vars/grafana_oncall.hcl -f vars/lab.hcl
nomad-pack run packs/prometheus -f vars/prometheus.hcl -f vars/lab.hcl
nomad-pack run packs/promlens -f vars/promlens.hcl -f vars/lab.hcl
Wishlist: Meta package support
$ cat deploy.sh
#!/bin/bash
set -e
export NOMAD_ADDR=http://192.168.1.30:4646/ui/jobs
wait-for-url() {
echo "Testing $1"
timeout -s TERM 45 bash -c 
'while [[ "$(curl -s -o /dev/null -L -w ''%{http_code}'' ${0})" != "200" ]];
do echo "Waiting for ${0}" && sleep 2;
done' ${1}
echo "OK!"
}
nomad-pack run minio -f vars/minio.hcl -f vars/lab.hcl --registry=attachmentgenie
wait-for-url https://s3.teambla.dev/minio/health/live
nomad-pack run packs/loki -f vars/loki.hcl -f vars/lab.hcl
Wishlist: Dependency health checks
Questions ?
The Floor is yours…
bram@attachmentgenie.com
@attachmentgenie
https://www.slideshare.net/attachmentgenie

More Related Content

PDF
Grafana 7.0
PPTX
Prometheus - Intro, CNCF, TSDB,PromQL,Grafana
PDF
10 things i learned building nomad-packs
PPTX
MySQL Monitoring using Prometheus & Grafana
PPT
Monitoring using Prometheus and Grafana
PDF
Introduction to SAML 2.0
PDF
Gradle Introduction
Grafana 7.0
Prometheus - Intro, CNCF, TSDB,PromQL,Grafana
10 things i learned building nomad-packs
MySQL Monitoring using Prometheus & Grafana
Monitoring using Prometheus and Grafana
Introduction to SAML 2.0
Gradle Introduction

What's hot (20)

PDF
Angular Best Practices - Perfomatix
PDF
Docker swarm introduction
PDF
Getting Started Monitoring with Prometheus and Grafana
PDF
Server monitoring using grafana and prometheus
PDF
Kubernetes & helm 활용
PDF
Explore your prometheus data in grafana - Promcon 2018
PDF
Spring Framework - AOP
PDF
Uncomplicated Nomad
PDF
Terraform -- Infrastructure as Code
PDF
PDF
Securing Prometheus exporters using HashiCorp Vault
PDF
11 palo alto user-id concepts
PDF
Spring boot jpa
PDF
Easy Cloud Native Transformation using HashiCorp Nomad
PPTX
Spring security
PDF
Container Security
PDF
Introduction to docker
PDF
Angular - Chapter 4 - Data and Event Handling
PPT
presentation on Docker
PDF
Quick flask an intro to flask
Angular Best Practices - Perfomatix
Docker swarm introduction
Getting Started Monitoring with Prometheus and Grafana
Server monitoring using grafana and prometheus
Kubernetes & helm 활용
Explore your prometheus data in grafana - Promcon 2018
Spring Framework - AOP
Uncomplicated Nomad
Terraform -- Infrastructure as Code
Securing Prometheus exporters using HashiCorp Vault
11 palo alto user-id concepts
Spring boot jpa
Easy Cloud Native Transformation using HashiCorp Nomad
Spring security
Container Security
Introduction to docker
Angular - Chapter 4 - Data and Event Handling
presentation on Docker
Quick flask an intro to flask
Ad

Similar to 10 things I learned building Nomad packs (20)

PPTX
Streamline Hadoop DevOps with Apache Ambari
PDF
Burn down the silos! Helping dev and ops gel on high availability websites
PDF
Incrementalism: An Industrial Strategy For Adopting Modern Automation
KEY
Railsconf2011 deployment tips_for_slideshare
PDF
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
PPTX
Streamline Hadoop DevOps with Apache Ambari
PDF
Infrastructure-as-code: bridging the gap between Devs and Ops
PDF
ELK: a log management framework
PPTX
Streamline Hadoop DevOps with Apache Ambari
PDF
Perl web frameworks
PDF
Curscatalyst
PDF
Puppet Data Mining
KEY
fog or: How I Learned to Stop Worrying and Love the Cloud
PDF
Terraform in deployment pipeline
KEY
Automating Drupal Development: Makefiles, features and beyond
PDF
Ansible
PDF
Cutting through the fog of cloud
KEY
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
PDF
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
Streamline Hadoop DevOps with Apache Ambari
Burn down the silos! Helping dev and ops gel on high availability websites
Incrementalism: An Industrial Strategy For Adopting Modern Automation
Railsconf2011 deployment tips_for_slideshare
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
Streamline Hadoop DevOps with Apache Ambari
Infrastructure-as-code: bridging the gap between Devs and Ops
ELK: a log management framework
Streamline Hadoop DevOps with Apache Ambari
Perl web frameworks
Curscatalyst
Puppet Data Mining
fog or: How I Learned to Stop Worrying and Love the Cloud
Terraform in deployment pipeline
Automating Drupal Development: Makefiles, features and beyond
Ansible
Cutting through the fog of cloud
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
Ad

More from Bram Vogelaar (20)

PPTX
Terraforming your Platform Engineering organisation.pptx
PDF
Secure second days operations with Boundary and Vault.pdf
PDF
Cost reconciliation in a post CMDB world
PDF
Self scaling Multi cloud nomad workloads
PDF
Scraping metrics for fun and profit
PDF
Easy Cloud Native Transformation with Nomad
PDF
Observability; a gentle introduction
PDF
Running Trusted Payload with Nomad and Waypoint
PDF
CICD using jenkins and Nomad
PDF
Bootstrapping multidc observability stack
PDF
Running trusted payloads with Nomad and Waypoint
PDF
Gamification of Chaos Testing
PDF
Puppet and the HashiStack
PDF
Bootstrapping multidc observability stack
PPTX
Creating Reusable Puppet Profiles
PDF
Gamification of Chaos Testing
PDF
Autoscaling with hashi_corp_nomad
PDF
Observability with Consul Connect
PDF
Testing your infrastructure with litmus
PDF
Devops its not about the tooling
Terraforming your Platform Engineering organisation.pptx
Secure second days operations with Boundary and Vault.pdf
Cost reconciliation in a post CMDB world
Self scaling Multi cloud nomad workloads
Scraping metrics for fun and profit
Easy Cloud Native Transformation with Nomad
Observability; a gentle introduction
Running Trusted Payload with Nomad and Waypoint
CICD using jenkins and Nomad
Bootstrapping multidc observability stack
Running trusted payloads with Nomad and Waypoint
Gamification of Chaos Testing
Puppet and the HashiStack
Bootstrapping multidc observability stack
Creating Reusable Puppet Profiles
Gamification of Chaos Testing
Autoscaling with hashi_corp_nomad
Observability with Consul Connect
Testing your infrastructure with litmus
Devops its not about the tooling

Recently uploaded (20)

PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Electronic commerce courselecture one. Pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Encapsulation theory and applications.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
KodekX | Application Modernization Development
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Big Data Technologies - Introduction.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
A Presentation on Artificial Intelligence
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
Network Security Unit 5.pdf for BCA BBA.
Electronic commerce courselecture one. Pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Dropbox Q2 2025 Financial Results & Investor Presentation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
cuic standard and advanced reporting.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Encapsulation theory and applications.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
KodekX | Application Modernization Development
Review of recent advances in non-invasive hemoglobin estimation
Reach Out and Touch Someone: Haptics and Empathic Computing
Big Data Technologies - Introduction.pptx
The AUB Centre for AI in Media Proposal.docx
“AI and Expert System Decision Support & Business Intelligence Systems”
A Presentation on Artificial Intelligence
Digital-Transformation-Roadmap-for-Companies.pptx

10 things I learned building Nomad packs

  • 1. 10 things i learned building Nomad packs Bram Vogelaar @attachmentgenie
  • 2. • Used to be a Molecular Biologist • Then became a Dev, now an Ops • Currently Cloud Engineer @ The Factory • Amsterdam HUG organizer • Almost author => Workload Orchestration Made Easy With Nomad $ whoami
  • 3. l Open-source tool for dynamic workload scheduling l Batch, containerized, and non-containerized applications. l Has native Consul and Vault integrations. l Has token based access setup. l Jobs written in (H)ashiCorp (C)onfiguration (L)anguage https://www.nomadproject.io/ Nomad
  • 4. Nomad Job Structure job "lorem-ipsum" { group ”frontend" { network { port "http" { to = ”3000” } } service { name = ”lorem" port. = ”http" } task "server" { driver = "docker" config { image = ”cicero/lorem-ipsum:v1.0.0" ports = ["http"] } } }
  • 5. Surprisingly Dynamic job "lorem-ipsum" { group ”frontend" { network { port "http" { to = ”3000” } } service { name = ”lorem" port. = ”http" } task "server" { driver = "docker" config { image = ”cicero/lorem-ipsum:v1.0.0" ports = ["http"] } } }
  • 6. Job configuration includes options for but is not limited to: • Datacenters • Region • Namespace • Constraints • Count • Restart Configuration • Network • Volumes • Service Checks • Consul Connect • Resource Limits • Artifacts • Templates • Autoscaler Configuration Incredibly Dynamic
  • 8. • Levant • Templating and packaging tool • Easily deploy popular applications to Nomad • Re-use common patterns across internal applications • Find and share job definitions with the Nomad community • Jobs written in (H)ashiCorp (C)onfiguration (L)anguage • Templates are written using Go Template Syntax. • Nightlies only right now! Nomad Pack https://github.com/hashicorp/nomad-pack
  • 9. $ nomad-pack registry list $ nomad-pack registry add o11y https://github.com/attachmentgenie/nomad-pack-o11y-registry $ $ nomad-pack run grafana --var job_name=dashboard --registry=o11y $ nomad-pack run packs/grafana -f vars/grafana.hcl –f vars/lab.hcl Pack Registries https://github.com/hashicorp/nomad-pack-o11y-registry
  • 10. $ nomad-pack registry list PACK NAME | REF | METADATA VERSION | REGISTRY | REGISTRY URL -----------------------------+--------+------------------+-----------------+----------------------------- alertmanager | latest | 0.0.1 | default | github.com/hashicorp aws_efs_csi | latest | 0.0.1 | default | github.com/hashicorp Default registry mkdir –p $HOME/.nomad/packs/default on offline systems!
  • 11. lorem-ipsum ❯ tree |-- CHANGELOG.md |-- README.md |-- metadata.hcl |-- outputs.tpl |-- templates | |-- _helpers.tpl | `-- lorem-ipsum.nomad.tpl `-- variables.hcl 1 directory, 7 files Pack Structure
  • 12. app { url = "https://grafana.com/" author = "Grafana Labs" } pack { name = "grafana" description = "Grafana is a multi-platform open source analytics and interactive visualization tool." url = "https://github.com/attachmentgenie/nomad-pack-o11y-registry/grafana" version = "0.1.0" } metadata.hcl
  • 13. variable "datacenters" { description = "A list of datacenters in the region which are eligible for task placement" type = list(string) default = [“dc1”] } Variable “resources” { description = “The resource to assign to the Grafana service task” type = object({ cpu = number memory = number }) default = { cpu = 200, memory = 256 } } variables.hcl
  • 14. $ cat packs/grafana/templates/grafana.nomad.tpl …. datacenters = [[ .my.datacenters | toStringList ]] … resources { cpu = [[ .my.grafana_resources.cpu ]] memory = [[ .my.grafana_resources.memory ]] } … Pack Templates https://github.com/hashicorp/nomad-pack-community-registry
  • 15. $ nomad-pack plan packs/loki --var version=vX.Y.Z -f vars/loki.hcl +/- Job: "loki" + VaultToken: "s.IJcEJqpsCkGU0mfY3GmnCLSd" +/- Task Group: "loki" (1 create, 2 in-place update) +/- Count: "2" => "3" (forces create) Task: "connect-proxy-loki" Task: "server" » Scheduler dry-run: - All tasks successfully allocated. Plan succeeded $ nomad-pack nomad-pack run packs/loki --var version=vX.Y.Z -f vars/loki.hcl CI-CD
  • 16. $ nomad-pack render packs/loki --var version=vX.Y.Z -f vars/loki.hcl -o $WORKSPACE/render $ nomad run $WORKSPACE/render/loki/loki.nomad CI-CD Paranoid Version https://github.com/marketplace/actions/setup-hashicorp-nomad-pack
  • 18. $ cat packs/grafana/templates/grafana.nomad.tpl job [[ template "job_name" . ]] { [[ template "region" . ]] [[ template "namespace" . ]] …. $ cat packs/grafana/templates/_helpers.tpl … [[- define "job_name" -]] [[- if eq .grafana.job_name "" -]] [[- .nomad_pack.pack.name | quote -]] [[- else -]] [[- .grafana.job_name | quote -]] [[- end -]] [[- end -]] … Helper template
  • 19. $ cat packs/grafana/templates/_helpers.tpl … [[ define "resources" -]] [[- $resources := . ]] resources { cpu = [[ $resources.cpu ]] memory = [[ $resources.memory ]] } [[- end ]] … $ cat packs/grafana/templates/grafana.nomad.tpl … [[ template " resources " . ]] … Abstracting away boring repetitive bits
  • 20. $ cat packs/grafana/templates/_resources.tpl … [[ define "resources" -]] [[- $resources := . ]] resources { cpu = [[ $resources.cpu ]] memory = [[ $resources.memory ]] } [[- end ]] … $ cat packs/grafana/templates/grafana.nomad.tpl … [[ template " resources " . ]] … Abstracting away boring repetitive bits
  • 21. Abstracting away boring repetitive bits $ cat packs/grafana/metadata.hcl … dependency ”hashitalks_helpers" { name = "hashitalks_helpers" source = "https://github.com/attachmentgenie/hashitalks-registry/helpers" } $ cat packs/grafana/templates/grafana.nomad.tpl … [[ template "hashitalks_helpers .resources" . ]] …
  • 22. Currently no clear alternatives/equivalents for: • Terraform_docs • Terraform_fmt • Terraform_tflint • Terraform_validate • Terrascan Wishlist: pre-commit-nomad?
  • 23. $ cat deploy.sh #!/bin/bash set -e nomad-pack run minio -f vars/minio.hcl -f vars/lab.hcl --registry=attachmentgenie nomad-pack run packs/loki -f vars/loki.hcl -f vars/lab.hcl nomad-pack run packs/mimir -f vars/mimir.hcl -f vars/lab.hcl nomad-pack run packs/phlare -f vars/phlare.hcl -f vars/lab.hcl nomad-pack run packs/tempo -f vars/tempo.hcl -f vars/lab.hcl nomad-pack run packs/grafana -f vars/grafana.hcl -f vars/lab.hcl nomad-pack run redis -f vars/redis.hcl -f vars/lab.hcl --registry=attachmentgenie nomad-pack run packs/grafana_oncall -f vars/grafana_oncall.hcl -f vars/lab.hcl nomad-pack run packs/prometheus -f vars/prometheus.hcl -f vars/lab.hcl nomad-pack run packs/promlens -f vars/promlens.hcl -f vars/lab.hcl Wishlist: Meta package support
  • 24. $ cat deploy.sh #!/bin/bash set -e export NOMAD_ADDR=http://192.168.1.30:4646/ui/jobs wait-for-url() { echo "Testing $1" timeout -s TERM 45 bash -c 'while [[ "$(curl -s -o /dev/null -L -w ''%{http_code}'' ${0})" != "200" ]]; do echo "Waiting for ${0}" && sleep 2; done' ${1} echo "OK!" } nomad-pack run minio -f vars/minio.hcl -f vars/lab.hcl --registry=attachmentgenie wait-for-url https://s3.teambla.dev/minio/health/live nomad-pack run packs/loki -f vars/loki.hcl -f vars/lab.hcl Wishlist: Dependency health checks
  • 25. Questions ? The Floor is yours… bram@attachmentgenie.com @attachmentgenie https://www.slideshare.net/attachmentgenie