I am using vagrant to set up my lab and vagrant assigns 10.0.2.15 to eth0 on all three of my VMs. When I go into the Nomad GUI I see the job and click the link but it is not the host IP but rather the above address and the link does not work. Currently my IP addresses go from 192.168.1.18-20. Below are my configs for the single server and the two agents. I am a novice in Vagrant and Nomad so I need someone to break it down Barney style please.
Server: ip 192.168.1.18
/etc/nomad.d/nomad.hcl
datacenter = "dc1"
data_dir = "/opt/nomad"
/etc/nomad.d/server.hcl
server {
enabled = true
bootstrap_expect = 1
}
advertise {
http = "192.168.1.18:4646"
rpc = "192.168.1.18:4647"
serf = "192.168.1.18:4648"
}
Agents:
/etc/nomad.d/nomad.hcl
datacenter = "dc1"
data_dir = "/opt/nomad"
bind_addr = "192.168.1.19"
/etc/nomad.d/client.hcl
client {
enabled = true
servers = ["192.168.1.18"]
}</code>
The job that I ran is the example from you guys.
<code>job "docs" {
datacenters = ["dc1"]
group "example" {
task "server" {
driver = "docker"
config {
image = "hashicorp/http-echo"
args = [
"-listen",
":5678",
"-text",
"hello world",
]
}
resources {
network {
mbits = 10
port "http" {
static = "5678"
}
}
}
}
}
}