systemd service
1 | [Unit] |
acl.json
启用ACL,需在配置加载目录下添加acl配置文件
1 | { |
deregitster
1 | curl -X PUT http://192.168.100.140:8500/v1/agent/service/deregister/<id> -H "X-Consul-Token:xxx" |
register
- 仅node check
1 | curl http://10.1.100.57:8500/v1/agent/service/register -X PUT -i -H "Content-Type:application/json" -H "X-Consul-Token:xxx" -d '{ |
- node check + service check
1 | curl http://10.1.100.57:8500/v1/agent/service/register -X PUT -i -H "Content-Type:application/json" -H "X-Consul-Token:xxxxxxxxxxx" -d '{ |
Name不能包含小数点
创建一个agent token
1 | curl \ |
Type: client
WebUI token的policy可以设置为只读:
1 | service_prefix "" { |
示例:
1 | [root@VM_0_4_centos ins_exporter]# cat deReg.sh |