mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Fix demo vagrant server by making hostname resolve
This commit is contained in:
3
demo/vagrant/Vagrantfile
vendored
3
demo/vagrant/Vagrantfile
vendored
@@ -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|
|
||||
|
||||
@@ -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"
|
||||
#}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user