Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Nomad pointing to a Consul ran by Nomad itself
data_dir = "/tmp/consul/data"
log_level = "DEBUG"
server {
enabled = true
bootstrap_expect = 1
}
client {
enabled = true
options = {
"driver.raw_exec.enable" = "1"
}
}
consul {
address = "127.0.0.1:8500"
}
job "consul" {
datacenters = ["dc1"]
type = "system"
update {
max_parallel = 1
min_healthy_time = "10s"
healthy_deadline = "3m"
auto_revert = false
canary = 0
}
group "consul" {
count = 1
restart {
attempts = 10
interval = "5m"
delay = "25s"
mode = "delay"
}
ephemeral_disk {
size = 150
}
task "consul" {
driver = "raw_exec"
config {
command = "consul"
args = [
"agent",
"-server",
"-ui",
"-bootstrap-expect=1",
"-data-dir=consul-data",
"-bind=127.0.0.1"
]
}
artifact {
source = "https://releases.hashicorp.com/consul/0.9.2/consul_0.9.2_darwin_amd64.zip"
options {
checksum = "md5:e3dab0e607ef137486d0ff0fe856e278"
}
}
resources {
cpu = 500 # 500 MHz
memory = 64 # 256MB
network {
mbits = 10
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.