Created
October 22, 2018 10:31
-
-
Save zhouyl/4303fce12ac628bc61d8e019b7dc9842 to your computer and use it in GitHub Desktop.
consul configration in local
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"datacenter": "oms-java", | |
"data_dir": "/data/consul/data/", | |
"pid_file": "/data/consul/consul.pid", | |
"log_file": "/data/consul/logs/", | |
"log_rotate_bytes": 500000000, | |
"log_level": "INFO", | |
"node_name": "node1", | |
"server": true, | |
"bootstrap": true, | |
"ui": true, | |
"client_addr": "0.0.0.0", | |
"ports": { | |
"server": 8300, | |
"http": 8500, | |
"https": 8501, | |
"grpc": 8502, | |
"dns": 8600 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=consul agent | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
Restart=on-failure | |
ExecStart=/usr/local/bin/consul agent -config-file=/data/consul/conf/consul.conf -config-format=json | |
ExecReload=/bin/kill -HUP $MAINPID | |
ExecStop=/bin/kill -INT $MAINPID | |
[Install] | |
WantedBy=multi-user.target | |
Alias=consul.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment