Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Consul Installation
#
# This needs to be installed here:
# /etc/systemd/system/consul.service
#
[Unit]
Description=consul
Requires=network-online.target
After=network-online.target
[Service]
Environment="GOMAXPROCS=2" "PATH=/usr/local/bin:/usr/bin:/bin"
Restart=on-failure
ExecStart=/usr/local/bin/consul agent -config-file=/etc/consul/consul.json -config-dir=/etc/consul/conf.d
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=TERM
[Install]
WantedBy=multi-user.target
{
"bootstrap": true,
"data_dir": "/opt/consul",
"node_name": "CON01",
"server": true,
"ui": true
}
{
"data_dir": "/opt/consul",
"node_name": "CON02",
"server": true,
"start_join": "IP.OF.LEADER"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.