From 6ef5b6921f7bd67f9447f293a76e622307359bb1 Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Fri, 22 May 2026 07:49:18 -0400 Subject: [PATCH 1/3] update nodesim.nomad job file --- nodesim.nomad | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/nodesim.nomad b/nodesim.nomad index d120c19..4c645a7 100644 --- a/nodesim.nomad +++ b/nodesim.nomad @@ -1,19 +1,10 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 -variable "num_nodes" { - type = string -} - -variable "server" { - type = string -} - job "nodesim" { datacenters = ["dc1"] group "nodesim" { - count = 20 update { max_parallel = 3 @@ -22,18 +13,36 @@ 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"] + } + + template { + data = < Date: Fri, 22 May 2026 07:55:44 -0400 Subject: [PATCH 2/3] add volume for cgroup manager --- nodesim.nomad | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nodesim.nomad b/nodesim.nomad index 4c645a7..c5ca7a2 100644 --- a/nodesim.nomad +++ b/nodesim.nomad @@ -18,6 +18,11 @@ job "nodesim" { command = "/bin/nomad-nodesim" args = ["-config", "/local/config.hcl"] + + # For use on a linux host + volumes = [ + "/sys/fs/cgroup:/sys/fs/cgroup", + ] } template { From c6717cacb30a81265ef4e81b61d72fd67d6263a2 Mon Sep 17 00:00:00 2001 From: Michael Smithhisler Date: Fri, 22 May 2026 15:02:35 -0400 Subject: [PATCH 3/3] use variables in template --- nodesim.nomad | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/nodesim.nomad b/nodesim.nomad index c5ca7a2..7686a9e 100644 --- a/nodesim.nomad +++ b/nodesim.nomad @@ -1,6 +1,16 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 +variable "num_nodes" { + type = string + default = 10 +} + +variable "servers" { + type = list(string) + default = ["localhost:4647"] +} + job "nodesim" { datacenters = ["dc1"] @@ -29,8 +39,8 @@ job "nodesim" { data = <