Skip to content

Instantly share code, notes, and snippets.

@yatskevich
Last active June 22, 2018 02:42
Show Gist options
  • Save yatskevich/d401c3f5fcc7e52f86dc to your computer and use it in GitHub Desktop.
Save yatskevich/d401c3f5fcc7e52f86dc to your computer and use it in GitHub Desktop.
Trying out Consul
boot2docker ip
# 192.168.59.103
consul members -rpc-addr=192.168.59.103:8400
# Node Address Status Type Build Protocol
# node4 172.17.0.13:8301 alive client 0.4.1 2
# node2 172.17.0.11:8301 alive server 0.4.1 2
# node3 172.17.0.12:8301 alive server 0.4.1 2
# node1 172.17.0.10:8301 alive server 0.4.1 2
consul monitor -rpc-addr=192.168.59.103:8400
# ...
# 2015/01/17 12:37:35 [INFO] consul: adding server node2 (Addr: 172.17.0.11:8300) (DC: dc1)
# 2015/01/17 12:37:35 [INFO] consul: adding server node3 (Addr: 172.17.0.12:8300) (DC: dc1)
# 2015/01/17 12:37:35 [INFO] consul: adding server node1 (Addr: 172.17.0.10:8300) (DC: dc1)
# 2015/01/17 12:37:41 [INFO] agent.rpc: Accepted client: 192.168.59.3:62224
# Open another terminal window
# and init environment for docker
$(boot2docker shellinit)
# terminate the first Consul server and look at the output of `consul monitor`
docker rm -f node1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment