Skip to content

Instantly share code, notes, and snippets.

@rossedman
Forked from yunano/consul.service
Last active July 24, 2017 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rossedman/2c69f6172848125927063569bce7fd14 to your computer and use it in GitHub Desktop.
Save rossedman/2c69f6172848125927063569bce7fd14 to your computer and use it in GitHub Desktop.
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