Merge pull request #2122 from hashicorp/b-fix-getting-started
Fix demo vagrant server by making hostname resolve
This commit is contained in:
commit
3edf796c33
|
@ -19,6 +19,9 @@ sudo mv nomad /usr/bin/nomad
|
||||||
sudo mkdir -p /etc/nomad.d
|
sudo mkdir -p /etc/nomad.d
|
||||||
sudo chmod a+w /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
|
SCRIPT
|
||||||
|
|
||||||
Vagrant.configure(2) do |config|
|
Vagrant.configure(2) do |config|
|
||||||
|
|
|
@ -12,8 +12,10 @@ server {
|
||||||
bootstrap_expect = 1
|
bootstrap_expect = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
advertise {
|
# Advertise must be set to a non-loopback address.
|
||||||
http = "localhost"
|
# Defaults to the resolving the local hostname.
|
||||||
rpc = "localhost"
|
#advertise {
|
||||||
serf = "localhost"
|
# http = "10.0.2.1"
|
||||||
}
|
# rpc = "10.0.2.1"
|
||||||
|
# serf = "10.0.2.1"
|
||||||
|
#}
|
||||||
|
|
|
@ -19,7 +19,7 @@ The first step is to create the config file for the server. Either download
|
||||||
the file from the [repository here](https://github.com/hashicorp/nomad/tree/master/demo/vagrant),
|
the file from the [repository here](https://github.com/hashicorp/nomad/tree/master/demo/vagrant),
|
||||||
or paste this into a file called `server.hcl`:
|
or paste this into a file called `server.hcl`:
|
||||||
|
|
||||||
```
|
```hcl
|
||||||
# Increase log verbosity
|
# Increase log verbosity
|
||||||
log_level = "DEBUG"
|
log_level = "DEBUG"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue