diff --git a/demo/vagrant/client1.hcl b/demo/vagrant/client1.hcl index 845a4ebe6..6ba1e5fc9 100644 --- a/demo/vagrant/client1.hcl +++ b/demo/vagrant/client1.hcl @@ -4,6 +4,9 @@ log_level = "DEBUG" # Setup data dir data_dir = "/tmp/client1" +# Give the agent a unique name. Defaults to hostname +name = "client1" + # Enable the client client { enabled = true diff --git a/demo/vagrant/client2.hcl b/demo/vagrant/client2.hcl index 963546c4b..d1a42737f 100644 --- a/demo/vagrant/client2.hcl +++ b/demo/vagrant/client2.hcl @@ -4,6 +4,9 @@ log_level = "DEBUG" # Setup data dir data_dir = "/tmp/client2" +# Give the agent a unique name. Defaults to hostname +name = "client2" + # Enable the client client { enabled = true diff --git a/demo/vagrant/server.hcl b/demo/vagrant/server.hcl index f055de4e6..453df78c6 100644 --- a/demo/vagrant/server.hcl +++ b/demo/vagrant/server.hcl @@ -4,6 +4,9 @@ log_level = "DEBUG" # Setup data dir data_dir = "/tmp/server1" +# Give the agent a unique name. Defaults to hostname +name = "server1" + # Enable the server server { enabled = true diff --git a/website/source/intro/getting-started/cluster.html.md b/website/source/intro/getting-started/cluster.html.md index 5e3a76abd..5ffc2fd62 100644 --- a/website/source/intro/getting-started/cluster.html.md +++ b/website/source/intro/getting-started/cluster.html.md @@ -91,6 +91,9 @@ log_level = "DEBUG" # Setup data dir data_dir = "/tmp/client1" +# Give the agent a unique name. Defaults to hostname +name = "client1" + # Enable the client client { enabled = true @@ -107,10 +110,9 @@ ports { } ``` -Copy that file to `client2.hcl` and change the `data_dir` to -be `/tmp/client2` and the `http` port to 5657. Once you've created -both `client1.hcl` and `client2.hcl`, open a tab for each and -start the agents: +Copy that file to `client2.hcl`. Change the `data_dir` to be `/tmp/client2`, +the `name` to `client2`, and the `http` port to 5657. Once you have created +both `client1.hcl` and `client2.hcl`, open a tab for each and start the agents: ```text $ sudo nomad agent -config client1.hcl @@ -140,9 +142,9 @@ we should see both nodes in the `ready` state: ```text $ nomad node status -ID Datacenter Name Class Drain Status -fca62612 dc1 nomad false ready -c887deef dc1 nomad false ready +ID Datacenter Name Class Drain Status +fca62612 dc1 client1 false ready +c887deef dc1 client2 false ready ``` We now have a simple three node cluster running. The only difference