Created
September 1, 2017 15:08
-
-
Save mongrelion/a7b1b7c1add401ef3bf0dd40f5e03cdb to your computer and use it in GitHub Desktop.
Nomad pointing to a Consul ran by Nomad itself
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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