diff --git a/nodesim.nomad b/nodesim.nomad index d120c19..7686a9e 100644 --- a/nodesim.nomad +++ b/nodesim.nomad @@ -3,17 +3,18 @@ variable "num_nodes" { type = string + default = 10 } -variable "server" { - type = string +variable "servers" { + type = list(string) + default = ["localhost:4647"] } job "nodesim" { datacenters = ["dc1"] group "nodesim" { - count = 20 update { max_parallel = 3 @@ -22,20 +23,43 @@ job "nodesim" { task "nodesim" { driver = "docker" - kill_signal = "SIGINT" - config { - image = "schmichael/nomad-nodesim:0.2" - - command = "/build/nomad-nodesim" - args = [ - "-dir", "/local", - "-num", var.num_nodes, - "-server", var.server, - "-id", "${NOMAD_SHORT_ALLOC_ID}", + image = "hashicorppreview/nomad-nodesim:6cebba3" + + command = "/bin/nomad-nodesim" + args = ["-config", "/local/config.hcl"] + + # For use on a linux host + volumes = [ + "/sys/fs/cgroup:/sys/fs/cgroup", ] } + template { + data = <