Skip to content

Commit

Permalink
Fix demo vagrant server by making hostname resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
schmichael committed Dec 16, 2016
1 parent 8ab7c3e commit fcf44b0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
3 changes: 3 additions & 0 deletions demo/vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
12 changes: 7 additions & 5 deletions demo/vagrant/server.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
#}
8 changes: 8 additions & 0 deletions website/source/intro/getting-started/cluster.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fcf44b0

Please sign in to comment.