Fix demo vagrant server by making hostname resolve

This commit is contained in:
Michael Schurter
2016-12-15 16:07:28 -08:00
parent 8ab7c3ed61
commit fcf44b002c
3 changed files with 18 additions and 5 deletions

View File

@@ -19,6 +19,9 @@ sudo mv nomad /usr/bin/nomad
sudo mkdir -p /etc/nomad.d
sudo chmod a+w /etc/nomad.d
# Set hostname's IP to made advertisement Just Work
sudo sed -i -e "s/.*nomad.*/$(ip route get 1 | awk '{print $NF;exit}') nomad/" /etc/hosts
SCRIPT
Vagrant.configure(2) do |config|

View File

@@ -12,8 +12,10 @@ server {
bootstrap_expect = 1
}
advertise {
http = "localhost"
rpc = "localhost"
serf = "localhost"
}
# Advertise must be set to a non-loopback address.
# Defaults to the resolving the local hostname.
#advertise {
# http = "10.0.2.1"
# rpc = "10.0.2.1"
# serf = "10.0.2.1"
#}

View File

@@ -33,6 +33,14 @@ server {
# Self-elect, should be 3 or 5 for production
bootstrap_expect = 1
}
# Advertise must be set to a non-loopback address.
# Defaults to the resolving the local hostname.
#advertise {
# http = "10.0.2.1"
# rpc = "10.0.2.1"
# serf = "10.0.2.1"
#}
```
This is a fairly minimal server configuration file, but it