Consul установка

cd /tmp
wget https://releases.hashicorp.com/consul/1.8.0/consul_1.8.0_linux_amd64.zip
unzip consul_1.8.0_linux_amd64.zip
mv consul /usr/local/bin/
rm -f consul_1.8.0_linux_amd64.zip
sudo groupadd --system consul
sudo useradd -s /sbin/nologin --system -g consul consul
sudo mkdir -p /var/lib/consul
sudo chown -R consul:consul /var/lib/consul
sudo chmod -R 770 /var/lib/consul
sudo mkdir /etc/consul.d
chmod 770 /etc/consul.d
sudo chown -R consul:consul /etc/consul.d

Автозапуск

echo "[Unit]
Description=Consul Service Discovery Agent
Documentation=https://www.consul.io/
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=consul
Group=consul
ExecStart=/usr/local/bin/consul agent \
    -data-dir=/var/lib/consul \
    -config-dir=/etc/consul.d

ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGINT
TimeoutStopSec=5
Restart=on-failure
SyslogIdentifier=consul

[Install]
WantedBy=multi-user.target" >  /etc/systemd/system/consul.service

Правим конфиг

mcedit /etc/consul.d/config.json
systemctl daemon-reload
systemctl start consul
systemctl enable consul

Что то подзабыл для чего, помоему не обязательно

setcap 'cap_net_bind_service=+ep' /usr/local/bin/consul

[ Править ]

@kiranananda