Hi @jrasell ,
Thanks for the tip on setting the datacenters! That seems to work.
I switched off the laptop and am trying to run directly on one of the nomad servers.
Running nomad server members :
# nomad server members
Name Address Port Status Leader Protocol Build Datacenter Region
ip-172-X-X-Y.dev.test.dom.us-east-1 172.X.X.Y 4648 alive true 2 1.2.6 dev us-east-1
ip-172-X-X-Z.dev.test.dom.us-east-1 172.X.X.Z 4648 alive false 2 1.2.6 dev us-east-1
I am using a brand new install of nomad-pack and new run of nomad-pack registry list and just the simple hello_world pack straight from the 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
boundary | latest | 0.0.1 | default | github.com/hashicorp
chaotic_ngine | latest | 0.0.1 | default | github.com/hashicorp
csi_openstack_cinder | latest | 0.0.1 | default | github.com/hashicorp
drone | latest | 0.0.1 | default | github.com/hashicorp
faasd | latest | 0.0.1 | default | github.com/hashicorp
fabio | latest | 0.0.1 | default | github.com/hashicorp
grafana | latest | 0.1.0 | default | github.com/hashicorp
haproxy | latest | 0.0.1 | default | github.com/hashicorp
hashicups | latest | 0.0.1 | default | github.com/hashicorp
hello_world | latest | 0.0.1 | default | github.com/hashicorp
influxdb | latest | 0.0.1 | default | github.com/hashicorp
jaeger | latest | 0.0.1 | default | github.com/hashicorp
jenkins | latest | 0.0.1 | default | github.com/hashicorp
kibana | latest | 0.0.1 | default | github.com/hashicorp
loki | latest | 0.0.1 | default | github.com/hashicorp
nextcloud | latest | 0.0.1 | default | github.com/hashicorp
nginx | latest | 0.0.1 | default | github.com/hashicorp
nomad_autoscaler | latest | 0.0.1 | default | github.com/hashicorp
nomad_ingress_nginx | latest | 0.0.1 | default | github.com/hashicorp
opentelemetry_collector | latest | 0.0.1 | default | github.com/hashicorp
outline | latest | 0.0.1 | default | github.com/hashicorp
prometheus | latest | 0.0.1 | default | github.com/hashicorp
prometheus_consul_exporter | latest | 0.0.1 | default | github.com/hashicorp
prometheus_node_exporter | latest | 0.0.1 | default | github.com/hashicorp
prometheus_snmp_exporter | latest | 0.0.1 | default | github.com/hashicorp
promtail | latest | 0.0.1 | default | github.com/hashicorp
rabbitmq | latest | 0.0.1 | default | github.com/hashicorp
redis | latest | 0.0.1 | default | github.com/hashicorp
simple_service | latest | 0.0.1 | default | github.com/hashicorp
sonarqube | latest | 0.0.1 | default | github.com/hashicorp
tempo | latest | 0.0.1 | default | github.com/hashicorp
tfc_agent | latest | 0.1.0 | default | github.com/hashicorp
traefik | latest | 0.1.0 | default | github.com/hashicorp
vector | latest | 0.0.1 | default | github.com/hashicorp
wordpress | latest | 0.0.1 | default | github.com/hashicorp
# nomad-pack plan -var='datacenters=["dev"]' hello_world
! Failed Job Conflict Validation
Error: No path to region
Type: *v1.APIError
Context:
- Template Name: hello_world/templates/hello_world.nomad.tpl
I found the template in ~/.cache/ directory.
# cat /root/.cache/nomad/packs/default/hello_world@latest/templates/hello_world.nomad.tpl
job [[ template "job_name" . ]] {
[[ template "region" . ]]
datacenters = [[ .hello_world.datacenters | toStringList ]]
type = "service"
group "app" {
count = [[ .hello_world.count ]]
network {
port "http" {
to = 8000
}
}
[[ if .hello_world.register_consul_service ]]
service {
name = "[[ .hello_world.consul_service_name ]]"
tags = [[ .hello_world.consul_service_tags | toStringList ]]
port = "http"
check {
name = "alive"
type = "http"
path = "/"
interval = "10s"
timeout = "2s"
}
}
[[ end ]]
restart {
attempts = 2
interval = "30m"
delay = "15s"
mode = "fail"
}
task "server" {
driver = "docker"
config {
image = "mnomitch/hello_world_server"
ports = ["http"]
}
env {
MESSAGE = [[.hello_world.message | quote]]
}
}
}
}
It doesn’t matter what pack I tried to run from the registry, I get the same error.
# nomad-pack plan loki
! Failed Job Conflict Validation
Error: No path to region
Type: *v1.APIError
Context:
- Template Name: loki/templates/loki.nomad.tpl
Trying it with verbose
# nomad-pack plan -verbose hello_world
! Failed Job Conflict Validation
Error: No path to region
Type: *v1.APIError
Context:
- Template Name: hello_world/templates/hello_world.nomad.tpl
And when I try -verbose and datacenters:
# nomad-pack plan -verbose hello_world -var='datacenters=["dev"]'
! Error Parsing Args Or Flags
Error: Flags must be specified before positional arguments when using Go standard
library style flags. For example, "nomad-pack plan -verbose example" instead
of "nomad-pack plan example -verbose".
The CLI also accepts posix flags, which does allow flags after positional
arguments. For example, both "nomad-pack plan --verbose example" and
"nomad-pack plan example --verbose" are valid commands.
Type: *errors.errorString
See "nomad-pack plan --help"
# nomad-pack plan hello_world -var='datacenters=["dev"]' --verbose
! Error Parsing Args Or Flags
Error: Flags must be specified before positional arguments when using Go standard
library style flags. For example, "nomad-pack plan -verbose example" instead
of "nomad-pack plan example -verbose".
The CLI also accepts posix flags, which does allow flags after positional
arguments. For example, both "nomad-pack plan --verbose example" and
"nomad-pack plan example --verbose" are valid commands.
Type: *errors.errorString
See "nomad-pack plan --help"
Any help would be appreciated!