diff --git a/demo/vagrant/Vagrantfile b/demo/vagrant/Vagrantfile index 57ff2ecc3..a6f584307 100644 --- a/demo/vagrant/Vagrantfile +++ b/demo/vagrant/Vagrantfile @@ -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| diff --git a/demo/vagrant/server.hcl b/demo/vagrant/server.hcl index 5361af54f..b745dbe2c 100644 --- a/demo/vagrant/server.hcl +++ b/demo/vagrant/server.hcl @@ -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" +#} diff --git a/website/source/intro/getting-started/cluster.html.md b/website/source/intro/getting-started/cluster.html.md index 31535df93..e8b3f0e28 100644 --- a/website/source/intro/getting-started/cluster.html.md +++ b/website/source/intro/getting-started/cluster.html.md @@ -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), or paste this into a file called `server.hcl`: -``` +```hcl # Increase log verbosity log_level = "DEBUG"