Created
August 2, 2018 12:34
-
-
Save OlegGorj/d4f601ae55a2a90884ef363c0f9c203d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//contents of consul agent json config | |
{ | |
"ports": { | |
"dns": 0, | |
"https": -1, | |
"serf_lan": 8301, | |
"serf_wan": 8302, | |
"server": 8300 | |
}, | |
"advertise_addr": "127.0.0.1", | |
"bind_addr": "127.0.0.1", | |
"acl_agent_token": "ACL_MASTER_TOKEN", | |
"acl_datacenter": "tmp", | |
"acl_default_policy": "deny", | |
"acl_down_policy": "extend-cache", | |
"acl_master_token": "ACL_MASTER_TOKEN", | |
"data_dir" :"/tmp/consultest", | |
"datacenter":"tmp", | |
"node_meta": { | |
"datacenter": "tmp", | |
"environment": "dev", | |
"type": "server" | |
}, | |
"server":true, | |
"ui":true | |
} | |
//contents of service_payload.json | |
//test via curl like curl -X PUT --data @service_payload.json http://localhost:8500/v1/catalog/register?token=ACL_MASTER_TOKEN | |
{ | |
"Datacenter": "tmp", | |
"ID": "40e4a742-2195-161a-0510-9bf59fe950b5", | |
"Node": "XXXXXX", | |
"Address": "127.0.0.1", | |
"Service": { | |
"ID": "redis1", | |
"Service": "redis", | |
"Tags": [ | |
"primary", | |
"v1" | |
], | |
"Address": "127.0.0.1", | |
"Port": 8000 | |
} | |
} | |
//contents of deregister_payload.json | |
//test via curl like: curl -X PUT --data @deregister_payload.json http://localhost:8500/v1/catalog/deregister?token=ACL_MASTER_TOKEN | |
{ | |
"Datacenter": "tmp", | |
"Node": "XXXXXX", | |
"ServiceID": "redis1" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment