Merge pull request #2768 from hashicorp/d-getting-started-consul

Start consul in getting started vagrant
This commit is contained in:
Michael Schurter 2017-07-06 10:40:45 -07:00 committed by GitHub
commit 2c9e63b196
3 changed files with 16 additions and 1 deletions

View File

@ -42,6 +42,9 @@ sudo usermod -aG docker vagrant
echo "Installing Consul..."
cd /opt/nomad
bash scripts/install_consul.sh
sudo install -o root /opt/nomad/demo/vagrant/consul.service /etc/systemd/system/consul.service
sudo systemctl enable consul.service
sudo systemctl start consul
SCRIPT

View File

@ -0,0 +1,12 @@
[Unit]
Description=consul agent
Requires=network-online.target
After=network-online.target
[Service]
Restart=on-failure
ExecStart=/usr/bin/consul agent -dev
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@ -2,7 +2,7 @@
set -e
CONSUL_VERSION="0.8.4"
CONSUL_VERSION="0.8.5"
CURDIR=`pwd`
if [[ $(which consul >/dev/null && consul version | head -n 1 | cut -d ' ' -f 2) == "v$CONSUL_VERSION" ]]; then